Content
Epics make vs. waf
Added by Heinz Junkes over 5 years ago
Re: offlist: Build errors with legacy stack
From Vijay Kumar Banerjee on 2021-03-09 21:00
On Fri, Mar 5, 2021 at 1:30 PM Heinz Junkes <junkes@fhi-berlin.mpg.de> wrote:
Hi Vijay,
my colleagues have seen similiar issues with the unresolved SHELL commands:
https://github.com/epics-base/epics-base/pull/105#issuecomment-791162092
Heinz
I have tried these commits out with both legacy stack and libbsd
stack, I'm getting similar link errors with them:
```
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:69:
undefined reference to `bsp_section_sbss_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:69:
undefined reference to `bsp_section_sbss_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/rtems/6/powerpc-rtems6/beatnik/lib/librtemscpu.a(rtems_putc.c.70.o):
in function `rtems_putc':
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:29:
undefined reference to `BSP_output_char'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:31:
undefined reference to `BSP_output_char'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:34:
undefined reference to `BSP_output_char'
```
This has something to do with the makefiles in EPICS. I would like to
take a deeper look if it has not been solved already. Do you have any
hints about where in the makefiles should I be looking?
Best regards,
Vijay
Begin forwarded message:
From: junkes <junkes@fhi-berlin.mpg.de>
Subject: Re: offlist: Build errors with legacy stack
Date: 5. March 2021 at 14:13:16 CET
To: Vijay Kumar Banerjee <vijay@rtems.org>, Felix Kraemer <kraemfel@gmail.com>Hello Vijay,
thank you for taking care of this. I had unfortunately neglected to mention that we currently have a PR specifically for RTEMS to support RTEMS5/6 in the future.
I also want to address these things next week at the codeathlon and hope that we can bring it to a secessful conclusion there.
I have created documents in OpenProject (I'll send you an invitation to it in a moment) for installing RTEMS5/6 and EPICS there: https://op.fhi.mpg.de/projects/epics-codeathon-rtems/documents
I just redid the whole thing and it looks much better for RTEMS6 (I don't know what I did wrong yesterday).
It looks to me like there are just a few settings missing in the net-extra-lib-legacy ;-)I can unfortunately only this evening look further what is still missing ...
Heinz/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/RTEMS-posix -I../osi/os/RTEMS -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -c ../osi/osiNTPTime.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-ar rc libCom.a asLib.o asTrapWrite.o bucketLib.o postfix.o calcPerform.o cvtFast.o resourceLib.o epicsSingletonMutex.o dbmf.o ellLib.o ellSort.o envSubr.o envData.o errlog.o errSymLib.o errSymTbl.o fdmgr.o fdManager.o freeListLib.o gpHashLib.o iocsh.o initHooks.o registry.o libComRegister.o iocLog.o logClient.o macCore.o macEnv.o macUtil.o alarmString.o aToIPAddr.o adjustment.o cantProceed.o epicsConvert.o epicsExit.o epicsStdlib.o epicsString.o truncateFile.o ipAddrToAsciiAsynchronous.o epicsUnitTest.o epicsThread.o epicsMutex.o epicsEvent.o epicsTime.o epicsMessageQueue.o epicsMath.o epicsAtomicOSD.o epicsGeneralTime.o osiClockTime.o osdSock.o osdSockAddrReuse.o osdSockUnsentCount.o osiSock.o systemCallIntMech.o epicsSocketConvertErrnoToString.o osdAssert.o osdFindSymbol.o osdInterrupt.o osdPoolStatus.o osdSignal.o osdEnv.o epicsReadline.o epicsTempFile.o epicsStdio.o osdStdio.o osdThread.o osdThreadExtra.o osdThreadHooks.o osdMutex.o osdSpin.o osdEvent.o osdTime.o osdMonotonic.o osdProcess.o osdNetIntf.o osdMessageQueue.o osdgetexec.o devLibVME.o devLibVMEOSD.o epicsStackTrace.o osdBackTrace.o osdFindAddr.o poolJob.o threadPool.o epicsRingPointer.o epicsRingBytes.o taskwd.o epicsTimer.o timer.o timerQueue.o timerQueueActive.o timerQueueActiveMgr.o timerQueuePassive.o yajl.o yajl_alloc.o yajl_buf.o yajl_encode.o yajl_gen.o yajl_lex.o yajl_parser.o osiNTPTime.o
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-ranlib libCom.a
Installing library ../../../../lib/RTEMS-beatnik/libCom.a
make[4]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/src/O.RTEMS-beatnik'
make[3]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/src'
make -C ./RTEMS install
make[3]: Entering directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS'
perl -CSD /home/junkes/MVME6100_testing/EPICS/epics-base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../../..
perl -CSD /home/junkes/MVME6100_testing/EPICS/epics-base/bin/linux-x86_64/makeMakefile.pl O.RTEMS-beatnik ../../../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../../.. \
T_A=linux-x86_64 install
make[4]: Entering directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS/O.linux-x86_64'
Installing generic include file ../../../../include/epicsRtemsInitHooks.h
Installing generic include file ../../../../include/epicsMemFs.h
Installing generic include file ../../../../include/epicsNtp.h
Installing script ../../../../bin/linux-x86_64/epicsMakeMemFs.pl
make[4]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS/O.linux-x86_64'
make -C O.RTEMS-beatnik -f ../Makefile TOP=../../../.. \
T_A=RTEMS-beatnik install
make[4]: Entering directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS/O.RTEMS-beatnik'
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF epicsNtp.d ../epicsNtp.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF epicsMemFs.d ../epicsMemFs.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF epicsRtemsInitHookPost.d ../epicsRtemsInitHookPost.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF epicsRtemsInitHookPre.d ../epicsRtemsInitHookPre.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF setBootConfigFromNVRAM.d ../setBootConfigFromNVRAM.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF rtems_util.d ../rtems_util.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF rtems_netconfig.d ../rtems_netconfig.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DBSP_beatnik -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF rtems_config.d ../posix/rtems_config.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -MM -MF rtems_init.d ../posix/rtems_init.c
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -c ../posix/rtems_init.c
../posix/rtems_init.c:87:9: note: '#pragma message: RTEMS uses legacy stack'
87 | #pragma message "RTEMS uses legacy stack"
| ^~~~~~~
/home/junkes/MVME6100_testing/rtems/6/bin/powerpc-rtems6-gcc -fasm -I/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include -mcpu=7400 -DBSP_beatnik -DUNIX -O2 -g -fdata-sections -ffunction-sections -Wall -Werror-implicit-function-declaration -DRTEMS_HAS_ALTIVEC -DHAVE_MOTLOAD -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048 -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120 -D__LINUX_ERRNO_EXTENSIONS__ -DRTEMS_LEGACY_STACK -I. -I../O.Common -I. -I. -I.. -I../posix -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include -c ../posix/rtems_config.c
../posix/rtems_config.c:112:4: error: 'rtems_shell_PING_Command' undeclared here (not in a function); did you mean 'rtems_shell_PCI_Command'?
112 | &rtems_shell_PING_Command, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include/rtems/shellconfig.h:575:7: note: in expansion of macro 'CONFIGURE_SHELL_USER_COMMANDS'
575 | CONFIGURE_SHELL_USER_COMMANDS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/rtems_config.c:113:4: error: 'rtems_shell_ROUTE_Command' undeclared here (not in a function); did you mean 'rtems_shell_RTC_Command'?
113 | &rtems_shell_ROUTE_Command, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include/rtems/shellconfig.h:575:7: note: in expansion of macro 'CONFIGURE_SHELL_USER_COMMANDS'
575 | CONFIGURE_SHELL_USER_COMMANDS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../posix/rtems_config.c:114:4: error: 'rtems_shell_IFCONFIG_Command' undeclared here (not in a function); did you mean 'rtems_shell_PCI_Command'?
114 | &rtems_shell_IFCONFIG_Command
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/junkes/MVME6100_testing/rtems/6/powerpc-rtems6/beatnik/lib/include/rtems/shellconfig.h:575:7: note: in expansion of macro 'CONFIGURE_SHELL_USER_COMMANDS'
575 | CONFIGURE_SHELL_USER_COMMANDS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [../../../../configure/RULES_BUILD:255: rtems_config.o] Error 1
make[4]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS/O.RTEMS-beatnik'
make[3]: *** [../../../configure/RULES_ARCHS:58: install.RTEMS-beatnik] Error 2
make[3]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom/RTEMS'
make[2]: *** [../../configure/RULES_DIRS:85: RTEMS.install] Error 2
make[2]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules/libcom'
make[1]: *** [../configure/RULES_DIRS:85: libcom.install] Error 2
make[1]: Leaving directory '/home/junkes/MVME6100_testing/EPICS/epics-base/modules'
make: *** [configure/RULES_DIRS:85: modules.install] Error 2On 2021-03-05 00:25, Vijay Kumar Banerjee wrote:
Hello Heinz,
I am starting this offlist thread to work together on the failing
EPICS build. I'm trying to get the EPICS to build with the following
commands:
I'm not sure this is the correct repo for RTEMS 6 though:
git clone git://git.launchpad.net/epics-base
make RTEMS_BASE=$RTEMS6_PREFIX RTEMS_VERSION=6
CROSS_COMPILER_TARGET_ARCHS=RTEMS-pc386-qemu
I'm getting the following error in build. Could you please tell me
what am I missing?
```
../env/envSubr.c: In function 'envGetInetPortConfigParam':
../env/envSubr.c:410:21: error: 'IPPORT_USERRESERVED' undeclared
(first use in this function); did you mean 'IPPORT_RESERVED'?
410 | if (epicsParam<=IPPORT_USERRESERVED || epicsParam>USHRT_MAX) {
| ^~~~~~~~~~~~~~~~~~~
| IPPORT_RESERVED
../env/envSubr.c:410:21: note: each undeclared identifier is reported
only once for each function it appears in
make[4]: *** [../../../../configure/RULES_BUILD:255: envSubr.o] Error 1
```
If I could build it with RTEMS 6 without libnetworking, then I will be
able to investigate what is crashing the build.
Best regards,
Vijay