gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH]: Link Python extensions with libpython


From: Matt
Subject: [gpsd-dev] [PATCH]: Link Python extensions with libpython
Date: Tue, 09 Sep 2014 18:34:18 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

The Cygwin linker needs gps/clienthelpers.{so,dll} to be built with -lpython<version> (on my Cygwin system, libpython2.7).

gcc -shared -Wl,--enable-auto-image-base -L. -o gps/clienthelpers.dll -Wl,-rpath=//usr/local/lib -Wl,--out-implib=gps/libclienthelpers.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive gpsclient-py_2_7_8_final_O.dll geoid-py_2_7_8_final_O.dll gpsdclient-py_2_7_8_final_O.dll strl-py_2_7_8_final_O.dll -Wl,--no-whole-archive -L. -lm -lrt
gpsclient-py_2_7_8_final_O.dll: In function `gpsclient_maidenhead':
/home/matthew/gpsd/gpsclient.c:58: undefined reference to `PyArg_ParseTuple'

This patch isn't entirely correct - it links all binaries and shared objects against the python runtime library, but only some of them (not all) actually need libpython. I don't yet see how to fix this.

With this change, all binaries compile on Cygwin, but regression tests fail due to:

gpsfake: socket error [ Errno 111] Connection refused.

I haven't root-caused this yet, but it appears shallow.

Attachment: link-python-extensions-with-libpython.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]