metaDMG-dev / metaDMG-cpp

metaDMG-cpp
2 stars 2 forks source link

Error in make command #6

Closed MinLuke closed 1 year ago

MinLuke commented 1 year ago

Goodmorning, After installing htslib as indicated I downloaded the metaDM.cpp.git , I entered in the folder and execute make HTSSRC = ../htslib/ But I get the following message and I do not understand why I am getting this error, could you please help me to understand how to solve it?

`Crypto library is available to link; adding -lcrypto to LIBS HTSSRC not defined, assuming systemwide installation -lhts g++ -c -O3 -std=c++11 ngsLCA.cpp ngsLCA.cpp:4:56: fatal error: htslib/hts.h: File o directory not exist

include <htslib/hts.h> // for htsFormat, seq_nt16_str

                                                    ^

compilation terminated. make: *** [ngsLCA.o] Error 1`

ANGSD commented 1 year ago

Could you supply me with the full output of the compilation process; make clean;make HTSSRC=../htslib/

Den ons. 25. jan. 2023 kl. 10.34 skrev MinLuke @.***>:

Goodmorning, After installing htslib as indicated I downloaded the metaDM.cpp.git , I entered in the folder and execute make HTSSRC = ../htslib/ But I get the following error message and I do not understand why, could you please help me understanding what to do? thank you

Crypto library is available to link; adding -lcrypto to LIBS HTSSRC not defined, assuming systemwide installation -lhts g++ -c -O3 -std=c++11 ngsLCA.cpp ngsLCA.cpp:4:56: fatal error: htslib/hts.h: File o directory non esistente #include <htslib/hts.h> // for htsFormat, seq_nt16_str ^ compilation terminated.

— Reply to this email directly, view it on GitHub https://github.com/metaDMG-dev/metaDMG-cpp/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQOR3VZGCKD2WVJX5DPCU3WUDXRVANCNFSM6AAAAAAUGCWGHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MinLuke commented 1 year ago

Yes of course

make clean;make HTSSRC=../htslib/

`Crypto library is available to link; adding -lcrypto to LIBS HTSSRC not defined, assuming systemwide installation -lhts rm -rf metaDMG-cpp .o .d version.h test/output Crypto library is available to link; adding -lcrypto to LIBS HTSSRC defined echo '#define METADAMAGE_VERSION "0.2-46-gedaf069-dirty"' > version.h g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA.cpp ngsLCA.cpp: In function ‘char2int setlevels(int, char, int&)’: ngsLCA.cpp:64:51: warning: deprecated conversion from string constant to ‘std::map<char, int, cmp_str>::key_type {aka char*}’ [-Wwrite-strings] char2int::iterator it = c2i.find("species"); ^ g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA.cpp >ngsLCA.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp >ngsLCA_cli.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp >main_pmd.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib profile.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib profile.cpp >profile.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib metaDMG.cpp In file included from metaDMG.cpp:20:0: regression.h:5:29: fatal error: eigen3/Eigen/Core: File or directory not exist

include <eigen3/Eigen/Core>

                         ^

compilation terminated. make: *** [metaDMG.o] Error 1`

ANGSD commented 1 year ago

ok, complains that eigen hasnt been installed.

If you are on ubuntu the dependencies can be installed with.

sudo apt install libgsl-dev libeigen3-dev

Den ons. 25. jan. 2023 kl. 11.31 skrev MinLuke @.***>:

Yes of course

make clean;make HTSSRC=../htslib/ Crypto library is available to link; adding -lcrypto to LIBS HTSSRC not defined, assuming systemwide installation -lhts rm -rf metaDMG-cpp .o .d version.h test/output Crypto library is available to link; adding -lcrypto to LIBS HTSSRC defined echo '#define METADAMAGE_VERSION "0.2-46-gedaf069-dirty"' > version.h g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA.cpp ngsLCA.cpp: In function ‘char2int setlevels(int, char, int&)’: ngsLCA.cpp:64:51: warning: deprecated conversion from string constant to ‘std::map<char, int, cmp_str>::key_type {aka char*}’ [-Wwrite-strings] char2int::iterator it = c2i.find("species"); ^ g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA.cpp >ngsLCA.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp

