Alan Corey | 10 Jul 2012 06:13
Picon
Favicon

Hamlib 1.2.14 under OpenBSD 5.0

I got it running, but I had to define CFLAGS to -I/usr/local/include
-L/usr/local/lib because that's where OpenBSD puts a lot of things.

Then in tests I was getting ld undefined symbols for rig_lookup_mem_caps 
and rig_strmtype.  I looked for those and found them by doing nm on the 
libraries Hamlib had just built but not installed.  I copied the new 
libraries into place, rebooted so ldconfig would pick them up, then I 
could finish the build without any more problems.

I've also got Debian 5.0 on the same machine and that worked without 
any fiddling.

This web form is a little silly in "You have lines longer than 80 
characters. Fix that."  How do I know where they're going to wrap?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Greg Troxel | 10 Jul 2012 15:29

Re: Hamlib 1.2.14 under OpenBSD 5.0


  I got it running, but I had to define CFLAGS to -I/usr/local/include
  -L/usr/local/lib because that's where OpenBSD puts a lot of things.

You probably also need -R/usr/local/lib.  In general this is something
that's about your build environment rather than the upstream package.
On NetBSD with pkgsrc it's the same issue (with /usr/pkg instead of
/usr/local).
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Nate Bargmann | 10 Jul 2012 16:10
Picon
Favicon
Gravatar

Re: Hamlib 1.2.14 under OpenBSD 5.0

* On 2012 10 Jul 08:30 -0500, Greg Troxel wrote:
> 
>   I got it running, but I had to define CFLAGS to -I/usr/local/include
>   -L/usr/local/lib because that's where OpenBSD puts a lot of things.
> 
> You probably also need -R/usr/local/lib.  In general this is something
> that's about your build environment rather than the upstream package.
> On NetBSD with pkgsrc it's the same issue (with /usr/pkg instead of
> /usr/local).

Are there fixes that could be applied to configure.ac that would help?

73, de Nate >>

--

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://www.n0nb.us

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Greg Troxel | 10 Jul 2012 20:09

Re: Hamlib 1.2.14 under OpenBSD 5.0


Nate Bargmann <n0nb <at> n0nb.us> writes:

> * On 2012 10 Jul 08:30 -0500, Greg Troxel wrote:
>> 
>>   I got it running, but I had to define CFLAGS to -I/usr/local/include
>>   -L/usr/local/lib because that's where OpenBSD puts a lot of things.
>> 
>> You probably also need -R/usr/local/lib.  In general this is something
>> that's about your build environment rather than the upstream package.
>> On NetBSD with pkgsrc it's the same issue (with /usr/pkg instead of
>> /usr/local).
>
> Are there fixes that could be applied to configure.ac that would help?

In my opinion, one class of fixes are likely really bugs.  If one is
building with one prefix, and needs dependencies from another
non-default prefix (meaning a prefix that cc/ld don't search by
default), then you have to pass -I/-L/-R.  Pretty much all other
software is like this.  So that's about the build environment, not
something that (upstream) packages should encode about what's typical on
various system.

One can perhaps argue that this shouldn't be necessary if one builds

  --prefix=/usr/local

but I think we should understand more precisely what's going on first.

FWIW, pkgsrc passes these sorts of args, and the pkgsrc control file for
(Continue reading)

Greg Troxel | 11 Jul 2012 02:31

Re: Hamlib 1.2.14 under OpenBSD 5.0


Nate Bargmann <n0nb <at> n0nb.us> writes:

> * On 2012 10 Jul 08:30 -0500, Greg Troxel wrote:
>> 
>>   I got it running, but I had to define CFLAGS to -I/usr/local/include
>>   -L/usr/local/lib because that's where OpenBSD puts a lot of things.
>> 
>> You probably also need -R/usr/local/lib.  In general this is something
>> that's about your build environment rather than the upstream package.
>> On NetBSD with pkgsrc it's the same issue (with /usr/pkg instead of
>> /usr/local).
>
> Are there fixes that could be applied to configure.ac that would help?

The following is in configure.ac to accomodate FreeBSD:

  freebsd*)
          AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}"
          AM_LDFLAGS="${AM_LDFLAGS} -L/usr/local/lib"
          AC_SUBST([AM_LDFLAGS])
          ;;

I would say that code shouldn't be present; configure should not assume
that the user has prereqs in /usr/local - it's the user's job to say
where the prereqs are by passing -I and -L/-R if they aren't in the
compiler default search path.  On NetBSD the practice is that
/usr/include and /usr/lib are in the default search paths - and not
/usr/local, or /usr/pkg (which is where all beyond-OS packages go in
normal practice).  I think FreeBSD and OpenBSD are similar, except that
(Continue reading)

