BackofenLab / IntaRNA

Efficient target prediction incorporating accessibility of interaction sites
https://backofenlab.github.io/IntaRNA/
Other
45 stars 27 forks source link

Install error: /usr/bin/ld: -f may not be used without -shared #206

Closed caochch closed 1 year ago

caochch commented 1 year ago

my command is :

./configure --prefix=/home/caochch --with-vrna=/home/caochch/Vienna --with-boost=/home/caochch make

The make process stopped and raised an error:

Making all in src make[1]: Entering directory /home/caochch/software/intaRNA-3.1.3/src' make all-recursive make[2]: Entering directory/home/caochch/software/intaRNA-3.1.3/src' Making all in . make[3]: Entering directory /home/caochch/software/intaRNA-3.1.3/src' make[3]: Leaving directory/home/caochch/software/intaRNA-3.1.3/src' Making all in IntaRNA make[3]: Entering directory /home/caochch/software/intaRNA-3.1.3/src/IntaRNA' CXX Accessibility.o CXX AccessibilityConstraint.o CXX AccessibilityFromStream.o CXX AccessibilityVrna.o CXX AccessibilityBasePair.o CXX HelixHandler.o CXX HelixHandlerNoBulgeMax.o CXX HelixHandlerUnpaired.o CXX IndexRange.o CXX IndexRangeList.o CXX Interaction.o CXX InteractionEnergy.o CXX InteractionEnergyBasePair.o CXX InteractionEnergyIdxOffset.o CXX InteractionEnergyVrna.o CXX InteractionRange.o CXX NussinovHandler.o CXX OutputConstraint.o CXX OutputStreamHandlerSortedCsv.o CXX OutputHandler.o CXX OutputHandlerEnsemble.o CXX OutputHandlerCsv.o CXX OutputHandlerInteractionList.o CXX OutputHandlerText.o CXX PredictionTrackerPairMinE.o CXX PredictionTrackerProfileMinE.o CXX PredictionTrackerSpotProb.o CXX PredictionTrackerSpotProbAll.o CXX PredictionTrackerProfileSpotProb.o CXX PredictorMfe.o CXX PredictorMfeSeedOnly.o CXX PredictorMfe2d.o CXX PredictorMfe2dSeed.o CXX PredictorMfe2dSeedExtension.o CXX PredictorMfe2dSeedExtensionRIblast.o CXX PredictorMfe2dHeuristic.o CXX PredictorMfe2dHeuristicSeed.o CXX PredictorMfe2dHelixBlockHeuristic.o CXX PredictorMfe2dHelixBlockHeuristicSeed.o CXX PredictorMfe2dHeuristicSeedExtension.o CXX PredictorMfeEns.o CXX PredictorMfeEns2d.o CXX PredictorMfeEns2dHeuristic.o CXX PredictorMfeEnsSeedOnly.o CXX PredictorMfeEns2dSeedExtension.o CXX PredictorMfeEns2dHeuristicSeedExtension.o CXX ReverseAccessibility.o CXX RnaSequence.o CXX SeedHandler.o CXX SeedHandlerExplicit.o CXX SeedHandlerMfe.o CXX SeedHandlerNoBulge.o CXX VrnaHandler.o CXX general.o AR libIntaRNA.a make[3]: Leaving directory/home/caochch/software/intaRNA-3.1.3/src/IntaRNA' Making all in bin make[3]: Entering directory /home/caochch/software/intaRNA-3.1.3/src/bin' CXX IntaRNA.o CXX CommandLineParsing.o In file included from CommandLineParsing.cpp:15:0: /home/caochch/include/boost/bind.hpp:41:265: note: #pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^ CXXLD IntaRNA /usr/bin/ld: -f may not be used without -shared collect2: error: ld returned 1 exit status make[3]: *** [IntaRNA] Error 1 make[3]: Leaving directory/home/caochch/software/intaRNA-3.1.3/src/bin' make[2]: [all-recursive] Error 1 make[2]: Leaving directory `/home/caochch/software/intaRNA-3.1.3/src' make[1]: [all] Error 2 make[1]: Leaving directory `/home/caochch/software/intaRNA-3.1.3/src' make: *** [all-recursive] Error 1

How can I fix this issue

martin-raden commented 1 year ago

Hi @caochch

it seems the new boost version (you are using) is more restrictive. The last error message provides (hopefully) a workaround, i.e. one has to set a specific boost flag.

Please try to reconfigure the project (which recreates the Makefiles with extended compiler flags) using

# clear the compiled stuff
make clean 
# reconfigure with new boost flag
CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS" ./configure [...]
# remake the project
make 

