EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Problem with libhdf5.a when installling areaDetector-2-1
From: Mark Rivers <[email protected]>
To: Cristian Savlovschi <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 9 Mar 2015 14:17:08 +0000
Hi Christi,

I think something must be wrong with your setup.  Others are not having these problems.

This is from my areaDetector/configure/CONFIG_SITE.local:

###########################################
# Define the location of the hdf5, sz, and GraphicsMagick libraries
HDF5         = /usr/local64
HDF5_LIB     = $(HDF5)/lib
HDF5_INCLUDE = -I$(HDF5)/include

ifeq ($(OS_CLASS), WIN32)
    HDF5_STATIC_BUILD=$(STATIC_BUILD)
endif

SZIP           = /usr/local64
SZIP_LIB       = $(SZIP)/lib
SZIP_INCLUDE   = -I$(SZIP)/include
###########################################

Note that I have defined HDF5 and SZIP to be /usr/local64, which is definitely not a standard location.

This is part of the output when I build nexusSrc:

###########################################
/usr/bin/gcc -c  -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500           -D_X86_64_  -DUNIX  -D_DEFAULT_SOURCE -Dlinux  -D_REENTRANT   -O3 -g   -Wall     -DHDF5 -D_FILE_OFFSET_BITS=64  -m64     -fPIC -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include     -I/corvette/usr/local/epics/base-3.14.12.4/include/os/Linux -I/corvette/usr/local/epics/base-3.14.12.4/include  -I/corvette/home/epics/devel/asyn-4-26/include  -I/corvette/home/epics/devel/areaDetector-2-1/ADBinaries/include  -I/corvette/home/epics/devel/areaDetector-2-1/ADCore/include     -I/usr/local64/include   ../stptok.c 

/usr/bin/ar -rc   libNeXus.a         napi.o napi5.o napiu.o nxdataset.o nxio.o nxstack.o nxxml.o stptok.o
/usr/bin/ranlib libNeXus.a
/usr/bin/g++ -o libNeXus.so -shared -fPIC -Wl,-hlibNeXus.so -L/usr/local64/lib -Wl,-rpath,/usr/local64/lib       -m64                napi.o napi5.o napiu.o nxdataset.o nxio.o nxstack.o nxxml.o stptok.o   -lhdf5 -lsz -Wl,-Bdynamic  -lpthread   -lreadline -lm -lrt -ldl -lgcc
###########################################

Note that the gcc command includes the flag

-I/usr/local64/include

So that flag is being based on settings from CONFIG_SITE.local.

The g++ command that links the library includes the following flags:
-L/usr/local64/lib 
-Wl,-rpath,/usr/local64/lib

So those flags are also being based on the settings in CONFIG_SITE.local

Please undo any changes you have made to ADCore and then send:

- The contents of areaDetector/configure/CONFIG_SITE.local

- The output when you try to compile and link in the nexusSrc directory as above.

Is it possible that you have a file CONFIG_SITE.local.linux-x86_64 that is replacing the values in CONFIG_SITE.local?

Mark

________________________________________
From: Cristian Savlovschi [[email protected]]
Sent: Monday, March 09, 2015 8:44 AM
To: Mark Rivers; [email protected]
Subject: RE: Problem with libhdf5.a when installling areaDetector-2-1

Mark,

The paths in /areaDetector-2-1/configure/CONFIG_SITE.local are configured
according to the instructions. But I realized that this file may actually
not get included in the /areaDetector-2-1/ADCore/ADApp/nexusSrc/Makefile,
hence the errors that appear when building the source code in
/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc. (I remember now that
there was another error related to inclusion of hdf5.h, which I'd initially
solved by copying the file)

If I edit /areaDetector-2-1/ADCore/ADApp/nexusSrc/Makefile and replace the
macros HDF5_INCLUDE, HDF5_LIB and SZIP_LIB with the actual values, then
those errors (reported in the previous emails) no longer appear, but I end
up in another error (see attached file err3.txt)