ngsLCA_cli.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp main_pmd.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib profile.cpp g++ -MM -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib profile.cpp >profile.d g++ -c -O3 -std=c++11 -I/home/minluk/script/metaDMG-core/htslib metaDMG.cpp In file included from metaDMG.cpp:20:0: regression.h:5:29: fatal error: eigen3/Eigen/Core: File or directory not exist #include <eigen3/Eigen/Core> ^ compilation terminated. make: *** [metaDMG.o] Error 1

— Reply to this email directly, view it on GitHub https://github.com/metaDMG-dev/metaDMG-cpp/issues/6#issuecomment-1403399632, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQOR3UQA7N3TA6W4E5T4MLWUD6I3ANCNFSM6AAAAAAUGCWGHA . You are receiving this because you commented.Message ID: @.***>

miwipe commented 1 year ago

Alternatively you can install the dependencies using conda/mamba:

installation of metaDMG-cpp, by making environment with dependencies

mamba create -n metaDMG-cpp python=3.9 eigen htslib cxx-compiler gsl

next activate the conda environment

conda activate metaDMG-cpp

install metaDMG-cpp

git clone https://github.com/metaDMG-dev/metaDMG-cpp.git cd metaDMG-cpp make

Now finally install metaDMG-core

pip install metaDMG[all]

MinLuke commented 1 year ago

thanks, is it possible to perform the installation of eigen if im not an administrator?

miwipe commented 1 year ago

The conda installation should work with any type of rights.

@.***