Note, you have to replace [...] with the configure flags you used so far.

Hope that helps. Please let me know if that's the case or if you are facing further troubles.

Best, Martin

caochch commented 1 year ago

command

make clean ./configure --prefix=/home/caochch --with-vrna=/home/caochch CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS" make

This procedure reported the same error. The logs are:

./configure --prefix=/home/caochch --with-vrna=/home/caochch CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS" checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether ln -s works... yes checking for ranlib... ranlib checking for a thread-safe mkdir -p... /bin/mkdir -p checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking dependency style of gcc... gcc3 checking dependency style of g++... gcc3 checking whether g++ supports C++11 features by default... no checking whether g++ supports C++11 features with -std=c++11... yes checking for a Python interpreter with version >= 3.6... python3 checking for python3... /home/caochch/python3.7.4/bin/python3 checking for python3 version... 3.7 checking for python3 platform... linux checking for python3 script directory... ${prefix}/lib/python3.7/site-packages checking for python3 extension module directory... ${exec_prefix}/lib/python3.7/site-packages checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether make supports nested variables... (cached) yes checking whether to use and provide pkg-config information... yes checking for pkg-config... yes checking whether to build with debug information... no checking whether to build statically linked binaries... no checking whether to enable multi-threading support... yes checking for OpenMP flag of C++ compiler... -fopenmp checking whether to use a multi-precision partition function data type (quadmath)... no checking for doxygen... no checking whether to enable coloring of console log output... yes checking whether to compile and install 'intarnapvalue' python module... no checking for boostlib >= 1.50.0 (105000)... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem... yes checking whether the Boost::Program_Options library is available... yes checking for exit in -lboost_program_options... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex... yes checking whether the Boost::IOStreams library is available... yes checking for exit in -lboost_iostreams... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking if zlib is wanted... yes checking for inflateEnd in -lz... yes checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking for size_t... yes checking how to run the C++ preprocessor... g++ -std=c++11 -E checking for ANSI C header files... (cached) yes configure: check if VRNA version >= 2.4.14 checking for VRNA... yes checking for compilation with Vienna RNA package headers... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/IntaRNA/Makefile config.status: creating src/IntaRNA/intarna_config.h config.status: creating src/bin/Makefile config.status: creating perl/Makefile config.status: creating R/Makefile config.status: creating python/Makefile config.status: creating python/bin/Makefile config.status: creating python/intarnapvalue/Makefile config.status: creating python/copomus/Makefile config.status: creating tests/Makefile config.status: creating tests/data/Makefile config.status: creating doc/Makefile config.status: creating IntaRNA.pc config.status: creating src/config.h config.status: src/config.h is unchanged config.status: executing depfiles commands configure:

====================================== IntaRNA 3.3.2

Features

Install Directories for given 'prefix'

You can run 'make', 'make tests' and 'make install' now!

Run 'make install prefix=XYZ' for installation in an alternative directory.

======================================

