[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Problem compiling gpsd without ipv6 support
From: |
Mick Durkin |
Subject: |
Re: [gpsd-dev] Problem compiling gpsd without ipv6 support |
Date: |
Tue, 08 Oct 2013 20:02:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Hi Gary,
On 07/10/13 22:32, Gary E. Miller wrote:
Yo Mick!
On Mon, 7 Oct 2013 18:45:28 +0100 (BST)
Mick Durkin <address@hidden> wrote:
The compile failed with this error:-
gcc -o gpsd.o -c -D_GNU_SOURCE -O2 -pthread -I/usr/include/libusb-1.0
gpsd.c gpsd.c: In function 'passivesock_af':
gpsd.c:402:5: error: 'sockaddr_t' has no member named 'sa_in6'
scons: *** [gpsd.o] Error 1
scons: building terminated because of errors.
Good catch. Pushed to git head.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
address@hidden Tel:+1(541)382-8588
Thanks for that. I have noticed subsequently that if I run "scons
splint", it moans about unreachable code. I didn't run that option when
I was fixing the original error as I am new to the scons build process
and was unaware of how to do so.
The "scons splint" error block for gpsd.c I see is this:-
======================================
gpsd.c: (in function passivesock_af)
gpsd.c:402:2: Unreachable code: sat.sa_in6.sin6_...
This code will never be reached on any possible execution. (Use
-unreachable
to inhibit warning)
gpsd.c:413:13: Unrecognized identifier: PF_INET6
Identifier used in code has not been declared. (Use -unrecog to inhibit
warning)
gpsd.c:423:24: Unrecognized identifier: IPPROTO_IPV6
gpsd.c:423:38: Unrecognized identifier: IPV6_V6ONLY
gpsd.c: (in function main)
gpsd.c:2128:23: Passed storage &rfds not completely defined:
gpsd_await_data (&rfds, ...)
Storage derivable from a parameter, return value or global is not
defined.
Use /address@hidden@*/ to denote passed or returned storage which need not be
defined.
(Use -compdef to inhibit warning)
gpsd.c:2128:47: Passed storage &oldset not completely defined:
gpsd_await_data (..., &oldset, ...)
gpsd.c:1761:22: Variable blockset declared but not used
A variable is declared but never used. Use /address@hidden@*/ in front of
declaration to suppress message. (Use -varuse to inhibit warning)
======================================
I can see that the line 402 to 423 errors are to do with what code is
"hidden" or not when running splint and is triggered by my change. I'm
not sure how to clear these errors as I don't clearly understand what
all this section is supposed to do.
The code compiles cleanly with the options "ipv6 true" or "ipv6 false"
and the problem seems only to relates to the "workarounds" invoked when
we run splint.
I suspect that running splint conditions out something earlier in the
file (e.g. lines 30-40, which has includes for socket.h and other files)
which leaves out some vital definitions, but I don't want to mess with
what I don't understand clearly.
Perhaps you or one of the other developers might be able to solve the
problem.
If not, maybe we need to back out my original suggested fix?
I don't know about the errors in the other places (lines 1761 and 2128);
they don't seem to relate to my change.
Sorry for the confusion.
BR
Mick