libbsd fails to link on i386

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Tue Sep 20 17:42:56 UTC 2022


Hi Joel,



Sorry for the long delay.

I tried to reproduce the error locally. For me building rtems and rtems-libbsd 
master for pc386 and pc686 works.

I get some undefined references for the 6-freebsd-12 branch though.

Which branch of rtems-libbsd did you use?



Best regards,



    Jan





From: devel <devel-bounces at rtems.org> On Behalf Of Jan.Sommer at dlr.de
Sent: Thursday, August 18, 2022 8:09 PM
To: joel at rtems.org; devel at rtems.org
Subject: RE: libbsd fails to link on i386



Hi Joel,



I remember I spent some time fiddling with the bus.h include order.

I can try to have a look at it some time next week.



Best regards,



    Jan



From: devel < <mailto:devel-bounces at rtems.org> devel-bounces at rtems.org> On 
Behalf Of Joel Sherrill
Sent: Wednesday, August 17, 2022 11:24 PM
To:  <mailto:rtems-devel at rtems.org> rtems-devel at rtems.org < 
<mailto:devel at rtems.org> devel at rtems.org>
Subject: libbsd fails to link on i386



Hi



I think the wrong bus.h must be being included somewhere. These are static 
inline methods on the i386. Hopefully a simple patch for someone who knows 
what to do:



[1992/2039] Linking build/i386-rtems6-pc386-default/ftpd01.exe
/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

/home/joel/rtems-work/tools/6/lib/gcc/i386-rtems6/12.1.1/../../../../i386-rtems6/bin/ld: 
./libbsd.a(rtems-kernel-bus-dma.c.20.o): in function `_bsd_bus_dmamem_alloc':
/home/joel/rtems-work/rtems-libbsd/build/i386-rtems6-pc386-default/../../rtemsbsd/rtems/rtems-kernel-bus-dma.c:264: 
undefined reference to `bsp_bus_space_write_1'
collect2: error: ld returned 1 exit status

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220920/ad9f6932/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6402 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220920/ad9f6932/attachment.bin>


More information about the devel mailing list