TravisWheelerLab / BATH

Better Alignments with Translated HMMER
Other
15 stars 3 forks source link

linker errors #6

Closed qussai96 closed 5 months ago

qussai96 commented 5 months ago

Hello,

I am having issues during the build process (linker errors), indicating that the linker (ld) cannot find the implementations of certain functions referenced in the code. I tried with new conda environment but still getting the same error. can you please let me know how to solve this issue?

Here is the error message: /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.o: in functionpipeline_thread': bathsearch.c:(.text.pipeline_thread+0x129): undefined reference to p7_Pipeline_BATH' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x137): undefined reference top7_pipeline_fs_Reuse' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x209): undefined reference to p7_Pipeline_BATH' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x217): undefined reference top7_pipeline_fs_Reuse' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.o: in function serial_master': bathsearch.c:(.text.serial_master+0x945): undefined reference top7_profile_fs_Create' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x9e5): undefined reference to p7_ProfileConfig_fs' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xa05): undefined reference top7_pipeline_fs_Create' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xb4b): undefined reference to p7_profile_fs_Clone' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xb7f): undefined reference top7_pipeline_fs_Create' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1086): undefined reference to p7_tophits_ComputeBATHEvalues' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x10c8): undefined reference top7_pipeline_fs_Destroy' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x10f0): undefined reference to p7_profile_fs_Destroy' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x13c3): undefined reference top7_tophits_TabularFrameshifts' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1414): undefined reference to p7_pipeline_fs_Destroy' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x143e): undefined reference top7_profile_fs_Destroy' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x19ec): undefined reference to p7_Pipeline_BATH' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x19fa): undefined reference top7_pipeline_fs_Reuse' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:/home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1b79): undefined reference to p7_pipeline_fs_Reuse' /home/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x2dd8): undefined reference top7_bg_fs_Create' collect2: error: ld returned 1 exit status make[1]: [Makefile:251: bathsearch] Error 1 make: [Makefile:115: check] Error 2`

Thanks, Qussai

traviswheeler commented 5 months ago

It's compiling fine for me on a linux system when I follow directions from the readme. To understand what's happening for you, we're going to need a bit more information to be able to troubleshoot:

qussai96 commented 5 months ago

Thank you for the response. Here is my system info: Linux: CentOS (Rocky Linux release 8.8) autoconf: autoconf (GNU Autoconf) 2.69 make: GNU Make 4.2.1 gcc: gcc (conda-forge gcc 12.2.0-19) 12.2.0

I followed the exact same commands in the Install file. (clone both BATH and Easel > autoconf > ./configure > make) and the errors occurred when running make.

best, Qussai

traviswheeler commented 5 months ago

You wrote: "clone both BATH and Easel > autoconf"

That doesn't show "git checkout BATH" inside easel - did you do that?

Might be best if you give a text dump of all input and output from the process. Without seeing everything, there's no way we can troubleshoot what's happening on your machine.

qussai96 commented 5 months ago

yes, I did run "git checkout BATH" inside easel.

Attached is a file with the detailed building process. BATH_build.txt

thanks,

traviswheeler commented 5 months ago

Thanks. First thing I'd want to check is those warnings about "modification time 0.5 s in the future" and " Clock skew detected. Your build may be incomplete." It's not clear to me why this should cause the problem you're seeing, but it's best to get that out of the way:

(1) It's really strange to get those errors. It's CENTOS, so I assume that's a server. If you run the "date" command on this machine, does it agree with the results on some other machine that you have access to (e.g. you're own computer)? Regardless of impact on this project, I'd ask the sysadmin to fix that.

(2) You can run these commands to (I think) get rid of the time skew errors. find ~/Tools/BATH_main -type f -exec touch {} + make clean && make

Good chance that doesn't fix things, but I'll wait to hear back from you. If that doesn't resolve things, we can build up our own VM with the same settings to try to reproduce.

qussai96 commented 5 months ago

Hello, I fixed the clock skew issue and executed the two commands you provided. Unfortunately, I'm still encountering the same ld error, as shown below:

