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  2015  2016  2017  2018  2019  <20202021  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  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Building StreamDevice with PCRE failing
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Manoussakis, Adamandios" <manoussakis1 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 18 Nov 2020 02:54:37 +0000
Hi Adam,

The path printed in that error message from the EPICS build system is confusingly something like the last place it looked for the library, but that’s by no means the only place it tried to find it. We should have a make target that can tell you where it looked, but unfortunately we don’t.

You can usually tell the build system where to find a non-EPICS library by setting the <name>_DIR variable in the Makefile, so in your case I would try adding the line:

pcre_DIR = /usr/lib/x86_64-linux-gnu

The StreamDevice Makefile does some stuff with the PCRE_LIB variable that you have been setting but it doesn’t seem to set the variable I suggest above to that.

HTH,

- Andrew


On Nov 17, 2020, at 5:43 PM, Manoussakis, Adamandios via Tech-talk <tech-talk at aps.anl.gov> wrote:

Hi Jakub,
 
I did try doing that but still no luck in getting it to look in the correct directory, I thought maybe it was not finding that directory then going to the backup.  It seems to just be constantly looking in the base/epics/lib/linux-x86_64/ for some reason for the libpcre.so.
 
-Adam
 
From: Wlodek, Jakub <jwlodek at bnl.gov> 
Sent: Tuesday, November 17, 2020 3:41 PM
To: Reno, Ryan <rreno at slac.stanford.edu>; Manoussakis, Adamandios <manoussakis1 at llnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: Re: Building StreamDevice with PCRE failing
 
Hi Adam,
 
Did you try setting PCRE_LIB to  /usr/lib/x86_64-linux-gnu instead of /usr/lib, since you mentioned that is the exact location of the library?
Perhaps it will not find the library if it is in a nested directory.
 
Best,
Jakub

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Manoussakis, Adamandios via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, November 17, 2020 6:38 PM
To: Reno, Ryan <rreno at slac.stanford.edu>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: Building StreamDevice with PCRE failing
 
Hey Ryan,
 
Just an update but I wanted to test out where I thought it was looking for the libpcre.so.  So I copied the libpcre.so from /usr/lib over to myepics/base/lib/linux-x86_64/ and it was able to compile now (which is where the libpcre.a was).  This doesn’t seem like the correct way this should work as the RELEASE file should point towards the header and lib files which were in /usr/lib.  According to the documentation for streamdevice PCRE_LIB and PCRE_INCLUDE just needed to be set.  If anyone has an idea what might be wrong it would be greatly appreciated in just understanding why its looking in base/lib/linux-x86_64 and not the /usr/lib as defined in the RELEASE file of stream.
 
Thanks,
Adam
 
 
From: Reno, Ryan <rreno at slac.stanford.edu> 
Sent: Tuesday, November 17, 2020 2:01 PM
To: Manoussakis, Adamandios <manoussakis1 at llnl.gov>
Cc: tech-talk at aps.anl.gov
Subject: RE: Building StreamDevice with PCRE failing
 
Hello,
 
It appears ld is trying to link the static libpcre.a archive file into a shared object which is causing the error.

This has happened to me in the past when there is only a static lib available in the linker search path. In other words, ld couldn’t find a shared object named libpcre and so it falls back to trying to link the static archive.
 
If this is indeed the cause of the problem for you then you have a few options. You’ll need to either provide a libpcre shared object to link in to your build, build libpcre statically with -fPIC, or configure your streamdevice build to be static only.
 
Hope this helps!
 
Best,
Ryan
 
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Manoussakis, Adamandios via Tech-talk
Sent: Tuesday, November 17, 2020 12:32 PM
To: tech-talk <tech-talk at aps.anl.gov>
Subject: Building StreamDevice with PCRE failing
 
Hello,
 
I have been trying to build streamdevice with PCRE but cannot for the life of me figure out why the compilation keeps failing (using libpcre and libpcre-dev). The release file for streamdevice has PCRE_LIB=/usr/lib  and PCRE_INCLUDE=/usr/include/pcre which seem to be pointing to the correct libraries.  I have looked into trying to build PCRE as a standalone epics module as well as stated in the documentation but ran into similar issues using PCRE v8 and v10 from the ftp(didn’t see v7 which is what the documentation originally built with for standalone).  It looks like one of the pcre shared objects is failing to compile and recommends to compile with -fPIC flag but it looks like that flag is already being used.  Couldn’t find a ton of info out on the internet with regards to this type of compilation error except that usually the -fPIC (position independent code) fixes it.  Below is my compilation error
 
/usr/bin/ranlib libstream.a
/usr/bin/g++ -o libstream.so -fPIC -shared -Wl,-hlibstream.so -L/home/jetson/myepics/support/asyn/lib/linux-x86_64 -L/home/jetson/myepics/support/stream/lib/linux-x86_64 -L/home/jetson/myepics/base/lib/linux-x86_64 -L/usr/lib -Wl,-rpath,/home/jetson/myepics/support/asyn/lib/linux-x86_64 -Wl,-rpath,/home/jetson/myepics/support/stream/lib/linux-x86_64 -Wl,-rpath,/home/jetson/myepics/base/lib/linux-x86_64 -Wl,-rpath,/usr/lib           -rdynamic -m64             DebugInterface.o DummyInterface.o AsynDriverInterface.o EnumConverter.o BCDConverter.o RawConverter.o RawFloatConverter.o BinaryConverter.o ChecksumConverter.o MantissaExponentConverter.o TimestampConverter.o RegexpConverter.o devaoStream.o devaiStream.o devboStream.o devbiStream.o devmbboStream.o devmbbiStream.o devmbboDirectStream.o devmbbiDirectStream.o devlongoutStream.o devlonginStream.o devstringoutStream.o devstringinStream.o devwaveformStream.o devaaiStream.o devaaoStream.o devcalcoutStream.o devlsiStream.o devlsoStream.o devscalcoutStream.o StreamVersion.o StreamBuffer.o StreamError.o StreamProtocol.o StreamFormatConverter.o StreamCore.o StreamBusInterface.o StreamEpics.o   -lasyn -ldbRecStd -ldbCore -lca -lCom  -lpcre -lpthread    -lm -lrt -ldl -lgcc
/usr/bin/ld: /home/jetson/myepics/base/lib/linux-x86_64/libpcre.a(libpcre_la-pcre_jit_compile.o): relocation R_X86_64_PC32 against symbol `pcre_callout' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/jetson/myepics/base/configure/RULES_BUILD:288: recipe for target'libstream.so' failed
make[2]: *** [libstream.so] Error 1
make[2]: Leaving directory '/home/jetson/myepics/support/stream/src/O.linux-x86_64'
/home/jetson/myepics/base/configure/RULES_ARCHS:58: recipe for target'install.linux-x86_64' failed
make[1]: *** [install.linux-x86_64] Error 2
make[1]: Leaving directory '/home/jetson/myepics/support/stream/src'
/home/jetson/myepics/base/configure/RULES_DIRS:84: recipe for target 'src.install'failed
make: *** [src.install] Error 2

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
RE: Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk
References:
Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk
RE: Building StreamDevice with PCRE failing Reno, Ryan via Tech-talk
RE: Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk
Re: Building StreamDevice with PCRE failing Wlodek, Jakub via Tech-talk
RE: Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk

Navigate by Date:
Prev: streamdevice case sensitive sum8 checksum? Brown, Garth via Tech-talk
Next: Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk
Next: RE: Building StreamDevice with PCRE failing Manoussakis, Adamandios via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 18 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·