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 <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 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Building StreamDevice with PCRE failing |
From: | "Manoussakis, Adamandios via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 17 Nov 2020 23:24:11 +0000 |
Hi Ryan, Thanks for the information, so I looked and I do see the shared object in /usr/lib/x86_64-linux-gnu/libpcre.so. At least in the release file of streamdevice/configure/RELEASE I have
PCRE_LIB=/usr/lib PCRE_INCLUDE=/usr/include/pcre Also checked the LD_LIBRARY_PATH env variable to make sure /usr/lib was in there if that might have been an issue. But still getting the same error. I feel like I am missing something that’s right in my face. From: Reno, Ryan <rreno at slac.stanford.edu> Hello, It appears ld is trying to link the static libpcre.a archive file into a shared object which is causing the error. 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 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 |