Page 1 of 1
gsl problem compiling SDDS on SL6.2
Posted: 29 Apr 2013, 12:46
by Philippe Piot
Hello,
I tried to update the SDDS package in my 64 bits installation and the compilation was unsuccessful; see below excerpt of output. The problem seems to be related to gsl. I noticed in older version of SDDS the SDDS/src had a gsl directory the later SDDS (2.11) seems not to have gsl. I try installing gsl but it did not fix my problem. Thanks in advance for any suggestion/help,
-- Philippe Piot.
make -C O.linux-x86_64 -f ../Makefile TOP=../../../../.. T_A=linux-x86_64 install
make[2]: Entering directory `/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64'
/usr/bin/gcc -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -ansi -O3 -Wall -DEXPORT_RPNLIB -I../../../include -DUSE_GSL -g -fPIC -I. -I.. -I../../../../../include/os/Linux -I../../../../../include -I/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/../base/include -I/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/include -I/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/../../oag/apps/include ../math.c
../math.c:113:31: error: gsl/gsl_sf_bessel.h: No such file or directory
../math.c: In function ‘rpn_KN’:
../math.c:607: warning: implicit declaration of function ‘gsl_sf_bessel_Knu’
../math.c: In function ‘rpn_IN’:
../math.c:648: warning: implicit declaration of function ‘gsl_sf_bessel_Inu’
make[2]: *** [math.o] Error 1
make[2]: Leaving directory `/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64'
make[1]: *** [install.linux-x86_64] Error 2
make[1]: Leaving directory `/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/rpns/code'
make: *** [rpns/code.install] Error 2
[piot@paris SDDS]$ uname -a
Linux paris.nicadd.niu.edu 2.6.32-279.22.1.el6.x86_64 #1 SMP Tue Feb 5 14:33:39 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
Re: gsl problem compiling SDDS on SL6.2
Posted: 29 Apr 2013, 13:12
by soliday
We no longer ship the GSL library because of a license issue. My guess is that you have gsl installed but not gsl-devel. Run:
yum install gsl-devel
and try to build the SDDS code again.
png problem // Re: gsl problem compiling SDDS on SL6.2
Posted: 29 Apr 2013, 15:45
by Philippe Piot
Hello,
Thank you! it did work after installing the gsl-devel. I have a similar problem with png now (when compiling sddsplot); see below. I check and I have libpng-devel-1.2.49-1.el6_2.x86_64 and libpng-1.2.49-1.el6_2.x86_64 already installed. Thank you for your help, -- Philippe.
make[2]: Entering directory `/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64'
/usr/bin/g++ -o sddsplot -L/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64 -Wl,-rpath,/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64 SDDSaps.o put_link_date.o sddsplot.o sddsplotAP.o sddsplotConvert.o sddsplotFilter.o sddsplotLabels.o sddsplotMapping.o sddsplotRead.o sddsplotRecord.o sddsplotXfer.o sddsplotGroup.o -lgd -lpng -lmdbplt -lmdbcommon -lmatlib -lfftpack -lSDDS1 -lrpnlib -lmdbmth -lmdblib -lfontconfig -lz -lncurses -lrt -lpthread -lreadline -lcurses -lm -lrt -L/usr/lib64 -lXaw -lXmu -lXt -lXext -lX11 -lgcc
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_color':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:506: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_fill_box':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:465: undefined reference to `gdImageLine'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:460: undefined reference to `gdImageLine'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_vector':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:376: undefined reference to `gdImageCreateTrueColor'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:377: undefined reference to `gdImagePaletteCopy'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:379: undefined reference to `gdImageFilledRectangle'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:405: undefined reference to `gdImageSetThickness'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:406: undefined reference to `gdImageSetStyle'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:407: undefined reference to `gdImageLine'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:408: undefined reference to `gdImageSetThickness'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:415: undefined reference to `gdImageDestroy'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:411: undefined reference to `gdImageSetBrush'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:412: undefined reference to `gdImageLine'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_dot':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:326: undefined reference to `gdImageSetPixel'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:328: undefined reference to `gdImageSetPixel'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_text':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:270: undefined reference to `gdImagePng'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:280: undefined reference to `gdImageDestroy'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_graphics':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:229: undefined reference to `gdImageCreateTrueColor'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:231: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:232: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:238: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:239: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:240: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o):/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:241: more undefined references to `gdImageColorAllocate' follow
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/lib/linux-x86_64/libmdbplt.a(term.o): In function `PNG_graphics':
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:261: undefined reference to `gdImageFilledRectangle'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:234: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:235: undefined reference to `gdImageColorAllocate'
/nfs/x1/opt_nicadd/contrib/piot/Argonne/epics/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86_64/../png.trm:257: undefined reference to `gdImageColorAllocate'
Re: gsl problem compiling SDDS on SL6.2
Posted: 29 Apr 2013, 15:55
by soliday
First run:
yum install zlib-devel gd-devel libpng-devel libtiff-devel lapack-devel blas-devel gsl-devel motif-devel libXaw-devel ncurses-devel readline-devel
Then go to epics/extensions/include and delete all the *.h files.
Then go to epics/extensions/lib/linux-x86_64 and delete all the *a and *.so files.
Then go to epics/extensions/src/SDDS and run "make clean all"
I think there was some conflict because it built our SDDS/png code prior to you installing the png-devel. The above yum command should install all the packages you need to build this software.
Re: gsl problem compiling SDDS on SL6.2
Posted: 29 Apr 2013, 15:56
by soliday
I read your post wrong, but I still think this will help because the gd-devel library may be missing on your system.
Re: gsl problem compiling SDDS on SL6.2
Posted: 30 Apr 2013, 03:14
by Philippe Piot
Bob,
Thank you! It did work after following your suggestion. -- Philippe.
Re: gsl problem compiling SDDS on SL6.2
Posted: 03 Sep 2013, 19:02
by JoelFrederico
I'm trying to compile on OSX. If I run gsl-config --cflags, I get -I/sw/include, because I'm using Fink. I've set my CFLAGS environment variable to that, but it doesn't seem to make it into the compile:
Code: Select all
~/src/epics/extensions/src/SDDS/rpns/code$ make
make -C O.darwin-x86 -f ../Makefile TOP=../../../../.. T_A=darwin-x86 install
make[1]: Entering directory `/Users/joelfrederico/src/epics/extensions/src/SDDS/rpns/code/O.darwin-x86'
clang -c -DUNIX -Ddarwin -O3 -g -Wall -DEXPORT_RPNLIB -I../../../include -DUSE_GSL -arch x86_64 -fno-common -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../../../include/os/Darwin -I../../../../../include -I../../../../../../base/include/os/Darwin -I../../../../../../base/include -I../../../../../include ../math.c
../math.c:113:10: fatal error: 'gsl/gsl_sf_bessel.h' file not found
#include <gsl/gsl_sf_bessel.h>
^
1 error generated.
make[1]: *** [math.o] Error 1
make[1]: Leaving directory `/Users/joelfrederico/src/epics/extensions/src/SDDS/rpns/code/O.darwin-x86'
make: *** [install.darwin-x86] Error 2
I'm not quite sure how to procede... ideas?
Re: gsl problem compiling SDDS on SL6.2
Posted: 03 Sep 2013, 19:17
by JoelFrederico
One step closer - discovered it's CPATH, not CFLAGS, for clang. Now I need an LDFLAGS-equivalent...
Re: gsl problem compiling SDDS on SL6.2
Posted: 03 Sep 2013, 19:24
by JoelFrederico
Issue fixed:
Code: Select all
export CPATH=/sw/include
export LIBRARY_PATH=/sw/lib