Gpsd build issue in LinuxImageV2.7?

Hello,
with current LinuxImageV2.7 i’m not be able anymore to build package gpsd . When i bitbake gpsd i’m getting the following error:

| arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/home/res/develop/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -o gpsd -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/res/develop/oe-core/build/tmp-glibc/sysroots/apalis-imx6 -pthread -Wl,-rpath=/home/res/develop/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/gpsd/3.14-r0/gpsd-3.14 gpsd.o timehint.o shmexport.o dbusexport.o sd_socket.o -L. -L/home/res/develop/oe-core/build/tmp-glibc/sysroots/apalis-imx6/usr/lib -lrt -lbluetooth -ldbus-1 -lgpsd -lusb-1.0 -lbluetooth -lgps -lm -ldbus-1
| ./libgpsd.so: error: undefined reference to 'atan2'
| ./libgpsd.so: error: undefined reference to 'pow'
| ./libgpsd.so: error: undefined reference to 'sqrt'
| ./libgpsd.so: error: undefined reference to 'sin'
| ./libgpsd.so: error: undefined reference to 'cos'
| collect2: error: ld returned 1 exit status
| scons: *** [gpsctl] Error 1
| ./libgpsd.so: error: undefined reference to 'atan2'
| ./libgpsd.so: error: undefined reference to 'pow'
| ./libgpsd.so: error: undefined reference to 'sqrt'
| ./libgpsd.so: error: undefined reference to 'sin'
| ./libgpsd.so: error: undefined reference to 'cos'
| collect2: error: ld returned 1 exit status
| scons: *** [gpsd] Error 1
| scons: building terminated because of errors.
| ERROR: Function failed: do_compile (log file is located at /home/res/develop/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/gpsd/3.14-r0/temp/log.do_compile.62556)

For me it looks like an linker-issue. The basic math-functions seems to be missing, but linker-flag -lm is set.
Any hint how to fix this issue?

Hi

I could reproduce this here.
Using the bfd linker fixed it here, why I do not know.
E.g. you could add the following to the recipe:

--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb
@@ -52,6 +52,9 @@ EXTRA_OESCONS = " \
 # this cannot be used, because then chrpath is not found and only static lib is built
 # target=${HOST_SYS}
 
+# Workaround for linking issues seen with armv7a + gold
+LDFLAGS_append_arm = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
 do_compile_prepend() {
     export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
     export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"

Max

hi max,
thank you verry much for your reply.
with the bfd-linker the gpsd-package builds without problems
thanks and have a nice weekend
René