EddyRivasLab / hmmer

HMMER: biological sequence analysis using profile HMMs
http://hmmer.org
Other
305 stars 69 forks source link

Error in make 'undefined reference to `worker_process_shard'' #289

Closed qussai96 closed 1 year ago

qussai96 commented 1 year ago

Hello there,

I am trying to install hmmer from source following these commands:

   % wget http://eddylab.org/software/hmmer/hmmer.tar.gz
   % tar zxf hmmer.tar.gz
   % cd hmmer-3.3.2
   % ./configure --prefix /your/install/path
   % make

but after successful configuration, I got this message when running ./make:

/home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: hmmpgmd_shard.o: in function `main':
hmmpgmd_shard.c:(.text.startup.main+0x353): undefined reference to `worker_process_shard'
/home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/11.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: hmmpgmd_shard.c:(.text.startup.main+0x370): undefined reference to `master_process_shard'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:275: hmmpgmd_shard] Error 1
make: *** [Makefile:92: all] Error 2

Do you have any suggestions as to why this is happening?

Thanks a lot, ~Qussai

cryptogenomicon commented 1 year ago

I've just tested, and hmmer 3.3.2 should build fine on linux (which is what it appears you're using). I don't get this error on Ubuntu 20.04.2/gcc 9.4 nor with CentOS 7.9/gcc 12.1, two of my linux test machines.

The function worker_process_shard() is defined in the file src/hmmdwrkr_shard.c. Check that you have .o files in src/ after you've done the make; specifically, you should have src/hmmdwrkr_shard.o.

If you still have trouble, please let me know what Linux OS (release and version) and confirm that you're using gcc 11.2.0 (which is what it appears to be, from the info you gave).

qussai96 commented 1 year ago

Dear Sean, Thank you for your reply.

I checked the src folder and I have both hmmdwrkr_shard.c andhmmdwrkr_shard.c files. image

My system info are as following: Operating System: Rocky Linux 8.6 (Green Obsidian) Kernel: Linux 4.18.0-372.9.1.el8.x86_64 g++: (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)

I don't have a root privilege? Could this be the problem? or the version of GCC?

cryptogenomicon commented 1 year ago

Have you tried just doing make again? This all looks fine and really should work.

qussai96 commented 1 year ago

I deleted the folder and started again from the beginning, I also tried to change the config path, but still getting the same error every time :(

image

npcarter commented 1 year ago

I noticed you didn’t run autoconf before configure. Sean, does the release version require that the way our development versions do? Not sure how that could be causing the problem you’re seeing, but…

cryptogenomicon commented 1 year ago

No, it doesn't. This should be working fine.

Check the following:

   strings libhmmer.a | grep worker_process_shard

This should show you _worker_process_shard in output. (Because hmmdwrkr_shard.o is part of the libhmmer.a library that all executables are compiled against, including hmmpgmd_shard.

qussai96 commented 1 year ago

Running the strings libhmmer.a | grep worker_process_shard command I got this result:

worker_process_shard
worker_process_shard
.rela.text.worker_process_shard
cryptogenomicon commented 1 year ago

This continues to look like everything's as expected with HMMER. Have you been able to compile other bioinformatics software packages with this machine? I'm sort of suspecting a problem specific to your machine.

qussai96 commented 1 year ago

Today I compiled a couple of software on this machine (Augustus, R). I will try to see if this is the case for other users of this machine and will let you know if I find the problem, Thanks a lot for your time and help.

cheers, ~Qussai

cryptogenomicon commented 1 year ago

I've tested now on an additional machine that's the closest I can find to yours: gcc 8.5.0, CentOS Stream 8 (I believe Rocky Linux is an offshoot of CentOS/RHEL), and Linux kernel 4.18.0. HMMER builds cleanly on this machine too.

A workaround is to edit the src/Makefile and delete hmmpgmd_shard from the list of programs it will try to build, then make again. You would only need the hmmpgmd_shard program if you're going to run your own server (the way the EBI HMMER servers are set up), which is rare.

qussai96 commented 1 year ago

Dear Sean,

The problem was solved without deleting hmmpgmd_shard from the /src/Makefile. It appeared that hmmer was installed before on this machine using conda, and I am not sure how that affected make but after uninstalling hmmer from conda, I was able to compile the source code of hmmer with no error messages.

Package Plan

environment location: /home/students/q.abbas/anaconda3

removed specs:

  • hmmer

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
scikit-learn-1.1.3         |   py39h6a678d5_0         7.0 MB
------------------------------------------------------------
                                       Total:         7.0 MB

The following packages will be REMOVED:

dendropy-4.5.2-pyh3252c3a_0 hmmer-3.1b2-3 sepp-4.4.0-py39_0

The following packages will be UPDATED:

scikit-learn 1.0.2-py39h51133e4_1 --> 1.1.3-py39h6a678d5_0 None

The following packages will be SUPERSEDED by a higher-priority channel:

jinja2 conda-forge::jinja2-2.11.3-pyhd8ed1ab~ --> pkgs/main::jinja2-2.11.3-pyhd3eb1b0_0 None

The following packages will be DOWNGRADED:

daal4py 2021.6.0-py39h79cecc1_1 --> 2021.5.0-py39h78b71dc_0 None dal 2021.6.0-hdb19cb5_916 --> 2021.5.1-h06a4308_803 None scikit-learn-inte~ 2021.6.0-py39h06a4308_0 --> 2021.5.0-py39h06a4308_0 None

Proceed ([y]/n)?

Downloading and Extracting Packages scikit-learn-1.1.3 | 7.0 MB | ######################################################################################################################################################################## | 100% Preparing transaction: done Verifying transaction: done Executing transaction: -

Thanks again for the help,

best regards, Qussai

npcarter commented 1 year ago

Oh, that makes sense. The _shard variants of hmmpgmd are relatively recent additions, so your Vonda install probably didn’t have them. If the conda version of llibhmmer was ahead of the new one in your LD_LIBRARY_PATH, the linker would have used it instead of the new one, and would have been unable to find the _shard routines.

qussai96 commented 1 year ago

That makes a lot of sense now. Thank you Nick for the clarification.