Menu

FreeBSD 5.2 configure problem

Help
2003-12-13
2004-01-23
  • Nobody/Anonymous

    It's probably me being totally thick, but I have to ask as I'm pulling what's left of my hair out and google and the usual suspects are singularly unhelpful.

    I'm trying to compile Grig from source on a FreeBSD box but ./configure keeps failing on "checking for main in -lhamlib". I get the message  "Hamradio control libraries (hamlib) not found! You need hamlib-1.1.2 or later to compile Gnome RIG
    You can get hamlib-1.1.2 from http://sourceforge.net/projects/hamlib
    ABORTED!"

    Hamlib is installed from the latest port, version 1.1.4_1, with the libs in /usr/local/lib and the includes in /usr/local/include/hamlib, rigctl works with my Icom and I can compile and use Xlog with hamlib after setting the environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig. I've tried setting before running configure, but no joy. What am I doing wrong?

    uname -a returns:
    FreeBSD workstation1.xx.xx.xx 5.2-RC FreeBSD 5.2-RC #0: Wed Dec 10 00:36:51 GMT 2003     md001@workstation1.xx.xx.xx:/usr/obj/usr/src/sys/WORKSTATION1  i386

    I am running 5.2-RC, but I have tried it on another machine running 5.1-RELEASE and still the same error.

     
    • Alexandru Csete

      Alexandru Csete - 2003-12-13

      Hi,

      I have had similar problems on linux because /usr/local/lib was not included in my LD_LIBRARY_PATH. You can either try to add it locally, in bash:

      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

      or globally by adding /usr/local/lib to the /etc/ld.so.conf file and running /sbin/ldconfig as root. This applies to linux and I'm not sure where the file is placed in FreeBSD.

      In the long run, I'll have to modify grig to use pkgconfig instead of just trying to test-link to hamlib.

      I'm looking forward to hear whether it helped or not.

      Alex

       
    • Nobody/Anonymous

      Yes, I recall having to set that environment variable with Xlog, too. However I have just tried it and it still fails in the same place. I am using csh as my main shell, both as my normal user and as root, just in case that has any bearing on the matter I have tried using sh and export-ing the variables again and running ldconfig -m /usr/local/bin, but still no joy.

      It would be nice to have some amateur radio applications on this platform. Xlog has come along niceley, although I did have to change one function (rintl made the compiler bork, so I simply used rint instead, fully expecting it not to work) in one of the source files to allow it to compile (you can probably tell I'm no hacker. Ten years as a sysadmin and code still scares the bejesus out of me ;)

      I take it the PKG_CONFIG_PATH  variable tells pkgconfig where to look for the file it uses, in which case it's not going to help if the configure doesn't use pkgconfig?

      OK, here's the weird thing. Sorry about the length of this, but I just checked the output of ldconfig -r:
      search directories: /lib:/usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat:/usr/local/lib/compat/pkg:/usr/local/lib/pth:/usr/local/lib/kde3
      <snip for brevity>
      429:-lhamlib-1.1.4.1 => /usr/local/lib/libhamlib-1.1.4.so.1
              430:-lhamlib++-1.1.4.1 => /usr/local/lib/libhamlib++-1.1.4.so.1

      So it would appear that my /var/run/ld.hints.so file has all the information. This replaced ld.so.conf on BSD some time ago. Any further ideas?

      Many thanks for the help, Alex.

       
    • Nobody/Anonymous

      Ooops, forgot to mention: If you need someone to test cross-plaform compatibility on BSD at any time, my machines are at your disposal. mattd@despammed.com is my email. I may even learn something ;o)

       
    • Alexandru Csete

      Alexandru Csete - 2003-12-16

      Hi again,

      I have modified grig to use pkg-config just like xlog does. I hope it fixes the configure problem. You will need the source code from CVS, the instructions are here:
      http://sourceforge.net/cvs/?group_id=25530 (modulename is grig). Please note, that when you take the code from CVS, you need to run autogen.sh instead of configure. This code includes rotator support and I think I' will make a new release soon.

      It would be great if you could test grig (and maybe also gpredict?) on FreeBSD. I don't know of anybody else doing it at the moment. You can subscribe to some of the mailing lists, if you want to be notified when new releases occur.

      Alex

      PS: Some time ago, I have successfully compiled gpredict on FreeBSD 4.7 or 4.8, so the code itself should be all right once we get by the configure step ;-)

       
    • Nobody/Anonymous

      I checked out the CVS source for both, and we get past configure! It sees hamlib no problem with the PKG_CONFIG_PATH variable set to wherever the hamlib.mc file is, mine being in /usr/local/lib/pkgconfig. Nice! Thanks for the hard work, Alex.

      Unfortunately, the code made the compiler bork at dcigettext.c with the error as follows:

      dcigettext.c: In function `plural_lookup':
      dcigettext.c:993: error: called object is not a function
      gmake[2]: *** [dcigettext.o] Error 1
      gmake[2]: Leaving directory `/usr/local/build/gpredict/intl'
      gmake[1]: *** [all-recursive] Error 1
      gmake[1]: Leaving directory `/usr/local/build/gpredict'
      gmake: *** [all] Error 2

      This happens with both Grig and Gpredict. Is it a problem with my includes, the gettext port or the compiler? I assume it's strchr it's got a problem with. I tried both make and gmake and they both bork at the same point. This is on one of the 5.2 boxes, though, so I may try it later on the 4.9 server (a bit dangerous, but once everyone's logged off for the day I'll have a go. After all, this is why we take backups!)

      Sorry for all the problems, but I really would like to try and make a port framework for these two apps eventually.

       
    • Alexandru Csete

      Alexandru Csete - 2003-12-17

      Oh, yes... I forgot to mention: You have to disable native language support with --disable-nls when running configure or autogen.sh

      This is on both FreeBSD, MacOS X and the latest Linux distributions. I'll have to fix this eventually, but it has quite low priority now because there are no translations anyway.

       
    • Nobody/Anonymous

      Oh, RTFM syndrome. Sorry, Alex, I read this somewhere, probably in this very forum in one of the messages.

      Well, here goes: "YES!" Both Grig and Gpredict compile, install and work. Grig talks to my IC-706 MkII via RPCRig with Xlog running in the background. Many thanks for all the help, Alex. Now I'll go and read the porter's handbook and figure out how to build a port framework for the two of them.

      Thanks again!

       
    • Alexandru Csete

      Alexandru Csete - 2003-12-19

      This is great news! I'm glad to hear it!

       
    • Nobody/Anonymous

      OK, I'm working on the port framework. One thing it needs is a tarball of the sources. The ports don't use CVS, they only download the src using fetch.

      Has the main tarball on the mirrors been updated with the pkgconfig changes?

      Thanks once again, Alex. I'm tracking the ISS using Gpredict as we speak!

       
      • Alexandru Csete

        Alexandru Csete - 2004-01-22

        No, I have not made any release with the latest changes yet. I'll try to have it done during the weekend.

        Alex

         
    • Nobody/Anonymous

      RE my post above. Not to worry, I have successfully got 0.2.2 to compile from within the ports framework. Two new ports submitted to pr today! :)

       
    • Nobody/Anonymous

      No problem, Alex. I got the 0.2.2 tarball to compile by passing specific compiler flags for includes and libraries, which I should have tried in the first place. Both ports have been submitted and gpredict is already accepted and up on freshports.

       
      • Alexandru Csete

        Alexandru Csete - 2004-01-22

        OK, sounds great! I think I'll skip the release then to another time (I'm quite busy now, because I have to move to France on Sunday).

        In any case, if you will need a tarball, you can also make it yourself by typing 'make dist' - this is indeed the command that I use to produce the release tarballs.

        Alex

         
    • Matt Dawson

      Matt Dawson - 2004-01-23

      Yep, no problems. The only issue was that the ports can use sourceforge and its mirrors as a main distfile repository. There is an environment variable used by the ports, ${MASTER_SITE_SOURCEFORGE} which simplifies installation. Since I got the main tarball to compile, all a BSD user has to do to install gpredict or grig now is cd to their ports framework directory, cd to comms/grig or comms/gpredict and type "make install clean" and the sorce will be fetched, configured, compiled and installed then registered in the pkgdb for deinstallation and upgrade purposes. It is also covered by the portupgrade tool, so any changes I make to the port now can be easily upgraded on BSD by simply issuing a portupgrade -a and the automated process will do the rest.

      BTW, both are now committed after Pav fixed a coupole of dependencies I missed. Any BSD user only needs to simply cvsup their ports framework and both apps are available.

      http://www.freshports.org/ has the details.

       

Log in to post a comment.