gpsd: fix build on aarch64
PATCH 1/1 gpsd: fix build on aarch64
Explicitly add ${CC} as linker, for it to understand -Wl option.
---
Alistair please check in your setup :)
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +3 -0
@@ -35,6 +35,7 @@ EXTRA_OESCONS = " \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ manbuild='false' \ + LINK='${CC}' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only static lib is built
@@ -44,6 +45,7 @@ do_compile_prepend() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" }
@@ -51,6 +53,7 @@ do_install() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" export DESTDIR="${D}"
Signature · 1 line
2.26.2
Quoted 7 lines · Sean Nyekjaer
Explicitly add ${CC} as linker, for it to understand -Wl option.
Signed-off-by Sean Nyekjaer <[email protected]>---
Alistair please check in your setup :)
I had found the same error on dragonboard/arm64. This patch fixes the build problem. Note that I have only done build test, not run time. thanks!
Quoted 41 lines
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +1
-0@@ -35,6 +35,7 @@ EXTRA_OESCONS = " \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ manbuild='false' \ + LINK='${CC}' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only staticlib is built
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +0
-0@@ -44,6 +45,7 @@ do_compile_prepend() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" exportPKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +1
-0+ export LD="${CC}" export LINKFLAGS="${LDFLAGS}" }@@ -51,6 +53,7 @@ do_install() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" exportPKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" export DESTDIR="${D}"--
2.26.2
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'
going back to 3.19 fixes both issues (so it's not caused by my setup).
Quoted 59 lines · Nicolas Dechesne
Quoted 7 lines · Sean Nyekjaer
Explicitly add ${CC} as linker, for it to understand -Wl option.
Signed-off-by Sean Nyekjaer <[email protected]>---
Alistair please check in your setup :)
I had found the same error on dragonboard/arm64. This patch fixes the build problem. Note that I have only done build test, not run time. thanks!
Quoted 41 lines
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +1
-0@@ -35,6 +35,7 @@ EXTRA_OESCONS = " \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ manbuild='false' \ + LINK='${CC}' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only staticlib is built
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +0
-0@@ -44,6 +45,7 @@ do_compile_prepend() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" exportPKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +1
-0+ export LD="${CC}" export LINKFLAGS="${LDFLAGS}" }@@ -51,6 +53,7 @@ do_install() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" exportPKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" export DESTDIR="${D}"--
2.26.2
Quoted 5 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'
Perhaps also set LDFLAGS = "-pthread"
Quoted 72 lines
going back to 3.19 fixes both issues (so it's not caused by my setup).
On Fri, May 15, 2020 at 2:24 PM Nicolas Dechesne <[email protected] <mailto:[email protected]>> wrote:
On Fri, May 15, 2020 at 2:14 PM Sean Nyekjaer <[email protected] <mailto:[email protected]>> wrote: Explicitly add ${CC} as linker, for it to understand -Wl option. Signed-off-by: Sean Nyekjaer <[email protected] <mailto:[email protected]>> --- Alistair please check in your setup :) I had found the same error on dragonboard/arm64. This patch fixes the build problem. Note that I have only done build test, not run time. thanks! meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb <http://gpsd_3.20.bb> | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb <http://gpsd_3.20.bb> b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb <http://gpsd_3.20.bb> index 0914f7ec2..5463c8231 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb <http://gpsd_3.20.bb> +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb <http://gpsd_3.20.bb> @@ -35,6 +35,7 @@ EXTRA_OESCONS = " \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ manbuild='false' \ + LINK='${CC}' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only static lib is built @@ -44,6 +45,7 @@ do_compile_prepend() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" } @@ -51,6 +53,7 @@ do_install() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" export DESTDIR="${D}" -- 2.26.2
Quoted 11 lines · Khem Raj
Quoted 5 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'Perhaps also set LDFLAGS = "-pthread"
Seems fine in my builds:
arm-oe-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0 ppsthread.c
and
aarch64-oe-linux-gcc -march=armv8-a+crc --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot -o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0 ppsthread.c
By now, Scons is my favorite build system :-D
/Sean
It looks like an issue when re-configuring in the same WORKDIR.
Looking at config.log in failing build I see:
file BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/gpsd-3.20/SConstruct,line 669:
Configure(confdir = .sconf_temp)
scons: Configure: Checking whether the C compiler works...
scons: Configure: ".sconf_temp/conftest_0.c" is up to date.
scons: Configure: The original builder output was:
|.sconf_temp/conftest_0.c <-
| |
| |int main(void)
| |{
| | return 0;
| |}
| |
|arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-o .sconf_temp/conftest_0.o -c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_0.c
arm-webos-linux-gnueabi-gcc: error: .sconf_temp/conftest_0.c: No such file
or directory
arm-webos-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
scons: Configure: no
scons: Configure: Checking if compiler accepts -pthread...
scons: Configure: ".sconf_temp/conftest_1.c" is up to date.
scons: Configure: The original builder output was:
|.sconf_temp/conftest_1.c <-
| |
| | int main(int argc, char **argv) {
| | (void) argc; (void) argv;
| | return 0;
| | }
| |
|arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-o .sconf_temp/conftest_1.o -c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_1.c
arm-webos-linux-gnueabi-gcc: error: .sconf_temp/conftest_1.c: No such file
or directory
arm-webos-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
scons: Configure: no
If I clean it first with:
bitbake -c cleansstate gpsd; bitbake -c compile gpsd then config.log looks OK and gpsd builds OK
file BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/gpsd-3.20/SConstruct,line 669:
Configure(confdir = .sconf_temp)
scons: Configure: Checking whether the C compiler works... .sconf_temp/conftest_0.c <-
|
|int main(void)
|{
| return 0;
|}
|arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-o .sconf_temp/conftest_0.o -c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_0.c
cc1: warning: command-line option '-fvisibility-inlines-hidden' is valid
for C++/ObjC++ but not for C
scons: Configure: yes
scons: Configure: Checking if compiler accepts -pthread... .sconf_temp/conftest_1.c <-
|
| int main(int argc, char **argv) {
| (void) argc; (void) argv;
| return 0;
| }
|arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-o .sconf_temp/conftest_1.o -c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_1.c
cc1: warning: command-line option '-fvisibility-inlines-hidden' is valid
for C++/ObjC++ but not for C
arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot
-o .sconf_temp/conftest_1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-Wl,-z,relro,-z,now --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot .sconf_temp/conftest_1.o -L. -LBUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/lib
scons: Configure: yes
Quoted 81 lines · Sean Nyekjaer
Quoted 12 lines · Khem Raj
Quoted 6 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'Perhaps also set LDFLAGS = "-pthread"
Seems fine in my builds:
arm-oe-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard
(quoted diff) +0
-17-mcpu=cortex-a7 --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0
ppsthread.cand
aarch64-oe-linux-gcc -march=armv8-a+crc --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot
(quoted diff) +0
-15-o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0
ppsthread.cBy now, Scons is my favorite build system :-D
/Sean
Quoted 3 lines · Martin Jansa
It looks like an issue when re-configuring in the same WORKDIR.
Mark it CLEANBROKEN = "1"
Quoted 132 lines
Looking at config.log in failing build I see:
file BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/gpsd-3.20/SConstruct,line 669:
Configure(confdir = .sconf_temp)
scons: Configure: Checking whether the C compiler works...
scons: Configure: ".sconf_temp/conftest_0.c" is up to date.
scons: Configure: The original builder output was:|.sconf_temp/conftest_0.c <- | | | |int main(void) | |{ | | return 0; | |} | | |arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o
.sconf_temp/conftest_0.o-c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_0.carm-webos-linux-gnueabi-gcc: error:.sconf_temp/conftest_0.c: No such file or directory
arm-webos-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
scons: Configure: noscons: Configure: Checking if compiler accepts -pthread...
scons: Configure: ".sconf_temp/conftest_1.c" is up to date.
scons: Configure: The original builder output was:|.sconf_temp/conftest_1.c <- | | | | int main(int argc, char **argv) { | | (void) argc; (void) argv; | | return 0; | | } | | |arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o
.sconf_temp/conftest_1.o-c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_1.carm-webos-linux-gnueabi-gcc: error:.sconf_temp/conftest_1.c: No such file or directory
arm-webos-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
scons: Configure: noIf I clean it first with:
bitbake -c cleansstate gpsd; bitbake -c compile gpsd then config.log looks OK and gpsd builds OKfile BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/gpsd-3.20/SConstruct,line 669:
Configure(confdir = .sconf_temp)
scons: Configure: Checking whether the C compiler works....sconf_temp/conftest_0.c<-| |int main(void) |{ | return 0; |} |arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o
.sconf_temp/conftest_0.o-c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_0.c
cc1: warning: command-line option '-fvisibility-inlines-hidden' is valid for C++/ObjC++ but not for C
scons: Configure: yesscons: Configure: Checking if compiler accepts -pthread...
.sconf_temp/conftest_1.c<-| | int main(int argc, char **argv) { | (void) argc; (void) argv; | return 0; | } |arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o
.sconf_temp/conftest_1.o-c --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -fstack-protector-strong -O2.sconf_temp/conftest_1.c
cc1: warning: command-line option '-fvisibility-inlines-hidden' is valid for C++/ObjC++ but not for C
arm-webos-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o .sconf_temp/conftest_1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --sysroot=BUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot.sconf_temp/conftest_1.o-L. -LBUILD/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/lib
scons: Configure: yesQuoted 63 lines · Sean Nyekjaer
Quoted 12 lines · Khem Raj
Quoted 6 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'Perhaps also set LDFLAGS = "-pthread"
Seems fine in my builds:
arm-oe-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard
(quoted diff) +0
-17-mcpu=cortex-a7 --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/cortexa7t2hf-neon-oe-linux-gnueabi/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0
ppsthread.cand
aarch64-oe-linux-gcc -march=armv8-a+crc --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot
(quoted diff) +0
-15-o ppsthread.o -c --sysroot=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot -pthread -Wall -Wcast-align -Wextra -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wvla -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0=/usr/src/debug/gpsd/3.20-r0 -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot= -fdebug-prefix-map=/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -O2 -pthread -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/dbus-1.0 -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/lib/dbus-1.0/include -I/home/sean/development/cc/yoctobuild/tmp-glibc/work/aarch64-oe-linux/gpsd/3.20-r0/recipe-sysroot/usr/include/libusb-1.0
ppsthread.cBy now, Scons is my favorite build system :-D
/Sean
Quoted 8 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'going back to 3.19 fixes both issues (so it's not caused by my setup).
...
The root cause of all these problems is likely:
...
DEBUG: Executing shell function do_compile
scons: Reading SConscript files ... This system is: linux
Checking whether the C compiler works... no
ERROR: CC doesn't work
Checking if compiler accepts -pthread... no
...
cu
Adrian
Quoted 12 lines · Adrian Bunk
Quoted 8 lines · Martin Jansa
I was seeing this issue also on arm (raspberrypi4), so it's not specific to aarch64 as subject says.
With this fix I'm still seeing build failure:
| ppsthread.c:1281: error: undefined reference to 'pthread_create'going back to 3.19 fixes both issues (so it's not caused by my setup).
...The root cause of all these problems is likely:
Quoted 8 lines
...
DEBUG: Executing shell functiondo_compile
scons: Reading SConscript files ... This system is: linux
Checking whether the C compiler works... no
ERROR: CC doesn't work
Checking if compiler accepts -pthread... no
...
I have tested both with a aarch64 and cortexa7t2hf build. Both of them show:
Checking whether the C compiler works... yes
/Sean
Quoted 7 lines · Sean Nyekjaer
Explicitly add ${CC} as linker, for it to understand -Wl option.
Signed-off-by Sean Nyekjaer <[email protected]>---
Alistair please check in your setup :)
Thanks! This fixes the build for me.
Alistair
Quoted 35 lines
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 3 +++ 1 file changed, 3 insertions(+)meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +3
-1@@ -35,6 +35,7 @@ EXTRA_OESCONS = " \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ manbuild='false' \ + LINK='${CC}' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only static lib is built@@ -44,6 +45,7 @@ do_compile_prepend() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" }@@ -51,6 +53,7 @@ do_install() { export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" export LINKFLAGS="${LDFLAGS}" export DESTDIR="${D}" --2.26.2