Opened on 04/08/20 at 14:25:11
Closed on 04/28/20 at 08:41:36
#3944 closed defect (fixed)
qoriq_e500 BSP bset fails
Reported by: | Joel Sherrill | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | bsps | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Looks like curl isn't building for the qoriq_e500 bset. This seems like a weird outlier. Any ideas?
checking for gethostbyname for Minix 3... no checking for gethostbyname for eCos... no checking for gethostbyname for AmigaOS bsdsocket.library... no checking for gethostbyname in -lnetwork... no checking for gethostbyname in -lnet... no configure: error: couldn't find libraries for gethostbyname() shell cmd failed: /bin/sh -ex /home/joel/rtems-work/rtems-source-builder/rtems/build/curl-v7.65.1-powerpc-rtems5-1/do-build error: building curl-v7.65.1-powerpc-rtems5-1
Change History (14)
comment:1 follow-up: 5 Changed on 04/09/20 at 08:00:17 by Sebastian Huber
comment:2 Changed on 04/09/20 at 10:18:04 by Sebastian Huber
The configure check doesn't use the linker garbage collection and this leads to undefined symbols:
configure:6802: powerpc-rtems5-gcc -o conftest -qrtems -B/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/powerpc-rtems5/lib/ -B/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/powerpc-rtems5/qoriq_e500/lib/ --specs bsp_specs -mcpu=8540 -meabi -msdata=sysv -fno-common -mstrict-align -mspe -mabi=spe -mfloat-gprs=double -O2 -g -ffunction-sections -fdata-sections -I/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/powerpc-rtems5/qoriq_e500/lib/include -L/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/powerpc-rtems5/qoriq_e500/lib -mcpu=8540 -meabi -msdata=sysv -mstrict-align -mspe -mabi=spe -mfloat-gprs=double -L/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000/ftp/curl/build/rtems/bset-test/lib conftest.c -lbsd -lm -lz -lrtemsdefaultconfig >&5 /scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/bin/../lib/gcc/powerpc-rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/powerpc-rtems5/qoriq_e500/lib/libbsd.a(ofw_subr.c.18.o): in function `_bsd_ofw_parse_bootargs': /scratch/git-rtems-source-builder/rtems/build/rtems-libbsd-v816a2f912f414f39467a6be901a96159f806c01d-x86_64-linux-gnu-1/rtems-libbsd-816a2f912f414f39467a6be901a96159f806c01d/build/powerpc-rtems5-qoriq_e500-default/../../freebsd/sys/dev/ofw/ofw_subr.c:207: undefined reference to `boot_parse_cmdline' /scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/bin/../lib/gcc/powerpc-rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /scratch/git-rtems-source-builder/rtems/build/rtems-libbsd-v816a2f912f414f39467a6be901a96159f806c01d-x86_64-linux-gnu-1/rtems-libbsd-816a2f912f414f39467a6be901a96159f806c01d/build/powerpc-rtems5-qoriq_e500-default/../../freebsd/sys/dev/ofw/ofw_subr.c:207: undefined reference to `boothowto' /scratch/git-rtems-source-builder/rtems/build/rtems-libbsd-v816a2f912f414f39467a6be901a96159f806c01d-x86_64-linux-gnu-1/rtems-libbsd-816a2f912f414f39467a6be901a96159f806c01d/build/powerpc-rtems5-qoriq_e500-default/../../freebsd/sys/dev/ofw/ofw_subr.c:207:(.text._bsd_ofw_parse_bootargs+0x4a): unresolvable R_PPC_SDAREL16 relocation against symbol `boothowto' /scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000-staging/bin/../lib/gcc/powerpc-rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /scratch/git-rtems-source-builder/rtems/build/rtems-libbsd-v816a2f912f414f39467a6be901a96159f806c01d-x86_64-linux-gnu-1/rtems-libbsd-816a2f912f414f39467a6be901a96159f806c01d/build/powerpc-rtems5-qoriq_e500-default/../../freebsd/sys/dev/ofw/ofw_subr.c:207: undefined reference to `boothowto' /scratch/git-rtems-source-builder/rtems/build/rtems-libbsd-v816a2f912f414f39467a6be901a96159f806c01d-x86_64-linux-gnu-1/rtems-libbsd-816a2f912f414f39467a6be901a96159f806c01d/build/powerpc-rtems5-qoriq_e500-default/../../freebsd/sys/dev/ofw/ofw_subr.c:207:(.text._bsd_ofw_parse_bootargs+0x5a): unresolvable R_PPC_SDAREL16 relocation against symbol `boothowto'
comment:3 Changed on 04/09/20 at 12:01:34 by Sebastian Huber
I think the root cause for this and similar issues is that we have no reliable way to get the essential tool flags of an installed BSP. The new build system is supposed to fix this.
comment:4 follow-up: 6 Changed on 04/12/20 at 16:13:52 by Sebastian Huber
Why don't we add -Wl,--gc-sections to the standard linker flags?
comment:5 Changed on 04/28/20 at 05:13:43 by Chris Johns
Replying to Sebastian Huber:
The build picks up the installed compiler and not the new one of the build set. I think this is a known issue. The compiler is not in my $PATH. It was picked up by the default prefix. I will try it again with an empty prefix.
I am not sure how the PATH
is being set. The prepend path is set here ...
https://git.rtems.org/rtems-source-builder/tree/source-builder/sb/setbuilder.py#n422
... and this is the staging area. The build module does not play with the path and the defaults handles the prepend and postpend and extras ...
https://git.rtems.org/rtems-source-builder/tree/source-builder/defaults.mc#n267
I am confused. Maybe using --trace
and inspecting the variables would highlight the issue.
Is there something in gcc causing the prefix to used?
comment:6 Changed on 04/28/20 at 05:15:38 by Chris Johns
Replying to Sebastian Huber:
Why don't we add -Wl,--gc-sections to the standard linker flags?
Is this issue closed? I have been building the kernel and libbsd with the RSB as separate steps for the e500
and e6500_32
are did not see any failures.
comment:7 Changed on 04/28/20 at 05:29:54 by Sebastian Huber
The error was in curl. I sent a patch to fix this issue:
https://lists.rtems.org/pipermail/devel/2020-April/059305.html
comment:9 Changed on 04/28/20 at 06:50:26 by Sebastian Huber
The patch is not checked in, you wanted to adjust it a bit:
https://lists.rtems.org/pipermail/devel/2020-April/059311.html
comment:10 Changed on 04/28/20 at 06:51:40 by Sebastian Huber
I can send also a v2 if you like, I just found it would be easier if you adjust it yourself.
comment:12 Changed on 04/28/20 at 07:50:25 by Chris Johns
Does rtems_waf
need the change as well? Is libbsd
fixed?
comment:13 Changed on 04/28/20 at 07:55:04 by Sebastian Huber
Th rtems_waf and thus libbsd have another workaround to enable the linker garbage collection.
comment:14 Changed on 04/28/20 at 08:41:36 by Chris Johns <chrisj@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I tried to reproduce this issue and ended up with this local problem:
The build picks up the installed compiler and not the new one of the build set. I think this is a known issue. The compiler is not in my $PATH. It was picked up by the default prefix. I will try it again with an empty prefix.