Open xiaomiyang36 opened 3 years ago
Try removing the cget directory in the base of the Minimac 4 source, running export CFLAGS="-fPIC"
, and then rerunning cget, cmake, and make.
Alternatively, you might be able to just run export CFLAGS="-no-pie" && make clean && make
from the build directory.
Try removing the cget directory in the base of the Minimac 4 source, running
export CFLAGS="-fPIC"
, and then rerunning cget, cmake, and make.
I tried and failed to make , the error as follow:
[100%] Linking CXX executable minimac4
../cget/lib/libStatGen.a(StringBasics.o): In function String::appendFullFloat(float)': StringBasics.cpp:(.text+0x1082): undefined reference to
std::__cxx11::basic_ostringstream<char, std::char_traitsVcfGenotypeSample::updateGTString()': VcfGenotypeSample.cpp:(.text+0xaac): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits
These link errors you are experiencing suggest that Minimac4 and libStatGen are being built with different compilers. You could try running export CFLAGS="-fPIC -D_GLIBCXX_USE_CXX11_ABI=0" && make
.
If that doesn't work, please provide the output of uname -a; cat /etc/os-release; c++ --version; which c++
and attach the entire log output from cget, cmake, and make commands as separate files.
These link errors you are experiencing suggest that Minimac4 and libStatGen are being built with different compilers. You could try running
export CFLAGS="-fPIC -D_GLIBCXX_USE_CXX11_ABI=0" && make
.If that doesn't work, please provide the output of
uname -a; cat /etc/os-release; c++ --version; which c++
and attach the entire log output from cget, cmake, and make commands as separate files.
I tried to run export CFLAGS="-fPIC -D_GLIBCXX_USE_CXX11_ABI=0" && make and the same problem occured. Those output logfile as follow Thank you a billion! output.zip
I'm guessing that libStatGen is being built with /usr/local/bin/c++
or /usr/local/bin/g++
and Minimac4 is being built with /usr/bin/c++
. You might be able to solve this by reconfiguring Minimac4 from the build
directory with:
cmake -DCMAKE_CXX_COMPILER=/usr/local/bin/c++ .. && make clean && make VERBOSE=1
Otherwise, I would just use the prebuilt binary at https://github.com/statgen/Minimac4/releases/download/v1.0.2/minimac4-1.0.2-Linux.sh. You can install the binary to a location of your choosing with bash minimac4-1.0.2-Linux.sh --prefix=/location/of/your/choosing
prefix=/
This does work. Than you very much!!!
Can I ask for some help? I ran into some trouble while installing Minimac4 and would greatly appreciate it. I tried the following steps: "git clone https://github.com/statgen/Minimac4.git cd Minimac4 bash install.sh" but it failed: bash install.sh Installing Dependencies - Libstatgen ... Generating MakeFiles ... -- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OMPP_LIBRARY linked by target "minimac4" in directory /home/hunau/mahj/chicken/imputation_vcf_1/minimac_impute/Minimac4-master
CMake Error in CMakeLists.txt: Imported target "savvy" includes non-existent path
"/home/hunau/mahj/anaconda3/envs/py3.11/include/htslib"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
The path was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and references files it does not provide.
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
[ 14%] Building CXX object CMakeFiles/minimac4.dir/src/dosage_writer.cpp.o
In file included from /home/hunau/mahj/anaconda3/envs/py3.11/include/shrinkwrap/stdio.hpp:4:0,
from /home/hunau/mahj/anaconda3/envs/py3.11/include/shrinkwrap/istream.hpp:4,
from /home/hunau/mahj/chicken/imputation_vcf_1/minimac_impute/Minimac4-master/src/recombination.hpp:6,
from /home/hunau/mahj/chicken/imputation_vcf_1/minimac_impute/Minimac4-master/src/unique_haplotype.hpp:5,
from /home/hunau/mahj/chicken/imputation_vcf_1/minimac_impute/Minimac4-master/src/dosage_writer.hpp:5,
from /home/hunau/mahj/chicken/imputation_vcf_1/minimac_impute/Minimac4-master/src/dosage_writer.cpp:1:
/usr/include/c++/4.8.2/streambuf: In constructor ‘shrinkwrap::stdio::filebuf::filebuf(shrinkwrap::stdio::filebuf::self_type&&)’:
/usr/include/c++/4.8.2/streambuf:802:7: error: ‘std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits
The install.sh script should no longer be used (should have been deleted). Instead follow the instructions in the README to build from source. You will likely need to use a gcc version >= 5.
Instead of building from source, I recommend using the pre-built executable that can be installed by running https://github.com/statgen/Minimac4/releases/download/v4.1.2/minimac4-4.1.2-Linux-x86_64.sh.
Hi, I have met problem when I installed minimac4 . the command I used as follow: /home/rw/guanglinHe/software/anaconda3/bin/cget install -f ./requirements.txt #-- Installing:/home/XiaominYang/biosoftware/Minimac4/cget/cget/pkg/statgen__libStatGen/install/lib/libStatGen.a
Successfully installed statgen/libStatGen mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cget/cget/cget.cmake .. make
the problem as follow: Scanning dependencies of target minimac4 [ 8%] Building CXX object CMakeFiles/minimac4.dir/src/Analysis.cpp.o [ 16%] Building CXX object CMakeFiles/minimac4.dir/src/AnalysisChunks.cpp.o [ 25%] Building CXX object CMakeFiles/minimac4.dir/src/DosageData.cpp.o [ 33%] Building CXX object CMakeFiles/minimac4.dir/src/HaplotypeSet.cpp.o [ 41%] Building CXX object CMakeFiles/minimac4.dir/src/Imputation.cpp.o [ 50%] Building CXX object CMakeFiles/minimac4.dir/src/ImputationStatistics.cpp.o [ 58%] Building CXX object CMakeFiles/minimac4.dir/src/Main.cpp.o [ 66%] Building CXX object CMakeFiles/minimac4.dir/src/MarkovModel.cpp.o [ 75%] Building CXX object CMakeFiles/minimac4.dir/src/MarkovParameters.cpp.o [ 83%] Building CXX object CMakeFiles/minimac4.dir/src/Unique.cpp.o [ 91%] Building CXX object CMakeFiles/minimac4.dir/src/Estimation.cpp.o [100%] Linking CXX executable minimac4 /usr/bin/ld: ../cget/lib/libStatGen.a(InputFile.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(Parameters.o): relocation R_X86_64_32S against symbol
_ZTV13ParameterList' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(PhoneHome.o): relocation R_X86_64_32S against symbol_ZN9PhoneHome6ourURLB5cxx11E' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(StringBasics.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(StringMap.o): relocation R_X86_64_32S against symbol_ZTV9StringMap' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(UncompressedFileType.o): relocation R_X86_64_32S against symbol
_ZTV20UncompressedFileType' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfFile.o): relocation R_X86_64_32S against symbol_ZTV7VcfFile' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfFileReader.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfHeader.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfRecord.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfRecordFilter.o): relocation R_X86_64_32 against.bss' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfRecordGenotype.o): relocation R_X86_64_32S against symbol
_ZN17VcfRecordGenotype14ourStoreFieldsB5cxx11E' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfRecordInfo.o): relocation R_X86_64_32S against symbol_ZTV13VcfRecordInfo' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfSubsetSamples.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfRecordDiscardRules.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(knetfile.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(BgzfFileType.o): relocation R_X86_64_32S against symbol_ZTV12BgzfFileType' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(BgzfFileTypeRecovery.o): relocation R_X86_64_32S against symbol
_ZTV10FileReader' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(Error.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(FileType.o): relocation R_X86_64_32S against symbol
_ZTV8FileType' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(GzipFileType.o): relocation R_X86_64_32S against symbol_ZTV12GzipFileType' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(GzipHeader.o): relocation R_X86_64_32S against symbol
_ZN20UncompressedFileType6isOpenEv' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(StatGenStatus.o): relocation R_X86_64_32S against symbol_ZN13StatGenStatus16enumStatusStringE' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(StringArray.o): relocation R_X86_64_32S against symbol
_ZTV11StringArray' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(Tabix.o): relocation R_X86_64_32S against symbol_ZTV5Tabix' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfGenotypeField.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfGenotypeFormat.o): relocation R_X86_64_32S against symbol_ZTV17VcfGenotypeFormat' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(VcfGenotypeSample.o): relocation R_X86_64_32S against symbol
_ZTV17VcfGenotypeSample' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(bgzf.o): relocation R_X86_64_32S against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(ErrorHandler.o): relocation R_X86_64_32 against symbol
_ZSt4cerr@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(IndexBase.o): relocation R_X86_64_32S against symbol_ZTV9IndexBase' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../cget/lib/libStatGen.a(Sort.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status CMakeFiles/minimac4.dir/build.make:356: recipe for target 'minimac4' failed make[2]: [minimac4] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/minimac4.dir/all' failed make[1]: [CMakeFiles/minimac4.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2I will be appreciated if anyone can give me somea suggestions.