Re: [oe] [meta-oe] gpsd fails to compile due to scons-generated malformed command line

2016-06-29 Thread Schäfer-Hutter
FYI:

I had to patch the SConstruct file of gpsd like follows.

The first fix avoids double-quoting of the CPPFLAGS and the second
avoids calling ncurses5-config since that will end-up trying to link
the native x86-version of the ncurses library with cross-compiled
binaries.

--- a/SConstruct2016-06-28 18:33:37.404158765 +0200
+++ b/SConstruct2016-06-28 19:48:53.596024256 +0200
@@ -236,7 +236,7 @@
 env.Replace(**{j: os.getenv(i)})
 for flags in ["LDFLAGS", "LINKFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
 if os.environ.has_key(flags):
-env.MergeFlags({flags : [os.getenv(flags)]})
+env.MergeFlags({flags : [Split(os.getenv(flags))]})

 # Keep scan-build options in the environment
 for key, value in os.environ.iteritems():
@@ -455,7 +454,7 @@
 if config.CheckPKG('ncurses'):
 ncurseslibs = pkg_config('ncurses')
 elif config.CheckExecutable('ncurses5-config --version',
'ncurses5-config'):
-ncurseslibs = ['!ncurses5-config --libs --cflags']
+ncurseslibs = ['-lncurses']
 elif sys.platform.startswith('freebsd'):
 ncurseslibs= [ '-lncurses' ]
 elif sys.platform.startswith('openbsd'):


2016-06-15 11:47 GMT+02:00 Schäfer-Hutter <schaefer.hut...@gmail.com>:
> Hi there,
>
> I'm getting the following error when trying to compile gpsd:
>
> | arm-linux-gnueabihf-gcc -march=armv7-a -marm -mthumb-interwork
> -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
> --sysroot=/home/ashaepe/yocto/tmn2000/build/arago-tmp-external-linaro-toolchain/sysroots/k2l-evm
> -o bits.os -c 
> -isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
> -Wno-error=unused-value -fstack-protector -O2 -pipe -g
> -feliminate-unused-debug-types -D_GNU_SOURCE
> --sysroot=/home/ashaepe/yocto/tmn2000/build/arago-tmp-external-linaro-toolchain/sysroots/k2l-evm
> -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers
> -Wcast-align -Wmissing-declarations -Wmissing-prototypes
> -Wstrict-prototypes -Wpointer-arith -Wreturn-type -g -O0 -fPIC "
> -isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
> -Wno-error=unused-value -fstack-protector" bits.c
> | arm-linux-gnueabihf-gcc: error:
> -isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
> -Wno-error=unused-value -fstack-protector: No such file or directory
> | scons: *** [bits.os] Error 1
>
> Obviously the command line part in double quotes ("
> -isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
> -Wno-error=unused-value -fstack-protector") is wrongly placed/repeated
> by SCons.
>
> But I'm lost finding a reason for this behaviour? Any hint would be
> appreciated greatly...
>
> Regards,
>   Peter
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe] gpsd fails to compile due to scons-generated malformed command line

2016-06-15 Thread Schäfer-Hutter
Hi there,

I'm getting the following error when trying to compile gpsd:

| arm-linux-gnueabihf-gcc -march=armv7-a -marm -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
--sysroot=/home/ashaepe/yocto/tmn2000/build/arago-tmp-external-linaro-toolchain/sysroots/k2l-evm
-o bits.os -c 
-isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
-Wno-error=unused-value -fstack-protector -O2 -pipe -g
-feliminate-unused-debug-types -D_GNU_SOURCE
--sysroot=/home/ashaepe/yocto/tmn2000/build/arago-tmp-external-linaro-toolchain/sysroots/k2l-evm
-Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers
-Wcast-align -Wmissing-declarations -Wmissing-prototypes
-Wstrict-prototypes -Wpointer-arith -Wreturn-type -g -O0 -fPIC "
-isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
-Wno-error=unused-value -fstack-protector" bits.c
| arm-linux-gnueabihf-gcc: error:
-isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
-Wno-error=unused-value -fstack-protector: No such file or directory
| scons: *** [bits.os] Error 1

Obviously the command line part in double quotes ("
-isystem/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/include
-Wno-error=unused-value -fstack-protector") is wrongly placed/repeated
by SCons.

But I'm lost finding a reason for this behaviour? Any hint would be
appreciated greatly...

Regards,
  Peter
-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel