[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Git head broken
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] Git head broken |
Date: |
Tue, 26 Aug 2014 13:45:15 -0700 |
Yo Eric!
On Tue, 26 Aug 2014 00:07:56 -0400
"Eric S. Raymond" <address@hidden> wrote:
> Gary E. Miller <address@hidden>:
> > That builds for me. 10 seconds of testing show it seems to work
> > too.
>
> I think we may have tripped over a packaging error in some recent
> version of QtNetwork.
>
> The GPSD code - strange Qt shims and all - used to build with
> QtNetwork installed, and according to aptitude I still have it
> installed
>
> i A libqt4-network - Qt 4 network module
>
> However, pkg-config no longer finds information for this package
> or QtNetwork on my system, which SConstruct counted upon.
Not related to my issue.
> That's how I missed the build breakage. To prevent any future such
> incidents, I have added code which turns qt off when the library is
> not detected, triggering a message.
OK, but not related to my issue.
> I tried forcing qt on and still could not replicate the error. Gary,
> can you turn qt on and troubleshoot this?
As previously reported, the issue is including a C header file (libgps.h)
in a C++ file (libgps_core.c). Or maybe the C file (libgps_core.c) is
mistakenly being compiled as a C++ file.
This indicated a C file being compiles ad C++:
g++ -o libgps_core-qt.os -c -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized
-Wno-missing-field-initializers -Wcast-align -Wmissing-declarations
-Wpointer-arith -Wreturn-type -pthread -Wmissing-prototypes
-Wmissing-declarations -O2 -fPIC -DUSE_QT -DQT_SHARED -I/usr/include/qt4
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtCore libgps_core.c
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for
C/ObjC but not for C++ [enabled by default]
This indicates a C header file being used as a C++ header file:
In file included from libgps_core.c:18:0:
libgps.h:34:12: error: previous declaration of 'int json_ais_read(const char*,
char*, size_t, ais_t*, const char**)' with 'C++' linkage
extern int json_ais_read(const char *, char *, size_t, struct ais_t *,
^
In file included from libgps_core.c:19:0:
gps_json.h:41:28: error: conflicts with new declaration with 'C' linkage
/address@hidden@*/const char **);
^
scons: *** [libgps_core-qt.os] Error 1
My bet is scons has a bug in it and libgps_core.c should be compiled as C and
not C++.
I peeked at the SContruct file. It seems to me this is incorrect:
for src in libgps_sources:
if src not in
('ais_json.c','json.c','libgps_json.c','rtcm2_json.c','rtcm3_json.c','shared_json.c'):
compile_with = qt_env['CXX']
compile_flags = qt_flags
else:
Seems to me it should look at the extention, or at least include libgps_core.c
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
address@hidden Tel:+1(541)382-8588