hi dario,
i just tried to compile master and your patch. (heaving gpsd installed) here are some problems:
CC gps.o gps.c:41: error: 'gps' redeclared as different kind of symbol /usr/include/gps.h:127: error: previous definition of 'gps' was here gps.c: In function 'osmo_gpsd_cb': gps.c:73: warning: implicit declaration of function 'gps_waiting' gps.c: In function 'osmo_gpsd_open': gps.c:123: warning: implicit declaration of function 'gps_stream' gps.c:123: error: 'WATCH_ENABLE' undeclared (first use in this function) gps.c:123: error: (Each undeclared identifier is reported only once gps.c:123: error: for each function it appears in.)
1. the symbol "gps" is used as structure instance for struct osmo_gps. it is also used in an enum declaration at /usr/include/gps.h:
... enum {gps, glonass, unknown} system; ...
2. the declarations 'gps_waiting', 'gps_stream', 'WATCH_ENABLE' are not defined at gps.h
this is maybe one reason why i failed to write gpsd support. symbols in the howtos and examples were missing. here is the latest version i got from the gentoo repository:
* sci-geosciences/gpsd Latest version available: 2.32 Latest version installed: 2.32 Size of files: 603 kB Homepage: http://gpsd.berlios.de/ Description: GPS daemon and library to support USB/serial GPS devices and various GPS/mapping clients. License: BSD
any ideas?
andreas
On 02/22/2011 12:10 PM, Andreas.Eversberg wrote:
hi dario,
i just tried to compile master and your patch. (heaving gpsd installed) here are some problems:
CC gps.o gps.c:41: error: 'gps' redeclared as different kind of symbol /usr/include/gps.h:127: error: previous definition of 'gps' was here gps.c: In function 'osmo_gpsd_cb': gps.c:73: warning: implicit declaration of function 'gps_waiting' gps.c: In function 'osmo_gpsd_open': gps.c:123: warning: implicit declaration of function 'gps_stream' gps.c:123: error: 'WATCH_ENABLE' undeclared (first use in this function) gps.c:123: error: (Each undeclared identifier is reported only once gps.c:123: error: for each function it appears in.)
- the symbol "gps" is used as structure instance for struct osmo_gps.
it is also used in an enum declaration at /usr/include/gps.h:
... enum {gps, glonass, unknown} system; ...
- the declarations 'gps_waiting', 'gps_stream', 'WATCH_ENABLE' are not
defined at gps.h
Everything works for me:
ironlady:~/Projects/mobile/osmocom/src$ ironlady:~/Projects/mobile/osmocom/src$ ironlady:~/Projects/mobile/osmocom/src$ grep system /usr/include/gps.h * Values for "system" fields. Note, the encoding logic is senstive to the int system; int system; /* Which system is it? */ int system; /* Which system is it? */ ironlady:~/Projects/mobile/osmocom/src$ ironlady:~/Projects/mobile/osmocom/src$
The enum you said is not present in my gpsd include. Instead I have
/* * Values for "system" fields. Note, the encoding logic is senstive to the * actual values of these; it's not sufficient that they're distinct. */ #define NAVSYSTEM_GPS 0 #define NAVSYSTEM_GLONASS 1 #define NAVSYSTEM_GALILEO 2 #define NAVSYSTEM_UNKNOWN 3
The symbols you miss, can be found on my system.
ironlady:~/Projects/mobile/osmocom/src$ grep gps_waiting /usr/include/gps.h extern bool gps_waiting(struct gps_data_t *); ironlady:~/Projects/mobile/osmocom/src$ grep gps_stream /usr/include/gps.h extern int gps_stream(struct gps_data_t *, unsigned int, /*@null@*/void *); ironlady:~/Projects/mobile/osmocom/src$ grep WATCH_ENABLE /usr/include/gps.h #define WATCH_ENABLE 0x0001u /* enable streaming */ ironlady:~/Projects/mobile/osmocom/src$ ironlady:~/Projects/mobile/osmocom/src$ ironlady:~/Projects/mobile/osmocom/src$
this is maybe one reason why i failed to write gpsd support. symbols in the howtos and examples were missing. here is the latest version i got from the gentoo repository:
- sci-geosciences/gpsd Latest version available: 2.32 Latest version installed: 2.32 Size of files: 603 kB Homepage: http://gpsd.berlios.de/ Description: GPS daemon and library to support USB/serial GPS
devices and various GPS/mapping clients. License: BSD
any ideas?
My gpsd version is much more recent:
ironlady:~/Projects/mobile/osmocom/src$ rpm -q gpsd gpsd-2.95-2.fc14.i686 ironlady:~/Projects/mobile/osmocom/src$
On 02/22/2011 02:32 PM, Sylvain Munaut wrote:
Then try to find what's the minimum version (see api changes in the gpsd history I guess) and make sure in the configure to check it.
Nice suggestion. I will add this feature and submit a new version of the patch. This means that Andreas will not be able to compile the support anymore, until its debian gets aligned :).
Dario
Nice suggestion. I will add this feature and submit a new version of the patch. This means that Andreas will not be able to compile the support anymore, until its debian gets aligned :).
Well, the current situation is _worse_ ... it tries to compile the support and fails ...
And it's gentoo not debian :) Also if you enable the support of experimental packages for gpsd, it does install the 2.95
Cheers,
Sylvain
baseband-devel@lists.osmocom.org