[Slackbuilds-users] Some necessary changes to build a newer version of gpsd

Niels Horn niels.horn at gmail.com
Tue Jun 22 02:56:13 UTC 2010

On Mon, Jun 21, 2010 at 11:45 PM, Max Miorim <miorimmax at gmail.com> wrote:
> On Mon, Jun 21, 2010 at 11:37 PM, Niels Horn <niels.horn at gmail.com> wrote:
>> On Mon, Jun 21, 2010 at 11:31 PM, Max Miorim <miorimmax at gmail.com> wrote:
>>> On Mon, Jun 21, 2010 at 10:38 PM, Niels Horn <niels.horn at gmail.com> wrote:
>>>> Hi,
>>>> To build the latest version of gpsd (2.94), some small changes to the
>>>> SlackBuild are necessary:
>>>> 1) Change to configure script for Slackware64
>>>> ---------------------------------------------
>>>> The configure script uses a "hack" to discover the installed version of libusb.
>>>> It does this by looking for libusb-*.so in /usr/lib
>>>> On Slackware64 this file resides in /usr/lib64 so it is never found
>>>> and building fails.
>>>> The following line in the SlackBuild (after unpacking the sources) solves it:
>>>> sed "s|/usr/lib/libusb|/usr/lib$LIBDIRSUFFIX/libusb|" -i configure
>>> Using pkg-config for this seems less hacky to me:
>>> max at willcrashforsure:~$ pkg-config --modversion libusb
>>> 0.1.12
>>> -- Max
>> But it gives the wrong answer.
>> The version needed is the version of the libusb-*.so file, which is 1.0
>> Check the configure script of gpsd to see how it works.
>> Niels
> Oops that was the wrong libusb. :)
> max at willcrashforsure:~$ pkg-config --modversion libusb-1.0
> 1.0.6
> I'll take a look at it (the script) later, the point I was trying to
> make is that pkg-config should be more reliable than looking for a
> symlink/library lying somewhere. :)
> -- Max

Under normal circumstances, you're right :)

The author of gpsd says in the configure script that the "normal" way
of checking the libusb version is not reliable and created this
alternative method.
He must have his reasons to do it this way, so I only patched the
configure file to check in /usr/lib64 on x86_64 systems.

What is needed is the "1.0", to create the right "-I" and "-l" flags.
The line of interest is:

    usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)

which gives "usb-1.0" as a result and is used as


On my Slackware64 box this needed the sed line I wrote, without
changing too much in the configure script.


More information about the SlackBuilds-users mailing list