libtclSDDS.so not in sources

Moderators: cyao, soliday

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

libtclSDDS.so not in sources

Post by blanco-garcia » 30 Nov 2021, 06:55

Dear all,

I have compiled Elegant and Pelegant 2021.4.0 from sources but there is an error when running the geneticOptimizer related to SDDS libs.
I have checked the forum
viewtopic.php?f=11&t=1038&p=4292&hilit= ... File#p4292
and I see the same error resolved by loading libtclSDDS.so.

I tried to check in the sources but can't find it.

Best regards,
o
Last edited by blanco-garcia on 01 Dec 2021, 01:58, edited 1 time in total.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: libtclSDDS.so not in sources

Post by soliday » 30 Nov 2021, 10:55

It is in the OAG.1.27 source code package under the oag/apps/src/tcltkinterp/extensions/sdds directory.

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: libtclSDDS.so not in sources

Post by blanco-garcia » 01 Dec 2021, 03:47

Dear Soliday,

thank you very much for showing me the path.
Unfortunately, I see that there is a missed library when doing make inside the oag/apps/src/tcltkinterp/extensions/sdds dir:

Code: Select all

../tclSDDS.c:116:10: fatal error: ellLib.h: No such file or directory
 #include <ellLib.h>
          ^~~~~~~~~~
compilation terminated.
It seems it is not present in the epics.base.configure.tar file that I downloaded.
Therefore, I,
1) downloaded the entire epics base 7.0.6.1 from
https://epics.anl.gov/download/base/index.php
2) followed the instructions in
https://www.aps.anl.gov/Accelerator-Ope ... uide_Linux
3) and did again make on oag/apps/src/tcltkinterp.

That produced the missed binary libtclSDDS.so !

However, I'm not sure which epics/base should I keep because when trying to compile Pelegant with the epics/base 7.0.6.1, I see a different error that was not present before :

Code: Select all

../carriageReturn2newline.c: In function ‘main’:
../carriageReturn2newline.c:20:3: error: implicit declaration of function ‘SDDS_RegisterProgramName’ [-Werror=implicit-function-declaration]
   SDDS_RegisterProgramName(argv[0]);
   ^~~~~~~~~~~~~~~~~~~~~~~~
../carriageReturn2newline.c:32:11: error: implicit declaration of function ‘SDDS_Bomb’; did you mean ‘SDDS_LONG’? [-Werror=implicit-function-declaration]
           SDDS_Bomb("invalid -pipe syntax");
           ^~~~~~~~~
           SDDS_LONG
cc1: some warnings being treated as errors
Would it be ok to put the missing libs from epics/base 7.0.6.1 into the epics.base.config decompressed sources ?

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: libtclSDDS.so not in sources

Post by soliday » 01 Dec 2021, 11:18

There is something else going on. The epics.base.configure.tar.gz package contains the build rules from EPICS/Base without the actual code. These build rules were from an earlier version of EPICS/Base. One of the Tcl extension modules uses EPICS/Base and has been updated to work with the newer header files. I should update the epics.base.configure.tar.gz package to the newer build rules but I think the problem you are seeing can be solved by rebuilding SDDS with the build rules from EPICS/Base 7.0.6.1 that you have. Go to the epics/extensions/src/SDDS directory and run "make clean all". You will also have to rebuild the MPI libraries in SDDSlib and pgapack

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: libtclSDDS.so not in sources

Post by blanco-garcia » 08 Dec 2021, 02:30

Dear Soliday,

I dediced to launch a start to end compilation, almost automatic with a bash script, and adding the variables

Code: Select all

CROSS_COMPILER_TARGET_ARCHS=
SHARED_LIBRARIES=NO
to epics/base/configure/CONFIG.
Apart from that I make no modification to the procedure I followed before changing the epics/base.

It seems that I am missing a parameter or a library to be configure somewhere.
I'm attaching the script I use to compile in case it is of any help to understand the error.

The tar files I'm using are :
base-7.0.6.1.tar
epics.extensions.configure.tar
oag.apps.configure.tar SDDSepics.5.1.tar
SDDSmatlab.tar
elegant.2021.4.0.tar
oag.1.27.tar
SDDS.5.1.tar
SDDSjava.tar
Tktable2.11.tar