From: MinLuke @.> Reply to: metaDMG-dev/metaDMG-cpp @.> Date: Wednesday, 25 January 2023 at 14.00 To: metaDMG-dev/metaDMG-cpp @.> Cc: Mikkel Winther Pedersen @.>, Comment @.***> Subject: Re: [metaDMG-dev/metaDMG-cpp] Error in make command (Issue #6)

thanks, is it possible to perform the installation of eigen if im not an administrator?

— Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FmetaDMG-dev%2FmetaDMG-cpp%2Fissues%2F6%23issuecomment-1403571148&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7Cc18f632d0df4453944f508dafed432f8%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102484584215855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1I9%2BB0o4smkAE2571rZcp5zg%2FrSnVUmsD6%2Fhl7FoN38%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACXBWEB4GPGNB5R7MS6ZLNTWUEPYPANCNFSM6AAAAAAUGCWGHA&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7Cc18f632d0df4453944f508dafed432f8%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102484584215855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6rW9eb1swylCoPfuV3zReONuna5H9f4yPLWfePf0%2BnU%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

MinLuke commented 1 year ago

Using mamba command line I get

Encountered problems while solving:
  - nothing provides requested cxx-compiler
miwipe commented 1 year ago

Try to search the channel conda-forge, e.g.

mamba create -n metaDMG-cpp -c conda-forge python=3.9 eigen htslib cxx-compiler gsl

https://anaconda.org/conda-forge/cxx-compiler

From: MinLuke @.> Reply to: metaDMG-dev/metaDMG-cpp @.> Date: Wednesday, 25 January 2023 at 14.04 To: metaDMG-dev/metaDMG-cpp @.> Cc: Mikkel Winther Pedersen @.>, Comment @.***> Subject: Re: [metaDMG-dev/metaDMG-cpp] Error in make command (Issue #6)

Using mamba command line I get

Encountered problems while solving:

— Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FmetaDMG-dev%2FmetaDMG-cpp%2Fissues%2F6%23issuecomment-1403575652&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7C3dc359372cbf49ca5a4d08dafed4b07f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102486696252765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Z10KF7oF7oMRdAAp5qGD%2B0q3NI8%2BnTFqsIwCAH3%2B0KY%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACXBWEEYUPAWU6UVSVSK5STWUEQFVANCNFSM6AAAAAAUGCWGHA&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7C3dc359372cbf49ca5a4d08dafed4b07f%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102486696252765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FvfdlmpgcsSEspuHWLokfY3K8YSucdev8F2ZTsXujpM%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

MinLuke commented 1 year ago

Ok now better but I am getting another error

Crypto library is available to link; adding -lcrypto to LIBS
HTSSRC not defined, assuming systemwide installation -lhts
echo '#define METADAMAGE_VERSION "0.2-46-gedaf069"' > version.h
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  ngsLCA.cpp
ngsLCA.cpp: In function 'char2int setlevels(int, char*, int&)':
ngsLCA.cpp:64:42: warning: ISO C++ forbids converting a string constant to 'std::map<char*, int, cmp_str>::key_type' {aka 'char*'} [-Wwrite-strings]
   64 |         char2int::iterator it = c2i.find("species");
      |                                          ^~~~~~~~~
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  ngsLCA.cpp >ngsLCA.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  ngsLCA_cli.cpp
ngsLCA_cli.cpp: In function 'void pars_free(pars*)':
ngsLCA_cli.cpp:55:9: error: 'sam_hdr_destroy' was not declared in this scope; did you mean 'bam_hdr_destroy'?
   55 |         sam_hdr_destroy(p->header);
      |         ^~~~~~~~~~~~~~~
      |         bam_hdr_destroy
make: *** [ngsLCA_cli.o] Errore 1
miwipe commented 1 year ago

Which system are you trying to install it on.?

It seems your htslib didn’t install probably. Also when you are sending these errors it would be helpful to see the commands too.

From: MinLuke @.> Reply to: metaDMG-dev/metaDMG-cpp @.> Date: Wednesday, 25 January 2023 at 14.34 To: metaDMG-dev/metaDMG-cpp @.> Cc: Mikkel Winther Pedersen @.>, Comment @.***> Subject: Re: [metaDMG-dev/metaDMG-cpp] Error in make command (Issue #6)

Ok now better but I am getting another error

Crypto library is available to link; adding -lcrypto to LIBS

HTSSRC not defined, assuming systemwide installation -lhts

echo '#define METADAMAGE_VERSION "0.2-46-gedaf069"' > version.h

/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11 -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib ngsLCA.cpp

ngsLCA.cpp: In function 'char2int setlevels(int, char*, int&)':

ngsLCA.cpp:64:42: warning: ISO C++ forbids converting a string constant to 'std::map<char, int, cmp_str>::key_type' {aka 'char'} [-Wwrite-strings]

64 | char2int::iterator it = c2i.find("species");

  |                                          ^~~~~~~~~

/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11 -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib ngsLCA.cpp >ngsLCA.d

/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11 -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib ngsLCA_cli.cpp

ngsLCA_cli.cpp: In function 'void pars_free(pars*)':

ngsLCA_cli.cpp:55:9: error: 'sam_hdr_destroy' was not declared in this scope; did you mean 'bam_hdr_destroy'?

55 | sam_hdr_destroy(p->header);

  |         ^~~~~~~~~~~~~~~

  |         bam_hdr_destroy

make: *** [ngsLCA_cli.o] Errore 1

— Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FmetaDMG-dev%2FmetaDMG-cpp%2Fissues%2F6%23issuecomment-1403625286&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7Cf9875793828a4668bfb508dafed8dc41%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102504603043719%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KEG5WeOlyghAHZ94VjzlJGMySdurhjJW0tOzD0QPYoc%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACXBWEA7RPOE62QI244FMKDWUETVTANCNFSM6AAAAAAUGCWGHA&data=05%7C01%7Cmwpedersen%40sund.ku.dk%7Cf9875793828a4668bfb508dafed8dc41%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638102504603043719%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nZzW1eNtng1ac5gblrbYeEAYQWilD7qCOuQkG2qFNds%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

MinLuke commented 1 year ago

Yes, sorry. Ok, I do not have mamba on this server (of which i am not sudoer) , but I have conda so I used: conda create -n metaDMG-cpp -c conda-forge python=3.9 eigen htslib cxx-compiler gsl

Linux p04-64gb 3.10.0-1160.81.1.el7.x86_64

miwipe commented 1 year ago

all ok., but the above message must be from trying to install metaDMG-cpp afterwards? No the above command right?

MinLuke commented 1 year ago

then I used:

conda activate metaDMG-cpp
git clone https://github.com/metaDMG-dev/metaDMG-cpp.git
cd metaDMG-cpp
make

and I get that error message

miwipe commented 1 year ago

yes, will you htslib is not installed correctly I think or metaDMG cannot find it?

try again with the make HTSSRC=../htslib/

and make sure the path points to the htslib folder.

MinLuke commented 1 year ago

Thanks now better but I get another error

make HTSSRC=../metaDMG-core/htslib/

Crypto library is available to link; adding -lcrypto to LIBS
HTSSRC defined
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib ngsLCA_cli.cpp >ngsLCA_cli.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib main_pmd.cpp >main_pmd.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib profile.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib profile.cpp >profile.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib metaDMG.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib metaDMG.cpp >metaDMG.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib shared.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib shared.cpp >shared.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -c  -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib regression.cpp
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -MM -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/miniconda3/envs/metaDMG-cpp/include -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib  -I/home/minluk/script/metaDMG-core/htslib regression.cpp >regression.d
/opt/miniconda3/envs/metaDMG-cpp/bin/x86_64-conda-linux-gnu-c++ -O3 -std=c++11  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/miniconda3/envs/metaDMG-cpp/lib -Wl,-rpath-link,/opt/miniconda3/envs/metaDMG-cpp/lib -L/opt/miniconda3/envs/metaDMG-cpp/lib -o metaDMG-cpp *.o /home/minluk/script/metaDMG-core/htslib/libhts.a -lz -llzma -lbz2 -lpthread -lcurl -lgsl -lgslcblas -lcrypto
/opt/miniconda3/envs/metaDMG-cpp/bin/../lib/gcc/x86_64-conda-linux-gnu/11.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/minluk/script/metaDMG-core/htslib/libhts.a(kstring.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/opt/miniconda3/envs/metaDMG-cpp/bin/../lib/gcc/x86_64-conda-linux-gnu/11.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make: *** [metaDMG-cpp] Error 1
genomewalker commented 1 year ago
ngsLCA_cli.cpp:55:9: error: 'sam_hdr_destroy' was not declared in this scope; did you mean 'bam_hdr_destroy'?

   55 |         sam_hdr_destroy(p->header);

      |         ^~~~~~~~~~~~~~~

      |         bam_hdr_destroy

make: *** [ngsLCA_cli.o] Errore 1

@MinLuke you need to set up the correct order of the conda channels. This error message is related that you are installing an old version. Reinstall htslib but using the one in the bioconda channel. Then it should work.

miwipe commented 1 year ago

these are my channels in their priority └─ $ ▶ conda config --show channels channels:

MinLuke commented 1 year ago

` conda config --show channels channels:

miwipe commented 1 year ago

then add first conda config --add channels bioconda then conda config --add channels conda-forge

And rerun the installation using conda perhaps in a new environment name.

miwipe commented 1 year ago

oh and check your channel priority first that it matches the one above.

MinLuke commented 1 year ago

Ok once they are in the right order what do I have to do? conda install htslib? and once made it , can I run the make in metaDMG-cpp folder?

miwipe commented 1 year ago

I suggest you delete the environment you have and redo the creation of the environment etc.

installation of metaDMG-mdmg_cpp

conda create -n metaDMG-cpp2 python=3.9 eigen htslib cxx-compiler gsl

install all dependencies etc. next activate the conda environment

conda activate metaDMG-cpp2

install metaDMG-cpp

git clone https://github.com/metaDMG-dev/metaDMG-cpp.git cd metaDMG-cpp make

Now finally install metaDMG-core

pip install metaDMG[all]

miwipe commented 1 year ago

Now this should work.

MinLuke commented 1 year ago

it works!! thank you all for this precious support