|
From: | Kuhn, Thomas J (IS) |
Subject: | [gpsd-users] Cross Compiling gpsd using Sourcery G++ |
Date: | Wed, 20 Jan 2016 21:09:03 +0000 |
Hi everyone, Thanks for taking a moment to see if you can give me a hand. I am not very experienced in Linux and using scons. I really just started getting into Linux development (I’m a windows dev usually) in the last 2 months.
So I am trying to update our old version of gpsd with the latest and greatest. There were no instructions from years ago when it was originally compiled, so now I am trying to do t from scratch. I have the latest 3.16 release and can
build it with no problems. I am getting confused when trying to cross compile it. I have read the build.txt file and made the .scons-option-cache file following the example in there. Below is the output of the .scons-option-cache file and my attempt to
build. My guess is that the –I is pointing to /usr… which is causing the current issue at hand. I have looked around for a while for how to change what directories scons uses. I have become completely lost. I most likely do not have the directories
correct on the .scons-option-cache file. Is there any advice anyone can give me? Tom ------------------------------------------------------------------------------------------ The location of the Sorcery G++ tools are: /home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/ address@hidden:~/workspace/ipu/gpsd-3.16$ cat .scons-option-cache libgpsmm = False python = False prefix = '/home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/' target = 'arm-none-linux-gnueabi' sysroot = '/home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/' address@hidden:~/workspace/ipu/gpsd-3.16$ scons scons: Reading SConscript files ... Checking if compiler accepts -Wextra ...(cached) yes Checking if compiler accepts -Wall ...(cached) yes Checking if compiler accepts -Wno-uninitialized ...(cached) yes Checking if compiler accepts -Wno-missing-field-initializers ...(cached) yes Checking if compiler accepts -Wcast-align ...(cached) yes Checking if compiler accepts -Wmissing-declarations ...(cached) yes Checking if compiler accepts -Wstrict-prototypes ...(cached) yes Checking if compiler accepts -Wpointer-arith ...(cached) yes Checking if compiler accepts -Wreturn-type ...(cached) yes Checking if compiler accepts -pthread ...(cached) yes Checking whether the C++ compiler works... (cached) yes Checking for ncurses... (cached) yes Checking for tinfo... (cached) yes Checking for libusb-1.0... (cached) yes Checking for C library librt... (cached) yes Checking for dbus-1... (cached) yes Checking for bluez... (cached) yes Checking for C type in_port_t... (cached) no Did not find in_port_t typedef, assuming unsigned short int Checking whether SUN_LEN is declared... (cached) yes Checking for C header file linux/can.h... (cached) yes You have kernel CANbus available. Checking if compiler is C11 ...(cached) no Checking for C header file libkern/OSAtomic.h... (cached) no No memory barriers - SHM export and time hinting may not be reliable. Checking if compiler supplies __ORDER_BIG_ENDIAN__ ...(cached) no Checking for C header file endian.h... (cached) yes Checking for C function daemon()... (cached) no Checking for C function strlcpy()... (cached) no Checking for C function strlcat()... (cached) no Checking for C function clock_gettime()... (cached) no Checking for C library libbluetooth... (cached) no libbluetooth not found, bluez cannot be enabled. Checking for C library libdbus-1... (cached) no libdbus-1 not found, dbus_export cannot be enabled. Checking for C header file sys/timepps.h... (cached) no Checking if sys/ioctl.h supplies TIOCMIWAIT ...(cached) no Forcing pps=no (neither TIOCMIWAIT nor RFC2783 API is available) Checking that xsltproc can make man pages... (cached) yes Checking for QtNetwork... (cached) yes Altered configuration variables: pps = False (default True): PPS time syncing support libgpsmm = False (default True): build C++ bindings python = False (default True): build Python support and modules. prefix = /home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/ (default /usr/local): installation directory prefix target = arm-none-linux-gnueabi (default ): cross-development target sysroot = /home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/ (default ): cross-development system root GPS regression tests suppressed because socket_export or python is off. Part of the website build requires asciidoc, not installed. scons: done reading SConscript files. scons: Building targets ... substituter(["jsongen.py"], ["jsongen.py.in"]) chmod -w jsongen.py chmod +x jsongen.py rm -f ais_json.i && /usr/bin/python jsongen.py --ais --target=parser > ais_json.i && chmod a-w ais_json.i Creating 'gpsd_config.h' arm-none-linux-gnueabi-gcc -o ais_json.os -c -Wmissing-prototypes --sysroot=/home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/ -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align
-Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wreturn-type -pthread -Wmissing-declarations -O2 -pthread -fPIC -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include ais_json.c cc1: warning: include location "/usr/include/dbus-1.0" is unsafe for cross-compilation In file included from ais_json.c:19: gpsd_config.h:309: error: redefinition of 'struct timespec' gpsd_config.h:315: error: conflicting types for 'clock_gettime' /home/kuhnto/workspace/ipu/ipu/ext/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc//usr/include/time.h:336: note: previous declaration of 'clock_gettime' was here scons: *** [ais_json.os] Error 1 scons: building terminated because of errors. address@hidden:~/workspace/ipu/gpsd-3.16$ Tom Kuhn
Northrop Grumman Mission Systems |
[Prev in Thread] | Current Thread | [Next in Thread] |