|
From: | Bas van Duijnhoven |
Subject: | Re: [gpsd-users] Error while compiling NAN undeclared in gpsdclient.c |
Date: | Tue, 01 May 2012 23:07:13 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
Gary, Just a short answer (i'm on my way to bed :)). your tip worked excellent: Every file that uses nan.h gives a warning that it is using case 1: ================================ #if __GNUC_PREREQ(3,3) # define NAN (__builtin_nanf ("")) #warning "case 1" ================================I'm no C-expert but it seems to me that NAN is defined by a builtin function __builtin_nanf("")
I checked the GCC documentation on this function: http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gcc/Other-Builtins.html This function is also supported in the ARM GCC compiler: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/BABICCBA.html Next i checked the version of GCC: ================================= gcc -v Using built-in specs. Target: arm-none-linux-gnueabiConfigured with: ../gcc-4.2/configure --build=i386-pc-linux-gnu --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/opt --disable-nls --disable-static --with-as=/home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-as --with-ld=/home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-ld --enable-languages=c,c++ --disable-multilib --enable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --enable-shared --enable-symvers=gnu --enable-__cxa_atexit
Thread model: posix gcc version 4.2.3 ================================= There are two possible problems i can see here: - the --build= directive specifies an Intel CPU- the directories defined by --with-as and --with-ld do not exist on my QNAP NAS. But i can't find any documentation on these commandline options.
Im stuck, any ideas (anyone?) gr Bas Op 1-5-2012 22:12, Gary E. Miller schreef:
Yo Bas! On Tue, 01 May 2012 21:55:20 +0200 Bas van Duijnhoven<address@hidden> wrote:I've made a full build-log from scons (see below, warning it's lengthy), as you can see there are some warnings and only one error.No earlier warnings in gpsdclient.c which is the part we are currently looking at. So nothing enligtening in the log. Esr may want to double check some of the alignment errors in the json code.Im still working on figuring out how to determine which NAN define is used, any tips?I would put this in each of the if cases: #warning "case X" Where X is 1, 2, 3, etc. That will emit a warning during compile so you can see what your ifdefs are doing. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701 address@hidden Tel:+1(541)382-8588
[Prev in Thread] | Current Thread | [Next in Thread] |