So the questions now are:
Q1: Could there be an 'include' problem in
/areaDetector-2-1/ADCore/ADApp/nexusSrc/Makefile, since the values of the 3
macros above do not get propagated to the compiler?
Q2: are there any restrictions related to the placement of areaDetector-x-y
top folder relative the epics base or synApps folder? Should I place
areaDetector-2-1 inside synApps_5_7/support/?
Q3: are there any compatibility issues between areaDetector-2-1 and
synApps_5_7? I'm asking this because in
/areaDetector-2-1/configure/EXAMPLE_RELEASE_PRODS.local the default versions
for some modules are newer than the ones found in synApps_5_7 (which is the
most recent release to this date).

Thanks again
Cristi



-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: Monday, March 9, 2015 2:15 PM
To: Cristian Savlovschi; [email protected]
Subject: RE: Problem with libhdf5.a when installling areaDetector-2-1

Hi Christi,




> A similar message was reported also for libsz.a, so I made a symbolic link
for the 2 libs, hoping to overcome this error:

> ln -s /usr/local/hdf5/lib/libhdf5.a
/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64

> ln -s /usr/local/lib/libhsz.a
/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64


You should not make those links.  Rather you should follow the instructions
in the installation guide for areaDetector 2-X here:


https://github.com/areaDetector/areaDetector/blob/master/INSTALL_GUIDE.md


Edit the top-level areaDetector-2-1/configure/CONFIG_SITE.local (start with
EXAMPLE_CONFIG_SITE.local as an example) to define where the HDF5, SZLIB,
etc. libraries are.


Mark


________________________________
From: Cristian Savlovschi [[email protected]]
Sent: Monday, March 09, 2015 3:43 AM
To: Mark Rivers; [email protected]
Subject: RE: Problem with libhdf5.a when installling areaDetector-2-1


Hi Mark,



Thanks for the quick reply,

Here are some more details about my build process that will help explain
this error message:



1. My EPICS directory tree looks like this:

               /opt/epics/

                              /areaDetector-2-1

                                             /......

                              /base-3.14.12.4

                              /IOC_example1

                              /synApps_5_7

                                             /support


/allenBradley-2-2


/areaDetector-1-9-1

                                                            /asyn-4-21

                                                            /.....



2. I did install hdf5 in /usr/local/hdf5 (although reported a lot of
warnings during the build - type conversions etc ); the libhdf5.a is located
in /usr/local/hdf5/lib. In this configuration the 'make' of areaDetector
fails with:

...

make -C ./nexusSrc install

make[3]: Entering directory
`/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc'

make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install

make[4]: Entering directory
`/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64'

make[4]: *** No rule to make target `../../../lib/linux-x86_64/libhdf5.a',
needed by `libNeXus.so'.  Stop.