(base) q.abbas@binfo10:~/Tools/BATH_main/BATH$ find ~/Tools/BATH_main -type f -exec touch {} + (base) q.abbas@binfo10:~/Tools/BATH_main/BATH$ make clean && make SUBDIR src SUBDIR impl_sse CLEAN impl_sse CLEAN src SUBDIR testsuite CLEAN testsuite SUBDIR documentation SUBDIR userguide SUBDIR inclusions CLEAN inclusions CLEAN userguide SUBDIR man CLEAN man CLEAN documentation SUBDIR easel SUBDIR documentation CLEAN documentation SUBDIR testsuite CLEAN testsuite SUBDIR miniapps CLEAN miniapps CLEAN easel SUBDIR libdivsufsort CLEAN libdivsufsort CLEAN hmmer SUBDIR easel CC easel.o easel.c: In function 'esl_str_IsInteger': easel.c:1653:10: warning: ignoring return value of 'strtol' declared with attribute 'warn_unused_result' [-Wunused-result] 1653 | (void) strtol(s, &endp, 10); /* don't need result itself, discard to void */ | ^~~~~~~~~~~~~~~~~~~~ CC esl_alloc.o CC esl_alphabet.o CC esl_arr2.o CC esl_arr3.o CC esl_bitfield.o CC esl_buffer.o CC esl_cluster.o CC esl_composition.o CC esl_cpu.o CC esl_dirichlet.o CC esl_distance.o CC esl_dmatrix.o CC esl_dsqdata.o CC esl_exponential.o CC esl_fileparser.o CC esl_gamma.o CC esl_gencode.o CC esl_getopts.o CC esl_gev.o CC esl_graph.o CC esl_gumbel.o CC esl_heap.o CC esl_histogram.o CC esl_hmm.o CC esl_huffman.o CC esl_hyperexp.o CC esl_iset.o CC esl_json.o CC esl_keyhash.o CC esl_lognormal.o CC esl_matrixops.o CC esl_mem.o CC esl_minimizer.o CC esl_mixdchlet.o CC esl_mixgev.o CC esl_mpi.o CC esl_msa.o CC esl_msacluster.o CC esl_msafile.o CC esl_msafile2.o CC esl_msafile_a2m.o CC esl_msafile_afa.o CC esl_msafile_clustal.o CC esl_msafile_phylip.o CC esl_msafile_psiblast.o CC esl_msafile_selex.o CC esl_msafile_stockholm.o CC esl_msashuffle.o CC esl_msaweight.o CC esl_normal.o CC esl_paml.o CC esl_quicksort.o CC esl_random.o CC esl_rand64.o CC esl_randomseq.o CC esl_ratematrix.o CC esl_recorder.o CC esl_red_black.o CC esl_regexp.o CC esl_rootfinder.o CC esl_scorematrix.o CC esl_sq.o CC esl_sqio.o CC esl_sqio_ascii.o CC esl_sqio_ncbi.o CC esl_ssi.o CC esl_stack.o CC esl_stats.o CC esl_stopwatch.o CC esl_stretchexp.o CC esl_subcmd.o CC esl_threads.o CC esl_tree.o CC esl_varint.o CC esl_vectorops.o CC esl_weibull.o CC esl_workqueue.o CC esl_wuss.o CC esl_sse.o CC esl_avx.o CC esl_avx512.o CC esl_neon.o CC esl_vmx.o AR libeasel.a SUBDIR miniapps GEN esl-afetch esl-afetch.c: In function 'regurgitate_one_stockholm_entry': esl-afetch.c:362:7: warning: ignoring return value of 'fwrite' declared with attribute 'warn_unused_result' [-Wunused-result] 362 | fwrite(p, sizeof(char), n, ofp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GEN esl-alimanip GEN esl-alimap GEN esl-alimask GEN esl-alimerge GEN esl-alipid GEN esl-alirev GEN esl-alistat GEN esl-compalign GEN esl-compstruct GEN esl-construct GEN esl-histplot GEN esl-mask GEN esl-mixdchlet GEN esl-reformat GEN esl-selectn GEN esl-seqrange GEN esl-seqstat GEN esl-sfetch GEN esl-shuffle GEN esl-ssdraw GEN esl-translate GEN esl-weight CC cmd_alistat.o CC cmd_downsample.o CC cmd_filter.o CC cmd_index.o GEN easel SUBDIR libdivsufsort CC divsufsort.o AR libdivsufsort.a SUBDIR src CC bathsearch.o CC build.o CC cachedb.o CC decoding_frameshift.o CC cachedb_shard.o cachedb_shard.c: In function 'p7_seqcache_Open_master': cachedb_shard.c:99:3: warning: ignoring return value of 'strtoll' declared with attribute 'warn_unused_result' [-Wunused-result] 99 | strtoll(ptr, &ptr, 10); // SRE: res_cnt unused, but parsing <ptr> still needs to be advanced | ^~~~~~~~~~~~~~~~~~~~~~ CC emit.o CC errors.o CC evalues.o CC eweight.o CC fwdback_frameshift.o CC generic_decoding.o CC generic_fwdback.o CC generic_fwdback_chk.o CC generic_fwdback_banded.o CC generic_null2.o CC generic_msv.o CC generic_optacc.o CC generic_stotrace.o CC generic_viterbi.o CC generic_vtrace.o CC h2_io.o CC heatmap.o CC hmmdmstr.o CC hmmdmstr_shard.o CC hmmd_search_status.o CC hmmdwrkr.o CC hmmdwrkr_shard.o CC hmmdutils.o CC hmmer.o CC logsum.o CC modelconfig.o CC modelstats.o CC mpisupport.o CC null2_frameshift.o CC optacc_frameshift.o CC seqmodel.o CC stotrace_frameshift.o CC tracealign.o CC p7_alidisplay.o CC p7_bg.o CC p7_builder.o CC p7_domain.o CC p7_domaindef.o CC p7_gbands.o CC p7_gmx.o CC p7_gmxb.o CC p7_gmxchk.o CC p7_gmx_fs.o CC p7_hit.o CC p7_hmm.o CC p7_hmmcache.o CC p7_hmmd_search_stats.o CC p7_hmmfile.o CC p7_hmmwindow.o CC p7_pipeline.o CC p7_prior.o CC p7_profile.o CC p7_spensemble.o CC p7_tophits.o CC p7_trace.o CC p7_scoredata.o CC hmmpgmd2msa.o CC fm_alphabet.o CC fm_general.o CC fm_sse.o CC fm_ssv.o AR libhmmer-src.stamp SUBDIR impl_sse CC decoding.o CC fwdback.o CC io.o CC ssvfilter.o CC msvfilter.o CC null2.o CC optacc.o CC stotrace.o CC vitfilter.o CC p7_omx.o CC p7_oprofile.o CC mpi.o AR libhmmer-impl.stamp GEN bathsearch /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.o: in functionpipeline_thread': bathsearch.c:(.text.pipeline_thread+0x129): undefined reference to p7_Pipeline_BATH' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x137): undefined reference top7_pipeline_fs_Reuse' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x209): undefined reference to p7_Pipeline_BATH' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.pipeline_thread+0x217): undefined reference top7_pipeline_fs_Reuse' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.o: in function serial_master': bathsearch.c:(.text.serial_master+0x945): undefined reference top7_profile_fs_Create' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x9e5): undefined reference to p7_ProfileConfig_fs' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xa05): undefined reference top7_pipeline_fs_Create' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xb4b): undefined reference to p7_profile_fs_Clone' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0xb7f): undefined reference top7_pipeline_fs_Create' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1086): undefined reference to p7_tophits_ComputeBATHEvalues' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x10c8): undefined reference top7_pipeline_fs_Destroy' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x10f0): undefined reference to p7_profile_fs_Destroy' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x13c3): undefined reference top7_tophits_TabularFrameshifts' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1414): undefined reference to p7_pipeline_fs_Destroy' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x143e): undefined reference top7_profile_fs_Destroy' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x19ec): undefined reference to p7_Pipeline_BATH' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x19fa): undefined reference top7_pipeline_fs_Reuse' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1b6b): undefined reference to p7_Pipeline_BATH' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x1b79): undefined reference top7_pipeline_fs_Reuse' /home/students/q.abbas/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: bathsearch.c:(.text.serial_master+0x2dd8): undefined reference to p7_bg_fs_Create' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:251: bathsearch] Error 1 make: *** [Makefile:92: all] Error 2

best, Qussai

qussai96 commented 5 months ago

Hello,

I resolved the problem by directing the compiler to utilize the gcc 8.5.0 from /usr/bin/gcc instead of the one located in ~/anaconda3/bin/gcc.

I deactivated conda and executed the following command: ./configure CC=gcc CPP=/usr/bin/cpp CFLAGS="-O3" LDFLAGS="-lpthread"

After that, everything proceeded fine with make and make install.

Thank you for your assistance.

Best, Qussai

traviswheeler commented 5 months ago

Thanks for following up with this result, and I'm glad the compilation worked out. We'll take a look on the back end here, to understand what's up with 12.2.0 (or anaconda).