Hamlib Perl bindings

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Hamlib Perl bindings

Fabian Kurz
Hello,

it appears to me that the Debian libhamlib2-perl package is broken.

I first tried to compile hamlib with all bindings myself, but
ultimatively failed. Tcl- and Python bindings worked, Perl bindings
didn't (occasional segfaults, nonsense values when querying the rig
etc).

Then I apt-get'ed (without first removing the remains of my own
compilation attempts) libhamlib2, libhamlib2-perl, libhamlib-dev,
libhamlib-utils and Hamlib.pm worked fine.

On another machine however, with a fresh install of Debian 3.1, Hamlib.pm
with the packages above installed does *not* work:

,------[ perl -e 'use Hamlib' ]----------------------------------------
| Can't load '/usr/lib/perl5/auto/Hamlib/Hamlib.so' for module Hamlib:
| /usr/lib/perl5/auto/Hamlib/Hamlib.so: undefined symbol: hamlib_version
| at /usr/lib/perl/5.8/DynaLoader.pm line 225.
|  at /usr/lib/perl5/Hamlib.pm line 11
`----------------------------------------------------------------------

And a quick check revealed:

,------[ ldd -r /usr/lib/perl5/auto/Hamlib/Hamlib.so ]-----------------
|        libc.so.6 => /lib/libc.so.6 (0x4010d000)
|        /lib/ld-linux.so.2 (0x80000000)
| undefined symbol: hamlib_version    (/usr/lib/perl5/auto/Hamlib/Hamlib.so)
| undefined symbol: hamlib_copyright  (/usr/lib/perl5/auto/Hamlib/Hamlib.so)
| [... a million more undefined symbols ...]
`----------------------------------------------------------------------

Oops. But why does it work on my other system? Because there is
another Hamlib.so, left from my own compilation, which differs
from the one from the Debian package:

1138578 2007-08-07 02:53 /usr/local/lib/perl/5.8.8/auto/Hamlib/Hamlib.so (mine)
1067800 2007-01-21 19:50 /usr/lib/perl5/auto/Hamlib/Hamlib.so (debian)

And this Hamlib.so seems to be ok, a check with ldd shows some
undefined symbols (Perl_sv_free, Perl_croak_nocontext, ..) but all the
hamlib symbols seem to be defined.

Replacing the original Debian Hamlib.so with this one on my fresh test
system resulted in a functional Hamlib.pm.

Can anyone replicate/confirm/explain this problem?

Thanks & 73,
--
Fabian Kurz, DJ1YFK * Dresden, Germany * http://fkurz.net/


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Hamish Moffatt
On Fri, Aug 24, 2007 at 03:14:10PM +0200, Fabian Kurz wrote:

> And a quick check revealed:
>
> ,------[ ldd -r /usr/lib/perl5/auto/Hamlib/Hamlib.so ]-----------------
> |        libc.so.6 => /lib/libc.so.6 (0x4010d000)
> |        /lib/ld-linux.so.2 (0x80000000)
> | undefined symbol: hamlib_version    (/usr/lib/perl5/auto/Hamlib/Hamlib.so)
> | undefined symbol: hamlib_copyright  (/usr/lib/perl5/auto/Hamlib/Hamlib.so)
> | [... a million more undefined symbols ...]
> `----------------------------------------------------------------------
>
> Oops. But why does it work on my other system? Because there is
> another Hamlib.so, left from my own compilation, which differs
> from the one from the Debian package:
>
> 1138578 2007-08-07 02:53 /usr/local/lib/perl/5.8.8/auto/Hamlib/Hamlib.so (mine)
> 1067800 2007-01-21 19:50 /usr/lib/perl5/auto/Hamlib/Hamlib.so (debian)
>
> And this Hamlib.so seems to be ok, a check with ldd shows some
> undefined symbols (Perl_sv_free, Perl_croak_nocontext, ..) but all the
> hamlib symbols seem to be defined.
>
> Replacing the original Debian Hamlib.so with this one on my fresh test
> system resulted in a functional Hamlib.pm.
>
> Can anyone replicate/confirm/explain this problem?

I can replicate it on unstable on amd64. I suspect the library is not
linked correctly. I haven't investigated any further.

Hamish
--
Hamish Moffatt VK3SB <[hidden email]> <[hidden email]>


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Joop Stakenborg
In reply to this post by Fabian Kurz
Op vrijdag 24-08-2007 om 15:14 uur [tijdzone +0200], schreef Fabian
Kurz:
> Can anyone replicate/confirm/explain this problem?
>

I cannot replicate this.

"perl -e 'use Hamlib'" shows no errors,
"perl /usr/share/doc/libhamlib2-perl/perltest.pl" works fine.

This is on a i386 system.

Please try removing all of your hamlib libraries in /usr/local/lib and
do a fresh install of the Debian package. I think it is dangerous to mix
compiled and installed libraries...

> Thanks & 73,
> --
> Fabian Kurz, DJ1YFK * Dresden, Germany * http://fkurz.net/
>
>

Regards,
Joop PG4I


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Fabian Kurz
Hello Joop,

On Sat, Aug 25, 2007 at 09:46:37PM +0200, Joop Stakenborg wrote:
> I cannot replicate this.
>
> "perl -e 'use Hamlib'" shows no errors,
> "perl /usr/share/doc/libhamlib2-perl/perltest.pl" works fine.
>
> This is on a i386 system.

I should have mentioned that I am running "stable". The hamlib
packages in stable are from version 1.2.5, and it reliably crashes
here; tested it on several systems.

The package from "unstable" however (libhamlib2-perl_1.2.6.1-1_i386.deb),
works just fine here, as I just verified.
 
> Please try removing all of your hamlib libraries in /usr/local/lib and
> do a fresh install of the Debian package. I think it is dangerous to mix
> compiled and installed libraries...

The problem only occured on a virgin Debian stable system, not on a
system where I compiled something by myself. So I guess 1.2.5 (stable) is
broken, 1.2.6 (unstable) works. Just using it in the YO-DX Contest!

73,
--
Fabian Kurz, DJ1YFK * Dresden, Germany * http://fkurz.net/


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Joop Stakenborg
Op zaterdag 25-08-2007 om 22:28 uur [tijdzone +0200], schreef Fabian
Kurz:

> Hello Joop,
>
> On Sat, Aug 25, 2007 at 09:46:37PM +0200, Joop Stakenborg wrote:
> > I cannot replicate this.
> >
> > "perl -e 'use Hamlib'" shows no errors,
> > "perl /usr/share/doc/libhamlib2-perl/perltest.pl" works fine.
> >
> > This is on a i386 system.
>
> I should have mentioned that I am running "stable". The hamlib
> packages in stable are from version 1.2.5, and it reliably crashes
> here; tested it on several systems.
>
> The package from "unstable" however (libhamlib2-perl_1.2.6.1-1_i386.deb),
> works just fine here, as I just verified.
>  

Okay. That could be the case... there were several problems with the
bindings in stable. I am unable fix the perl package, sorry. Stable only
allows new packages for security fixes and severe problems....

> > Please try removing all of your hamlib libraries in /usr/local/lib and
> > do a fresh install of the Debian package. I think it is dangerous to mix
> > compiled and installed libraries...
>
> The problem only occured on a virgin Debian stable system, not on a
> system where I compiled something by myself. So I guess 1.2.5 (stable) is
> broken, 1.2.6 (unstable) works. Just using it in the YO-DX Contest!

Thanks for the report!

> 73,
> --
> Fabian Kurz, DJ1YFK * Dresden, Germany * http://fkurz.net/
>
>

Joop, PG4I


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Hamish Moffatt
On Sun, Aug 26, 2007 at 10:50:36AM +0200, Joop Stakenborg wrote:
> Op zaterdag 25-08-2007 om 22:28 uur [tijdzone +0200], schreef Fabian
> > The package from "unstable" however (libhamlib2-perl_1.2.6.1-1_i386.deb),
> > works just fine here, as I just verified.

1.2.6.1-1 on amd64 shows the same problem that Fabian reported.

Hamish
--
Hamish Moffatt VK3SB <[hidden email]> <[hidden email]>


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hamlib Perl bindings

Joop Stakenborg
Op zondag 26-08-2007 om 20:43 uur [tijdzone +1000], schreef Hamish
Moffatt:
> On Sun, Aug 26, 2007 at 10:50:36AM +0200, Joop Stakenborg wrote:
> > Op zaterdag 25-08-2007 om 22:28 uur [tijdzone +0200], schreef Fabian
> > > The package from "unstable" however (libhamlib2-perl_1.2.6.1-1_i386.deb),
> > > works just fine here, as I just verified.
>
> 1.2.6.1-1 on amd64 shows the same problem that Fabian reported.
>

Very stange, how could this have happened.
Maybe wrong build dependencies? I don't have a clue...

> Hamish
> --
> Hamish Moffatt VK3SB <[hidden email]> <[hidden email]>
>
>

Joop


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]