Thread: [Hamlib-developer] Problems with Perl language interface
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Nate B. <n0...@ne...> - 2002-11-04 00:07:16
|
Hi all.
I figured I would try the Perl interface to Hamlib. All seemed to build
well, but I get a fatal error trying to run the test.pl script. The
version of Perl on this system is 5.6.1. I even tried running ldconfig
with no success. Do I need to add the
/usr/local/lib/perl/5.6.1/auto/Hamlib to /etc/ld.so.conf, or is there
something else broken on my system? I've never installed a locally
built Perl module before so I'm rather green here. Everything seemed to
build fine, so I'm puzzled.
Here's the screen output:
merlin:~/test/hamlib/perl $ perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Hamlib
merlin:~/test/hamlib/perl $ make
cp Hamlib.pm blib/lib/Hamlib.pm
AutoSplitting blib/lib/Hamlib.pm (blib/lib/auto/Hamlib)
/usr/bin/perl -I/usr/lib/perl/5.6.1 -I/usr/share/perl/5.6.1
/usr/share/perl/5.6.1/ExtUtils/xsubpp -typemap
/usr/share/perl/5.6.1/ExtUtils/typemap -typemap typemap Hamlib.xs >
Hamlib.xsc && mv Hamlib.xsc Hamlib.c
cc -c -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.02\"
-DXS_VERSION=\"0.02\" -fPIC -I/usr/lib/perl/5.6.1/CORE Hamlib.c
Hamlib.xs: In function `XS_Hamlib__Rig_set_ext_level':
Hamlib.xs:3064: warning: assignment discards qualifiers from pointer
target type
Hamlib.xs: In function `XS_Hamlib__Rig_set_ext_parm':
Hamlib.xs:3108: warning: assignment discards qualifiers from pointer
target type
Running Mkbootstrap for Hamlib ()
chmod 644 Hamlib.bs
rm -f blib/arch/auto/Hamlib/Hamlib.so
LD_RUN_PATH="" cc -shared -L/usr/local/lib Hamlib.o -o
blib/arch/auto/Hamlib/Hamlib.so
chmod 755 blib/arch/auto/Hamlib/Hamlib.so
cp Hamlib.bs blib/arch/auto/Hamlib/Hamlib.bs
chmod 644 blib/arch/auto/Hamlib/Hamlib.bs
Manifying blib/man3/Hamlib.3pm
merlin:~/test/hamlib/perl $ make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/lib/perl/5.6.1 -I/usr/share/perl/5.6.1 test.pl
1..12
Can't load 'blib/arch/auto/Hamlib/Hamlib.so' for module Hamlib:
blib/arch/auto/Hamlib/Hamlib.so: undefined symbol: rig_get_powerstat at
/usr/lib/perl/5.6.1/DynaLoader.pm line 202.
at test.pl line 10
Compilation failed in require at test.pl line 10.
BEGIN failed--compilation aborted at test.pl line 10.
make: *** [test_dynamic] Error 255
merlin:# make install
Installing /usr/local/lib/perl/5.6.1/auto/Hamlib/Hamlib.so
Installing /usr/local/lib/perl/5.6.1/auto/Hamlib/Hamlib.bs
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing /usr/local/lib/perl/5.6.1/Hamlib.pm
Installing /usr/local/lib/perl/5.6.1/auto/Hamlib/autosplit.ix
Installing /usr/local/man/man3/Hamlib.3pm
Writing /usr/local/lib/perl/5.6.1/auto/Hamlib/.packlist
Appending installation info to /usr/local/lib/perl/5.6.1/perllocal.pod
merlin:~/test/hamlib/perl $ perl test.pl
1..12
ok 1
perl: relocation error: /usr/local/lib/perl/5.6.1/auto/Hamlib/Hamlib.so:
undefined symbol: rig_init
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamomoto
|
|
From: Nate B. <n0...@ne...> - 2002-11-04 03:18:06
|
Yeah, one should not reply to one's self, however...
CTFDS (Check The Friendly Directory Structure) and discovered a
directory called bindings.
Discover system lacks swig.
Get clean checkout.
Install old swig.
Find out Hamlib doesn't work with old swig.
RTFM
Remove old swig install correct version.
Check out another fresh CVS of Hamlib.
Build Hamlib.
Discover TCL development files are needed.
Install tcl-dev.
Finish building Hamlib.
Install Hamlib.
Do the build in the perl directory.
make test fails.
Do make install.
perl test.pl fails with:
1..12
ok 1
perl: relocation error: /usr/local/lib/perl/5.6.1/auto/Hamlib/Hamlib.so:
undefined symbol: rig_init
Run ldconfig
perl test.pl still fails.
Find hamlibperl.so not in /etc/ld.so.cache
So this is the problem for some reason ldconfig refuses to recognize
/usr/local/lib/hamlibperl.so.0.0.0 and the symlinks that point to it.
hamlibtcl.so* is also refused.
Ideas?
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamomoto
|
|
From: Stephane F. <f8...@fr...> - 2002-11-04 22:51:09
|
On Sun, Nov 03, 2002, Nate Bargmann wrote: > Yeah, one should not reply to one's self, however... > > CTFDS (Check The Friendly Directory Structure) and discovered a > directory called bindings. yeah, tcl/ and perl/ subdir will go on a walk on the rim one day.. > Discover system lacks swig. > > Get clean checkout. > > Install old swig. > > Find out Hamlib doesn't work with old swig. > > RTFM > > Remove old swig install correct version. >= 1.3.14 > Check out another fresh CVS of Hamlib. > > Build Hamlib. > > Discover TCL development files are needed. what a pity, the Makefile.am is not flexible enough yet to build one and/or the other. For dev purpose, you can tweak your local copy. > Install tcl-dev. > > Finish building Hamlib. > > Install Hamlib. > > Do the build in the perl directory. Do not use perl directory. Use only bindings/ perl/ has already a foot in the grave. > make test fails. > > Do make install. > > perl test.pl fails with: > > 1..12 > ok 1 > perl: relocation error: /usr/local/lib/perl/5.6.1/auto/Hamlib/Hamlib.so: > undefined symbol: rig_init > > Run ldconfig > > perl test.pl still fails. > > Find hamlibperl.so not in /etc/ld.so.cache > > So this is the problem for some reason ldconfig refuses to recognize > /usr/local/lib/hamlibperl.so.0.0.0 and the symlinks that point to it. > hamlibtcl.so* is also refused. ok, no need to change ld.so.cache. If you're not root, you can just play with LD_LIBRARY_PATH. As a conclusion, use only bindings/ make install in bindings does not work yet , so you may have to do "ln -s .lib/hamlibperl.so hamlib.so" Have a look at perltest.pl and give it a try ./perltest.pl tcltest.tcl works equally well here. It should be easy to roll out a Tk applet. Cheers, Stephane |
|
From: Nate B. <n0...@ne...> - 2002-11-05 03:09:21
|
Guess most of my message should form a good FAQ (Joop?). Logically, a
directory called perl was where I thought things were happening.
perltest.pl worked fine with the dummy backend until the QRA locator
code which is marked TODO anyway.
Thanks for the info, Stephane, as always.
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamomoto
|
|
From: Stephane F. <f8...@fr...> - 2002-11-05 22:21:36
|
On Mon, Nov 04, 2002, Nate Bargmann wrote: > Guess most of my message should form a good FAQ (Joop?). Logically, a > directory called perl was where I thought things were happening. The perl directory is gone. The next 1.1.4 should install properly from the bindings subdir (yet to be done). > perltest.pl worked fine with the dummy backend until the QRA locator > code which is marked TODO anyway. It should be easy now to do some memory backup/restore in perl, with file in XML or whatever format. > Thanks for the info, Stephane, as always. My way to forgive me for not documenting before coding :) 73 Stephane |
|
From: Joop S. <pa...@de...> - 2002-11-08 19:43:16
|
On Mon, 4 Nov 2002 21:09:14 -0600 Nate Bargmann <n0...@ne...> wrote: > Guess most of my message should form a good FAQ (Joop?). Logically, a > directory called perl was where I thought things were happening. > So the FAQ would be something like: - Where are the perl and tcl bindings? (Does anyone know a better word for binding?) And the answer would explain what swig is and what versions you need. This only relates to the CVS version of course. Ehm, I still see perl/Makefile.PL and perl/Makefile.am, they need to be kicked .... > perltest.pl worked fine with the dummy backend until the QRA locator > code which is marked TODO anyway. > > Thanks for the info, Stephane, as always. > > 73, de Nate >> > I couldn't resist, have fixed the debian build stuff. You need to 'apt-get install fakeroot debhelper dpkg-dev autoconf automake1.7 libtool doxygen' and then 'fakeroot debian/rules binary'. It will produce 4 packages. The bindings are not included yet. > -- > Wireless | Amateur Radio Station N0NB | "We have awakened a > Internet | n0...@ne... | sleeping giant and > Location | Bremen, Kansas USA EM19ov | have instilled in him > Amateur radio exams; ham radio; Linux info @ | a terrible resolve". > http://www.qsl.net/n0nb/ | - Admiral Yamomoto > > Joop |
|
From: Stephane F. <f8...@fr...> - 2002-11-08 21:55:55
|
On Fri, Nov 08, 2002, Joop Stakenborg wrote: > So the FAQ would be something like: > > - Where are the perl and tcl bindings? > > (Does anyone know a better word for binding?) > > And the answer would explain what swig is and what versions you need. > This only relates to the CVS version of course. Okay. Acutally, I expected to fix the installation in the coming weeks. And fix the binding plugin names also. For this matter, I may have to create subdirs because perl and tcl want to name it the same way 'hamlib.so'. > Ehm, I still see perl/Makefile.PL and perl/Makefile.am, they need to > be kicked .... yep, but before doing that, I'd like to reuse the Makefile.PL and part of Makefile.am to let perl handle the plugin installation directory itself. It might change from one version of perl to another. Anyone has advices to how to handle the plugin name clash and the installation destination? > I couldn't resist, have fixed the debian build stuff. > You need to 'apt-get install fakeroot debhelper dpkg-dev autoconf automake1.7 libtool doxygen' > and then 'fakeroot debian/rules binary'. great! FYI, Ernie has made a .deb for 1.1.3 already, and it's in the download page on sourceforge. I've heard Terry was about to update the debian unstable. That'd good to merge all the build scripts. Note: assuming you have a tar.gz obtained by a "make dist", there shouln't be any need for autoconf, automake1.7 and libtool. And we can even arrange to generate doxygen/dockbook documentation at "make dist" time (I've heard sh and hurd platforms don't have doxygen yet). Thanks for the commits Stephane |
|
From: Joop S. <pa...@de...> - 2002-11-09 08:22:32
|
On Fri, 8 Nov 2002 22:55:46 +0100 Stephane Fillod <f8...@fr...> wrote: > On Fri, Nov 08, 2002, Joop Stakenborg wrote: > > So the FAQ would be something like: > > > > - Where are the perl and tcl bindings? > > > > (Does anyone know a better word for binding?) > > > > And the answer would explain what swig is and what versions you need. > > This only relates to the CVS version of course. > > Okay. Acutally, I expected to fix the installation in the coming weeks. > And fix the binding plugin names also. For this matter, I may have to > create subdirs because perl and tcl want to name it the same way > 'hamlib.so'. > Okay, I will add the question when the swig stuff works. > > Ehm, I still see perl/Makefile.PL and perl/Makefile.am, they need to > > be kicked .... > > yep, but before doing that, I'd like to reuse the Makefile.PL and part > of Makefile.am to let perl handle the plugin installation directory itself. > It might change from one version of perl to another. > Anyone has advices to how to handle the plugin name clash and the > installation destination? > > > > I couldn't resist, have fixed the debian build stuff. > > You need to 'apt-get install fakeroot debhelper dpkg-dev autoconf automake1.7 libtool doxygen' > > and then 'fakeroot debian/rules binary'. > > great! > FYI, Ernie has made a .deb for 1.1.3 already, and it's in the > download page on sourceforge. I've heard Terry was about to update > the debian unstable. That'd good to merge all the build scripts. > Note: assuming you have a tar.gz obtained by a "make dist", there > shouln't be any need for autoconf, automake1.7 and libtool. And we can > even arrange to generate doxygen/dockbook documentation at "make dist" > time (I've heard sh and hurd platforms don't have doxygen yet). > Fixed in CVS, I will try to keep track of the hamlib changes and adapt the debian tree when needed. Doxygen will be removed from debian/control lateron. > Thanks for the commits > Stephane > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Hamlib-developer mailing list > Ham...@li... > https://lists.sourceforge.net/lists/listinfo/hamlib-developer > |