Page 1 of 1

SDDS source compilation in Debian

Posted: 12 Apr 2024, 04:49
by blanco-garcia
Dear all,
I've been trying to compile the SDDS tools using SDDSbase 7.0.8 on a Debian 12 machine and I get the following error. Is there any variable that should be configured differently on Debian?

Code: Select all

...
Installing script ../../../../bin/linux-x86_64/hpVecRestore
Installing script ../../../../bin/linux-x86_64/hpVecSave
Installing script ../../../../bin/linux-x86_64/hpVecDisplay
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE          -D_X86_64_ -DUNIX  -Dlinux      -O3 -g -I/usr/include/tcl   -Wall -Werror-implicit-function-declaration    -I../../../../../../epics/extensions/include -I../../../../../../epics/extensions/src/SDDS/lzma -DIEEE_MATH  -mtune=generic     -m64  -I. -I../O.Common -I. -I. -I.. -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include   -I../../../../../apps/include -I../../../../../../epics/base/include/compiler/gcc -I../../../../../../epics/base/include/os/Linux -I../../../../../../epics/base/include   -I../../../../../../epics/extensions/include        -c ../hpSocketSend.c
/usr/bin/g++ -o hpSocketSend  -L/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64 -L/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/oag/apps/lib/linux-x86_64 -Wl,-rpath,/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64 -Wl,-rpath,/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/oag/apps/lib/linux-x86_64          -rdynamic -m64         hpSocketSend.o    -lmdbcommon -lmatlib -lSDDS1 -lrpnlib -lmdbmth -lnamelist -lmdblib -llzma  -lz -lpthread    -lm -lrt -ldl -lgcc
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64/librpnlib.a(rpn_sub.o): in function `rpn':
/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../rpn_sub.c:125: undefined reference to `gsl_set_error_handler_off'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64/librpnlib.a(math.o): in function `rpn_KN':
/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:643: undefined reference to `gsl_sf_bessel_Knu'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:643: undefined reference to `gsl_sf_bessel_Knu'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64/librpnlib.a(math.o): in function `rpn_IN':
/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:691: undefined reference to `gsl_sf_bessel_Inu'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:688: undefined reference to `gsl_sf_bessel_Inu'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:693: undefined reference to `gsl_sf_bessel_Inu'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64/librpnlib.a(math.o): in function `rpn_Lambert_W0':
/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:1115: undefined reference to `gsl_sf_lambert_W0'
/usr/bin/ld: /home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/lib/linux-x86_64/librpnlib.a(math.o): in function `rpn_Lambert_Wm1':
/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/SDDS/rpns/code/O.linux-x86_64/../math.c:1133: undefined reference to `gsl_sf_lambert_Wm1'
collect2: error: ld returned 1 exit status
make[2]: *** [../../../../../../epics/base/configure/RULES_BUILD:231: hpSocketSend] Error 1
make[2]: Leaving directory '/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/oag/apps/src/utils/hpvec/O.linux-x86_64'
make[1]: *** [../../../../../epics/base/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
make[1]: Leaving directory '/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/oag/apps/src/utils/hpvec'
make: *** [../../../../epics/base/configure/RULES_DIRS:85: hpvec.install] Error 2
Best regards,
o

Re: SDDS source compilation in Debian

Posted: 12 Apr 2024, 09:29
by soliday
That is not a directory that is normally compiled. The only thing in oag/apps/src/utils that would be useful is the tools subdirectory.

Re: SDDS source compilation in Debian

Posted: 23 Apr 2024, 03:21
by blanco-garcia
Dear Soliday,
alright. It might be a component in epics base that I compiled without knowing it was not necessary just because it is in the epics base Makefile. I will try to do it with the epics version distributed with elegant.

Best regards,
o

Re: SDDS source compilation in Debian

Posted: 23 Apr 2024, 11:20
by blanco-garcia
Dear Soliday,
it was my mistake. I was missing the epics.base.configure file. Now I have it and the compilation stops at cadef.h. Do you have any suggestion ?

Code: Select all

make[1]: Entering directory '/home/oblanco/Documents/public/progs/elegant/2023.4/elegant_compilation/epics/extensions/src/oagca/O.linux-x86_64'
/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE          -D_X86_64_ -DUNIX  -Dlinux      -O3 -g -I/usr/include/tcl   -Wall    -I../../../../base/include -I../../../../base/include/os/Linux -DACCESS_SECURITY -D_NO_PROTO -I../../../src/SDDS/lzma -fpermissive  -mtune=generic     -m64  -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include      -I../../../include           -c ../cavput.cc
../cavput.cc:122:10: fatal error: cadef.h: No such file or directory
  122 | #include <cadef.h>
      |          ^~~~~~~~~
compilation terminated.


Re: SDDS source compilation in Debian

Posted: 23 Apr 2024, 11:38
by soliday
cadef.h is part of the EPICS Base distribution. Are you using EPICS? If not, then you will not need to build the oagca or the SDDSepics directories. Often people are only interested in the SDDS toolkit and elegant. That is why we supply the epics.base.configure file. We use the compile rules from EPICS without needing the entire EPICS source code tree. If however you are using EPICS, then you will need to downloads the latest version from https://epics.anl.gov/download/base/base-7.0.8.tar.gz

You would use this in-place of the epcs.base.configure files, and would have to compile it before compiling our software.

Re: SDDS source compilation in Debian

Posted: 24 Apr 2024, 06:14
by blanco-garcia
Dear Soliday,
few years ago I wanted to have sddsedit working on linux and in order to compile it I needed the whole epics base.
This might indeed not longer be the case, I will try without epics and with the new epics base on your link.

Re: SDDS source compilation in Debian

Posted: 24 Apr 2024, 08:53
by soliday
Technically sddsedit does not use EPICS, however we have an EPICS package that is built by default for the scripting tools. You can skip it if you edit oag/apps/src/tcltkinterp/extensions/Makefile and change:
DIRS = ca os sdds rpn
to
DIRS = os sdds rpn

Re: SDDS source compilation in Debian

Posted: 19 Aug 2024, 06:56
by blanco-garcia
Dear Soliday,
thank you for your help. I finally suceed compiling all except oag/apps/src/utils because of the missing gsl library I mentioned before.
This discussion could be closed.
Best regards,
o