And the folder structure where I compile has the following:
myCompilationFolder
|-- defns
--|--defns.rpn
|-- base-7.0.6.1.tar
|-- epics.extensions.configure.tar
|-- oag.apps.configure.tar SDDSepics.5.1.tar
|-- SDDSmatlab.tar
|-- elegant.2021.4.0.tar
|-- oag.1.27.tar
|-- SDDS.5.1.tar
|-- SDDSjava.tar
|-- Tktable2.11.tar
|-- makeElegantxxx.sh


And my .bashrc :
## compilation elegant
export HOST_ARCH=linux-x86_64
export EPICS_HOST_ARCH=linux-x86_64
export myElegantSource=<pathtomyCompilationFolder>
export RPN_DEFNS=$myElegantSource/defns/defns.rpn
##binaries already compiled
export PATH=$myElegantSource/epics/base/bin/$HOST_ARCH:$PATH
export PATH=$myElegantSource/epics/extensions/bin/$HOST_ARCH:$PATH
export PATH=$myElegantSource/oag/apps/bin/$HOST_ARCH:$PATH
Attachments
makeElegant2.txt
(2.47 KiB) Downloaded 162 times

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: libtclSDDS.so not in sources

Post by blanco-garcia » 09 Dec 2021, 04:25

Dear Soliday,

epics base R3.16.2 finishes the compilation without errors and produces the libtclSDDS.so !

Should it be added to the path variables ?
I see it in oag/apps/lib/x86_64/ but, when I tried to test it launching sddsedit and opening a file it seems to be missing something, there is a message saying 'Invalid command name "sdds"' which I think is related to the missing library.

And I see that there is also a /oag/apps/include/tclSDDS.h , Should it be added to the path ?

Best
Attachments
Capture3.PNG
sddsedit error

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: libtclSDDS.so not in sources

Post by soliday » 09 Dec 2021, 11:36

To manually install it, you would need to copy the libtclSDDS.so and pkgIndex.tcl files to the lib/sdds/ directory where your tcl packages are. You can find the location by running:
tclsh
puts $tcl_pkgPath

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: libtclSDDS.so not in sources

Post by blanco-garcia » 10 Dec 2021, 03:25

Dear Soliday,

thank you very much. Unfortunately, I see that all locations in the tcl_pkgPath require permissions beyond my local home.
$ tclsh
% puts $tcl_pkgPath
/usr/lib64/tcl8.6 /usr/share/tcl8.6 /usr/lib64/tk8.6 /usr/share/tk8.6

Is there any way to add the oag/apps/lib/x86_64 path to tcl_pkgPath ?
I tried doing the following in a tcl script, but, it does not work :

Code: Select all

set host_arch linux-x86_64
set spath     /home/mypathtoElegantSources
set auto_path [linsert $auto_path 0 ${spath}/oag/apps/lib/${host_arch}]
This is autopath setup I get after adding paths to autopath :

Code: Select all

$ tclsh
% join $::auto_path \n
/home/mypathtoElegantSources/Tktable2.11
/home/mypathtoElegantSources/oag/apps/lib/linux-x86_64/
/home/mypathtoElegantSources/oag/apps/bin/linux-x86_64/
/usr/share/tcl8.6
/usr/lib64/tcl8.6
/usr/lib64/tk8.6
/usr/share/tk8.6

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: libtclSDDS.so not in sources

Post by soliday » 10 Dec 2021, 11:33

Try setting the TCLLIBPATH environment variable to /home/mypathtoElegantSources/sdds
And place the pkgIndex.tcl and libtclSDDS.so into that directory.

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: libtclSDDS.so not in sources

Post by blanco-garcia » 10 Dec 2021, 16:07

Thank you very much dear Soliday,

now it works !
I got initially confused by the pkgIndex.tcl file inside Tktable, but, the one that works is the one compiled in oag/apps/src/tcltkinterp/extensions/sdds/.

Thank you again,
o

Post Reply