Greg Troxel | 11 Jul 2012 01:56

Re: Hamlib 1.2.14 under OpenBSD 5.0


  Then in tests I was getting ld undefined symbols for rig_lookup_mem_caps 
  and rig_strmtype.  I looked for those and found them by doing nm on the 
  libraries Hamlib had just built but not installed.  I copied the new 
  libraries into place, rebooted so ldconfig would pick them up, then I 
  could finish the build without any more problems.

I looked into this, and I think the problem is that the dlopen inside
hamlib during tests is trying to load modules from the proper isntalled
lcoation.  That's the right thing to do during operation after install,
but tests should load the library from $objdir so that the just-built
version is tested, not the installed version.

With hamlib installed (--prefix=/usr/pkg, via pkgsrc), the tests passed
(on NetBSD 5.1_STABLE, i386).

With hamlib not installed (after "pkg_delete hamlib"), running "gmake
check-TESTS" in hamlib-1.2.15.1/c++:

rig:rig_init called 
rig: loading backend dummy
rig:  lt_dlopen("hamlib-dummy") failed (file not found), trying static symbols...
rig:  dlsym(initrigs2_dummy) failed (Undefined symbol "initrigs2_dummy")
rig:  lt_dlopen("hamlib-dummy") failed ((null))
terminate called after throwing an instance of 'RigException'
[1]   Abort trap (core dumped) ${dir}${tst}
FAIL: testcpp

Using 'ktrace -i' to find out what it did, I see the following NAMI calls:

(Continue reading)

Greg Troxel | 11 Jul 2012 02:33

Re: Hamlib 1.2.14 under OpenBSD 5.0


trying to test git head, I get (without installing it):

rig: loading backend dummy
rig:  dlsym(initrigs3_dummy) failed (Undefined symbol "initrigs3_dummy")
rig:  lt_dlopen("hamlib-dummy") failed ((null)), trying static symbols...

This confused me until I ~read "git diff 1.2.15.1.." and I see the
version is 3 and libraries are namespaced to 3.

Do the tests work for anyone without hamlib installed?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Nate Bargmann | 11 Jul 2012 05:20
Picon
Favicon
Gravatar

Re: Hamlib 1.2.14 under OpenBSD 5.0

* On 2012 10 Jul 19:34 -0500, Greg Troxel wrote:
> 
> trying to test git head, I get (without installing it):
> 
> rig: loading backend dummy
> rig:  dlsym(initrigs3_dummy) failed (Undefined symbol "initrigs3_dummy")
> rig:  lt_dlopen("hamlib-dummy") failed ((null)), trying static symbols...
> 
> 
> This confused me until I ~read "git diff 1.2.15.1.." and I see the
> version is 3 and libraries are namespaced to 3.
> 
> 
> Do the tests work for anyone without hamlib installed?

I doubt it.  Here is what I get from my Debian Squeeze VM that does not
have Hamlib installed:

make[2]: Entering directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
  CXX    testcpp.o
  CXXLD  testcpp
make[2]: Leaving directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
make  check-TESTS
make[2]: Entering directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
rig:rig_init called 
rig: loading backend dummy
rig:  lt_dlopen("hamlib-dummy") failed (file not found), trying static symbols...
rig:  dlsym(initrigs2_dummy) failed
(/home/nate/builds/hamlib-1.2.15.2~rc3/c++/.libs/lt-testcpp: undefined symbol: initrigs2_dummy)
rig:  lt_dlopen("hamlib-dummy") failed ((null))
(Continue reading)

Greg Troxel | 12 Jul 2012 02:51

Re: Hamlib 1.2.14 under OpenBSD 5.0


  I doubt it.  Here is what I get from my Debian Squeeze VM that does not
  have Hamlib installed:

  make[2]: Entering directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
    CXX    testcpp.o
    CXXLD  testcpp
  make[2]: Leaving directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
  make  check-TESTS
  make[2]: Entering directory `/home/nate/builds/hamlib-1.2.15.2~rc3/c++'
  rig:rig_init called 
  rig: loading backend dummy
  rig: lt_dlopen("hamlib-dummy") failed (file not found), trying static
  symbols...

That looks like exactly what happened to me.  Run ktrace (ktruss?) on
the test, and see what it tries to open, and it will probably become
clearer.

  I made some very rudimentary changes to Makefile.am to build the test
  programs.  Obviously this needs improvement.

There are two issues:

  libtool magic to link the binaries with the shlibs from the build
  directory rather than the OS.  I think this happens by default with
  automake, and it's ok.

  hamlib does dlopen.  This needs accomodation to use different paths
  for uninstalled mode for test vs installed mode for operation.  I
(Continue reading)


Gmane