make Making all in src make[1]: Entering directory /software/intaRNA-3.3.2/src' make all-recursive make[2]: Entering directory/software/intaRNA-3.3.2/src' Making all in . make[3]: Entering directory /software/intaRNA-3.3.2/src' CXX easylogging++.o AR libeasylogging.a make[3]: Leaving directory/software/intaRNA-3.3.2/src' Making all in IntaRNA make[3]: Entering directory /software/intaRNA-3.3.2/src/IntaRNA' CXX Accessibility.o CXX AccessibilityConstraint.o CXX AccessibilityFromStream.o CXX AccessibilityVrna.o CXX AccessibilityBasePair.o CXX HelixHandler.o CXX HelixHandlerNoBulgeMax.o CXX HelixHandlerUnpaired.o CXX IndexRange.o CXX IndexRangeList.o CXX Interaction.o CXX InteractionEnergy.o CXX InteractionEnergyBasePair.o CXX InteractionEnergyIdxOffset.o CXX InteractionEnergyVrna.o CXX InteractionRange.o CXX NussinovHandler.o CXX OutputConstraint.o CXX OutputStreamHandlerSortedCsv.o CXX OutputHandler.o CXX OutputHandlerEnsemble.o CXX OutputHandlerCsv.o CXX OutputHandlerInteractionList.o CXX OutputHandlerText.o CXX PredictionTrackerPairMinE.o CXX PredictionTrackerProfileMinE.o CXX PredictionTrackerSpotProb.o CXX PredictionTrackerSpotProbAll.o CXX PredictionTrackerProfileSpotProb.o CXX PredictorMfe.o CXX PredictorMfeSeedOnly.o CXX PredictorMfe2d.o CXX PredictorMfe2dSeed.o CXX PredictorMfe2dSeedExtension.o CXX PredictorMfe2dSeedExtensionRIblast.o CXX PredictorMfe2dHeuristic.o CXX PredictorMfe2dHeuristicSeed.o CXX PredictorMfe2dHelixBlockHeuristic.o CXX PredictorMfe2dHelixBlockHeuristicSeed.o CXX PredictorMfe2dHeuristicSeedExtension.o CXX PredictorMfeEns.o CXX PredictorMfeEns2d.o CXX PredictorMfeEns2dHeuristic.o CXX PredictorMfeEnsSeedOnly.o CXX PredictorMfeEns2dSeedExtension.o CXX PredictorMfeEns2dHeuristicSeedExtension.o CXX ReverseAccessibility.o CXX RnaSequence.o CXX SeedHandler.o CXX SeedHandlerExplicit.o CXX SeedHandlerMfe.o CXX SeedHandlerNoBulge.o CXX VrnaHandler.o CXX general.o AR libIntaRNA.a make[3]: Leaving directory/software/intaRNA-3.3.2/src/IntaRNA' Making all in bin make[3]: Entering directory /software/intaRNA-3.3.2/src/bin' CXX IntaRNA.o CXX CommandLineParsing.o CXXLD IntaRNA /usr/bin/ld: -f may not be used without -shared collect2: error: ld returned 1 exit status make[3]: *** [IntaRNA] Error 1 make[3]: Leaving directory/software/intaRNA-3.3.2/src/bin' make[2]: [all-recursive] Error 1 make[2]: Leaving directory `/software/intaRNA-3.3.2/src' make[1]: [all] Error 2 make[1]: Leaving directory `/software/intaRNA-3.3.2/src' make: *** [all-recursive] Error 1

martin-raden commented 1 year ago

ok, one error gone but one still left.

please try extending the CXXFLAGS with -shared as suggested by the error message, i.e.

CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS -shared" ./configure [...]

Thanks for trying!

caochch commented 1 year ago

Different errors reported with -shared: (see also the attached config.log)

./configure --prefix=/home/caochch --with-vrna=/home/caochch CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS -shared" checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in /media/ibm_disk/work/caochch/project_My/project061_circRNA_targets/software/intaRNA-3.1.3': configure: error: cannot run C++ compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

Martin Raden @.***> 于2022年10月17日周一 20:37写道:

ok, one error gone but one still left.

please try extending the CXXFLAGS with -shared as suggested by the error message, i.e.

CXXFLAGS="-DBOOST_BIND_GLOBAL_PLACEHOLDERS -shared" ./configure [...]

Thanks for trying!

— Reply to this email directly, view it on GitHub https://github.com/BackofenLab/IntaRNA/issues/206#issuecomment-1280792099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJXTADOU43AOALDT6DUJUTWDVCBTANCNFSM6AAAAAARFVRLIM . You are receiving this because you were mentioned.Message ID: @.***>

martin-raden commented 1 year ago

mhh... ok, no idea left how to fix that...

BUT

a question that just popped up: are you compiling version 3.1.3 (as your path suggests) or the recent version?

martin-raden commented 1 year ago

is an installation via conda an option?

martin-raden commented 1 year ago

... or is it possible that you have already compiled and installed an older IntaRNA version (in /media/ibm_disk/work/caochch/project_My/project061_circRNA_targets/software/intaRNA-3.1.3) which happens to be in your build path? ie the compilation finds also the old lib and tries to link it?

martin-raden commented 1 year ago

To check the last possibility, you could try the following:

  1. go to the src/bin folder
  2. run make -n to get the compilation commands that would have been used
  3. copy the last line from the output (starting with echo " CXXLD " IntaRNA) and add -Wl,--trace | sort | uniq | grep -v "/tmp" (which will show all the object and libraries used for linking)
  4. check the output for other library versions of ViennaRNA (libRNA.a) or IntaRNA (libIntaRNA.a)

Hope that helps. Best, Martin

caochch commented 1 year ago

I will try to install via conda. 😂😂😂😂

Martin Raden @.***> 于2022年10月17日周一 21:24写道:

is an installation via conda https://github.com/BackofenLab/IntaRNA#instconda an option?

— Reply to this email directly, view it on GitHub https://github.com/BackofenLab/IntaRNA/issues/206#issuecomment-1280855105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJXTADUXIEBDUVGVZAJ7STWDVHPPANCNFSM6AAAAAARFVRLIM . You are receiving this because you were mentioned.Message ID: @.***>