[SOLVED] trouble compiling udunits-1.11.7 on Slackware64-13.37
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
trouble compiling udunits-1.11.7 on Slackware64-13.37
Hello,
I am running Slackware64-13.37 with kernel 2.6.38.4. I need to install the udunits-1.11.7 ftp://grads.iges.org/grads/Supplibs/...-1.11.7.tar.gz library. Yes, I do know that there is a new version, which compiles successfully on Slackware, but I actually need GrADS, and GrADS needs exactly udunits-1.11.7. Here is the compile-time error I get:
Code:
making `all' in directory /home/marto/build/source/udunits/udunits-1.11.7/src/lib
make[1]: Entering directory `/home/marto/build/source/udunits/udunits-1.11.7/src/lib'
cc -c -O -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/marto/build/source/udunits/udunits-1.11.7/etc/udunits.dat"' utlib.c
cc -c -O -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/marto/build/source/udunits/udunits-1.11.7/etc/udunits.dat"' utparse.c
cc -c -O -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/marto/build/source/udunits/udunits-1.11.7/etc/udunits.dat"' utscan.c
In file included from ../port/misc/stddef.h:9:0,
from utscan.l:15:
///usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include/stddef.h:411:0: warning: "offsetof" redefined
../port/misc/stddef.h:24:0: note: this is the location of the previous definition
cc -c -O -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/marto/build/source/udunits/udunits-1.11.7/etc/udunits.dat"' udalloc.c
ar rcuv libudunits.a utlib.o utparse.o utscan.o udalloc.o
a - utlib.o
a - utparse.o
a - utscan.o
a - udalloc.o
case "" in \
'') ;; \
*) ar rucv libudunits.a ;; \
esac
ranlib libudunits.a
make[1]: Leaving directory `/home/marto/build/source/udunits/udunits-1.11.7/src/lib'
returning to directory /home/marto/build/source/udunits/udunits-1.11.7/src
making `all' in directory /home/marto/build/source/udunits/udunits-1.11.7/src/udunits
make[1]: Entering directory `/home/marto/build/source/udunits/udunits-1.11.7/src/udunits'
make[2]: Entering directory `/home/marto/build/source/udunits/udunits-1.11.7/src/udunits'
cc -c -O -I../lib -I../port/misc udunits.c
udunits.c: In function 'main':
udunits.c:113:6: warning: incompatible implicit declaration of built-in function 'exit'
cc -o udunits -O udunits.o -L/home/marto/build/source/udunits/udunits-1.11.7/src/lib -ludunits -L/home/marto/build/source/udunits/udunits-1.11.7/src/port/misc -ludport
/home/marto/build/source/udunits/udunits-1.11.7/src/lib/libudunits.a(utlib.o): In function `dectime':
utlib.c:(.text+0x4a7): undefined reference to `floor'
utlib.c:(.text+0x523): undefined reference to `fmod'
/home/marto/build/source/udunits/udunits-1.11.7/src/lib/libudunits.a(utlib.o): In function `utRaise':
utlib.c:(.text+0xc47): undefined reference to `pow'
/home/marto/build/source/udunits/udunits-1.11.7/src/lib/libudunits.a(utlib.o): In function `utPrint':
utlib.c:(.text+0xf00): undefined reference to `log10'
utlib.c:(.text+0xf05): undefined reference to `ceil'
collect2: ld returned 1 exit status
make[2]: *** [udunits] Error 1
make[2]: Leaving directory `/home/marto/build/source/udunits/udunits-1.11.7/src/udunits'
make[1]: *** [program] Error 2
make[1]: Leaving directory `/home/marto/build/source/udunits/udunits-1.11.7/src/udunits'
make: *** [udunits/all] Error 1
OK, I fetched the tar ball and this seemed to work: after configure,
Code:
make CFLAGS='-fPIC' LDFLAGS='-lm'
-lm links the math library into the binary. It is needed because the error message tells that it needs log10 which is not found. See man log10. And after -lm is succesfully added to the link command, the build stops at an error which tells to compile with -fPIC.
Than you very much, that did the trick!!! I also had to give the same arguments to the make install command. I wonder why
the settings do not work if they are passed only to configure, as is usually done ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.