make[4]: Leaving directory
`/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64'

make[3]: *** [install.linux-x86_64] Error 2



    A similar message was reported also for libsz.a, so I made a symbolic
link for the 2 libs, hoping to overcome this error:

ln -s /usr/local/hdf5/lib/libhdf5.a
/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64

ln -s /usr/local/lib/libhsz.a
/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64



3. Not sure if this is relevant, but in an earlier stage of the areaDetector
make, I had received another error mentioning that there was a duplicate of
AREA_DETECTOR macro (found in both
/opt/epics/areaDetector-2-1/configure/RELEASE_PATHS.local and
/opt/epics/synApps_5_7               /support/areaDetector-1-9-1/RELEASE),
so I commented out the latter.



regs,

Cristi



-----Original Message-----
From: Mark Rivers [mailto:[email protected]]
Sent: Friday, March 6, 2015 6:37 PM
To: Cristian Savlovschi; [email protected]
Subject: RE: Problem with libhdf5.a when installling areaDetector-2-1



Hi Cristi,



I don't understand this error message:



/usr/bin/ld: /opt/epics/areaDetector-2-1/ADCore/lib/linux-x86_64/libhdf5.a



There should not be a libhdf5.a in that directory.  libhdf5 should be in
some directory outside of ADCore.  It looks like in your case you are
building hdf5 in /usr/local/hdf5.  Where did that file in
ADCore/lib/linux-x86_64 come from?



Here is the contents of the ADCore/lib/linux-x86_64/ directory on my system
after a successful build of ADCore.



/home/epics/devel/areaDetector/ADCore/lib/linux-x86_64

corvette:ADCore/lib/linux-x86_64>ls -l

total 15728

-r--r--r-- 1 epics epics 1649396 Mar  5 15:36 libADBase.a -r-xr-xr-x 1 epics
epics  727178 Mar  5 15:36 libADBase.so

-r--r--r-- 1 epics epics 5930442 Mar  6 09:57 libNDPlugin.a -r-xr-xr-x 1
epics epics 2518160 Mar  6 09:57 libNDPlugin.so

-r--r--r-- 1 epics epics  483936 Mar  5 15:36 libNeXus.a -r-xr-xr-x 1 epics
epics  262674 Mar  5 15:36 libNeXus.so

-r--r--r-- 1 epics epics 2299174 Mar  5 15:36 libnetCDF.a -r-xr-xr-x 1 epics
epics 1645681 Mar  5 15:36 libnetCDF.so

-r--r--r-- 1 epics epics  373970 Mar  5 15:40 libsimDetector.a -r-xr-xr-x 1
epics epics  194233 Mar  5 15:40 libsimDetector.so





Mark







________________________________

From: [email protected]<mailto:[email protected]>
[[email protected]] on behalf of Cristian Savlovschi
[[email protected]]

Sent: Friday, March 06, 2015 6:44 AM

To: [email protected]<mailto:[email protected]>

Subject: Problem with libhdf5.a when installling areaDetector-2-1



Hi,



I'm trying to create a demo project based on EPICS, in the following
configuration:

IOC (CA server) running on UBUNTU 14.04 linux-x86_64 CA Client (CSS) running
on Windows 8 I've installed  EPICS Base 3.14.12.4 + synApps 5.7 succesfully
and was able to run the IOC for DG645 delay generator and connect to the hw
device.



Now I'm stuck on the next step, which is to install another IOC application,
for a Point Grey Flea3 CCD camera.

The driver for this device has been added to areaDetector package starting
with release 2.0 (Apr 2014). The most recent version of areaDetector in
synApps (at present time - March 2015) is 1.9.1, therefore I've decided to
update this package. I've downloaded it from github and tried to install it
in a separate 'TOP' folder following the installation instructions in
https://github.com/areaDetector/areaDetector/blob/master/INSTALL_GUIDE.md

After customizing all the configuration files and installing all 3rd party
packages, my 'make' is failing with the following error message:



            make[4]: Entering directory
`/opt/epics/areaDetector-2-1/ADCore/ADApp/nexusSrc/O.linux-x86_64'

            /usr/bin/g++ -o libNeXus.so -shared -fPIC -Wl,-hlibNeXus.so
-L/opt/epics/areaDetector-2-1/ADCore/lib/linux-x86_64
-Wl,-rpath,/opt/epics/areaDetector-2-1/ADCore/lib/linux-x86_64       -m64
napi.o napi5.o napiu.o nxdataset.o nxio.o nxstack.o nxxml.o stptok.o
-lhdf5 -lsz   -lpthread   -lreadline -lm -lrt -ldl -lgcc

            /usr/bin/ld:
/opt/epics/areaDetector-2-1/ADCore/lib/linux-x86_64/libhdf5.a(H5.o):
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making
a shared object; recompile with -fPIC

            /opt/epics/areaDetector-2-1/ADCore/lib/linux-x86_64/libhdf5.a:
error adding symbols: Bad value

            collect2: error: ld returned 1 exit status



I cannot get pass this point, even after trying to rebuild the HDF5 package
with additional -fPIC flag:

LDFLAGS=-fPIC ./configure --prefix=/usr/local/hdf5 --with-szlib=/usr/local



Any suggestions?

Note that I'm a EPICS & Linux beginner (~1 month)..



Thanks!

Cristi S


References:
Problem with libhdf5.a when installling areaDetector-2-1 Cristian Savlovschi
RE: Problem with libhdf5.a when installling areaDetector-2-1 Mark Rivers
RE: Problem with libhdf5.a when installling areaDetector-2-1 Cristian Savlovschi
RE: Problem with libhdf5.a when installling areaDetector-2-1 Mark Rivers
RE: Problem with libhdf5.a when installling areaDetector-2-1 Cristian Savlovschi

Navigate by Date:
Prev: RE: Problem with libhdf5.a when installling areaDetector-2-1 Cristian Savlovschi
Next: RE: Problem with libhdf5.a when installling areaDetector-2-1 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Problem with libhdf5.a when installling areaDetector-2-1 Cristian Savlovschi
Next: RE: Problem with libhdf5.a when installling areaDetector-2-1 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·