Opened 10 years ago

Closed 9 years ago

#620 closed defect/bug (fixed)

OpenMoko SHR built with old libgps

Reported by: gabor Owned by: kazer
Priority: blocker Milestone: version 0.2.0
Component: core Version: git master
Severity: Keywords: openmoko shr gpsd
Cc: gabor.laszlo@…

Description

I know there are past tickets relating to this, but I'm getting sick of this problem being ignored/brushed off, it makes Navit useless on SHR. So here it is again:

Platform: OM GTA02 running SHR Testing from 04.05.2010

Navit version: 1:0.1.0+svnr3495, downloaded from the repo with opkg install navit

Locale: set to LANG=de_DE.UTF-8

Config: default except for mapset:

<mapset enabled="yes">

<map type="binfile" enabled="yes" data="~/Maps/germany.navit.bin"/>

</mapset>

Libraries:

opkg install libgps19 ln -s /usr/lib/libgps.so.19 /usr/lib/libgps.so.17

Symptoms: starting navit from the console produces following output:

navit:plugin_load:can't load '/usr/lib/navit/vehicle/libvehicle_gpsd.so', Error '/usr/lib/navit/vehicle/libvehicle_gpsd.so: undefined symbol: gps_query'
navit:vehicle_new:invalid type 'gpsd'
navit:main_real:Using '/home/root/.navit/navit.xml'

Navit runs, shows map and seems to work but does not show vehicle position, so tracking/routing is not possible.

On the same device, TangoGPS works perfectly.

HOW HARD CAN IT BE TO GET THIS RIGHT?

Change History (10)

comment:1 Changed 10 years ago by gabor

  • Cc gabor.laszlo@… added

comment:2 Changed 10 years ago by richt

  • Summary changed from OpenMoko SHR gpsd FAIL to OpenMoko SHR built with old libgps

libgps version 0.19 is special cased in the source:

#ifdef HAVE_LIBGPS19

gps_stream(priv->gps, WATCH_ENABLE | WATCH_NEWSTYLE, NULL);

#else

gps_query(priv->gps, priv->gpsd_query);

#endif

A temporary solution would be to install an older libgps. I don't know anything about SHR development, it might be possible to produce builds for both, or make it a run time check?

If everything else works it would probably compile fairly easily if you have/can get a build chain working.

comment:3 Changed 10 years ago by gabor

SHR only offers the latest version of packets, so there's no simple way to use e.g. libgps17. In any case, Navit seems to think he's talking to libgps17 (I had to symlink the .so or else Navit wouldn't even start).

comment:4 Changed 10 years ago by gabor

Tested again with the latest (3507) build:

root@om-gta02 ~ $ ls -l /usr/lib/libgps.so.1*
lrwxrwxrwx    1 root     root           16 Jul 15 11:39 /usr/lib/libgps.so.19 -> libgps.so.19.0.0
-rwxr-xr-x    1 root     root       215296 Apr 22 01:58 /usr/lib/libgps.so.19.0.0
root@om-gta02 ~ $ navit
navit:plugin_load:can't load '/usr/lib/navit/vehicle/libvehicle_gpsd.so', Error 'libgps.so.17: cannot open shared object file: No such file or directory'
navit:vehicle_new:invalid type 'gpsd'
navit:main_real:Using '/home/root/.navit/navit.xml'

Navit runs, but gets no fix

root@om-gta02 ~ $ ln -s /usr/lib/libgps.so.19 /usr/lib/libgps.so.17
root@om-gta02 ~ $ navit
navit:plugin_load:can't load '/usr/lib/navit/vehicle/libvehicle_gpsd.so', Error '/usr/lib/navit/vehicle/libvehicle_gpsd.so: undefined symbol: gps_query'
navit:vehicle_new:invalid type 'gpsd'
navit:main_real:Using '/home/root/.navit/navit.xml'

Navit runs, but gets no fix

comment:5 follow-up: Changed 9 years ago by mvglasow (2)

the problem seems quite obvious to me: the libgps version is cased in the source using #ifdef, which gets evaluated at compile time. That is, the repo version was built against libgps 0.17 and will only work if that version (or a compatible one) is present on the target system. The symlink fix will not work as the API has changed.

The only solution would be to build navit against libgps 0.19, i.e. on a system having the required version of the dev package installed.

comment:6 follow-up: Changed 9 years ago by gabor

Could this check be made at runtime? That way there would be no need to build different versions. Until that patch happens, does this mean that I could just build a toolchain, compile against v19 and bet it to work?

comment:7 in reply to: ↑ 6 Changed 9 years ago by mvglasow (2)

Replying to http://wiki.navit-project.org/index.php/user:gabor:

Until that patch happens, does this mean that I could just build a toolchain, compile against v19 and bet it to work?

As far as I can tell, that should do the trick.

comment:8 in reply to: ↑ 5 Changed 9 years ago by tsaitgaist

the repository http://download.navit-project.org/navit/openmoko/svn/ is also compiled against libgps < 0.19. I don't know who manages it. Could the buildhost be updated to use libgps 0.19 ?

comment:9 Changed 9 years ago by kazer

  • Milestone set to version 0.2.0
  • Owner changed from KaZeR to kazer
  • Status changed from new to assigned

comment:10 Changed 9 years ago by kazer

  • Resolution set to fixed
  • Status changed from assigned to closed

Starting from today, openmoko builds from navit's repository are built against libgps19_2.95-r10.0.6_om-gta02.ipk (you have to use http://download.navit-project.org/navit/openmoko/svn/ in your feed to use it).

Use at least r3657, or something built after 2010-11-08 14:00.

Let me know if something is wrong, but i tested on my device and it works.

Note: See TracTickets for help on using tickets.