undefined reference to `iflib_gen_mac', Ticket #3985

junkes junkes at fhi-berlin.mpg.de
Wed Sep 2 14:33:36 UTC 2020


Unfortunately I can't build EPICS with i386/pc686 (rtems5.1) and libbsd. 
I know Ticket #3985, I made everything new. But unfortunately it does 
not work:

/home/h1/GSOC/RTEMS//bin/i386-rtems5-gcc --pipe 
-B/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/ -specs bsp_specs -qrtems   
-fasm   -mtune=pentiumpro -march=pentium                   -DUNIX      
-O2 -g -ffunction-sections -fdata-sections   -Wall          
-D__LINUX_ERRNO_EXTENSIONS__ -DHAVE_SOCKADDR_SA_LEN=1  -I. -I../O.Common 
-I. -I. -I.. -I../../../../include/compiler/gcc 
-I../../../../include/os/RTEMS -I../../../../include         -c 
rtemsTestData.c
/home/h1/GSOC/RTEMS//bin/i386-rtems5-g++ 
-B/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/ -specs bsp_specs -qrtems   
-o libComTestHarness -static 
-L/home/h1/GSOC/rtems5_epics7/QtC-epics-base/lib/RTEMS-pc686           
-mtune=pentiumpro -march=pentium -u POSIX_Init -Wl,-Ttext,0x100000       
   epicsTypesTest.o epicsInlineTest1.o epicsInlineTest2.o 
epicsInlineTest3.o epicsInlineTest4.o epicsCalcTest.o 
epicsAlgorithmTest.o epicsMathTest.o epicsMMIOTest.o epicsEllTest.o 
epicsEnvTest.o epicsEnvUnsetTest.o epicsErrlogTest.o epicsStdioTest.o 
epicsStdlibTest.o epicsSockResolveTest.o epicsStringTest.o 
epicsTimeTest.o epicsThreadTest.o epicsThreadClassTest.o 
epicsThreadOnceTest.o epicsThreadPriorityTest.o epicsThreadPrivateTest.o 
epicsThreadHooksTest.o epicsThreadPoolTest.o epicsExitTest.o 
epicsTimerTest.o ringPointerTest.o ringBytesTest.o epicsEventTest.o 
epicsMutexTest.o epicsSpinTest.o epicsAtomicTest.o macDefExpandTest.o 
cvtFastTest.o macLibTest.o aslibtest.o taskwdTest.o blockingSockTest.o 
epicsMessageQueueTest.o epicsStackTraceTest.o ipAddrToAsciiTest.o 
osiSockTest.o epicsRunLibComTests.o epicsThreadPerform.o 
epicsMaxThreads.o buckTest.o epicsAtomicPerform.o cvtFastPerform.o 
epicsTimeZoneTest.o rtemsTestHarness.o rtemsTestData.o   -lCom       -lm 
-lrtemsCom -lc -lrtemscpu  -ltftpfs -lbsd -lz -lm -lgcc
/home/h1/GSOC/RTEMS/lib/gcc/i386-rtems5/7.5.0/../../../../i386-rtems5/bin/ld: 
/home/h1/GSOC/rtems5_epics7/QtC-epics-base/lib/RTEMS-pc686/librtemsCom.a(rtems_config.o):/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/include/bsp/nexus-devices.h:157: 
undefined reference to `_bsd_lem_pcimodule_sys_init'
/home/h1/GSOC/RTEMS/lib/gcc/i386-rtems5/7.5.0/../../../../i386-rtems5/bin/ld: 
/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/libbsd.a(iflib.c.18.o): in 
function `iflib_pseudo_register':
/home/h1/GSOC/RTEMS_DEV/libbsd/build/i386-rtems5-pc686-default/../../freebsd/sys/net/iflib.c:4804: 
undefined reference to `iflib_gen_mac'
/home/h1/GSOC/RTEMS/lib/gcc/i386-rtems5/7.5.0/../../../../i386-rtems5/bin/ld: 
/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/libbsd.a(iflib.c.18.o):(.rodata.iflib_pseudo_methods+0x4): 
undefined reference to `noop_attach'
/home/h1/GSOC/RTEMS/lib/gcc/i386-rtems5/7.5.0/../../../../i386-rtems5/bin/ld: 
/home/h1/GSOC/RTEMS/i386-rtems5/pc686/lib/libbsd.a(iflib.c.18.o):(.rodata.iflib_pseudo_methods+0xc): 
undefined reference to `iflib_pseudo_detach'
collect2: error: ld returned 1 exit status
../../../../configure/RULES_BUILD:212: recipe for target 
'libComTestHarness' failed
make[4]: *** [libComTestHarness] Error 1


I have made this new in this way:

  wget 
https://ftp.rtems.org/pub/rtems/releases/5/5.1/sources/rtems-source-builder-5.1.tar.xz
  tar Jxf rtems-source-builder-5.1.tar.xz
  mv rtems-source-builder-5.1 rsb
  cd rsb/rtems
  ../source-builder/sb-set-builder --prefix=/home/h1/GSOC/RTEMS 
5/rtems-i386

  wget 
https://ftp.rtems.org/pub/rtems/releases/5/5.1/sources/rtems-5.1.tar.xz
  tar Jxf rtems-5.1.tar.xz
  mv rtems-5.1 rtems
  cd rtems
  ./rtems-bootstrap

  mkdir b-pc686
  cd b-pc686/
  ../../rtems/configure --target=i386-rtems5 --prefix=/home/h1/GSOC/RTEMS 
--disable-networking --enable-posix --enable-cxx --enable-tests 
--enable-rtemsbsp=pc686
  make all
  make install

  cd libbsd
  ./waf configure --prefix=/home/h1/GSOC/RTEMS --rtems-bsps=i386/pc686 
--buildset=buildset/default.ini
  ./waf
  ./waf install

Heinz




More information about the users mailing list