Question: Lapack undefined reference
0
gravatar for Carl
5.1 years ago by
Carl40
United States
Carl40 wrote:

Hi guys,

I am having trouble installing this software called "Shellfish" (http://www.stats.ox.ac.uk/~davison/software/shellfish/shellfish.php) which looks very helpful and a good alternative to "EIGENSTRAT". When I try to make all, it gives me this endless error:

$ make all
cc -O2 -I . -lm    lines.c   -o lines
cc -O2 -I . -lm    columns.c   -o columns
cc -O2 -I . -lm    columns-split.c   -o columns-split
cc -O2 -I . -c -o io.o io.c
cc -O2 -I .  -c -o iogeno.o iogeno.c
cc -O2 -I .  -c -o dan.o dan.c
cc -O2 -I . -lm    sstat.c io.o iogeno.o dan.o   -o sstat
cc -O2 -I . -lm    istat.c io.o iogeno.o dan.o   -o istat
cc -O2 -I . -lm    flipind.c io.o iogeno.o dan.o   -o flipind
cc -O2 -I . -lm    flipgen.c io.o iogeno.o dan.o   -o flipgen
cc -O2 -I . -lm    flipgeno.c io.o iogeno.o dan.o   -o flipgeno
cc -O2 -I . -lm    gen2geno.c io.o iogeno.o dan.o   -o gen2geno
cc -O2 -I . -lm    geno2gen.c io.o iogeno.o dan.o   -o geno2gen
cc -O2 -I .  -c -o blas-lapack-dan.o blas-lapack-dan.c
cc -O2 -I . -lm    project.c io.o iogeno.o dan.o blas-lapack-dan.o /lib/libblas.a /lib/liblapack.a lib64/libcblas.a   -o project
/lib/libblas.a(xerbla.f.o): In function `xerbla_':
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:80: undefined reference to `_gfortran_st_write'
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:80: undefined reference to `_gfortran_string_len_trim'
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:80: undefined reference to `_gfortran_transfer_character_write'
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:80: undefined reference to `_gfortran_transfer_integer_write'
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:80: undefined reference to `_gfortran_st_write_done'
/usr/src/debug/lapack-3.5.0-1/BLAS/SRC/xerbla.f:82: undefined reference to `_gfortran_stop_string'
/lib/liblapack.a(dsyevr.f.o): In function `dsyevr_':
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:493: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:658: undefined reference to `dswap_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:556: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:557: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:636: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:497: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:560: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsyevr.f:561: undefined reference to `dcopy_'
/lib/liblapack.a(ilaenv.f.o): In function `ilaenv_':
/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:272: undefined reference to `_gfortran_compare_string'
/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:273: undefined reference to `_gfortran_compare_string'
/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:279: undefined reference to `_gfortran_compare_string'
/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:279: undefined reference to `_gfortran_compare_string'
/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:279: undefined reference to `_gfortran_compare_string'
/lib/liblapack.a(ilaenv.f.o):/usr/src/debug/lapack-3.5.0-1/SRC/ilaenv.f:279: more undefined references to `_gfortran_compare_string' follow
/lib/liblapack.a(dsytrd.f.o): In function `dsytrd_':
/usr/src/debug/lapack-3.5.0-1/SRC/dsytrd.f:322: undefined reference to `dsyr2k_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytrd.f:354: undefined reference to `dsyr2k_'
/lib/liblapack.a(dstein.f.o): In function `dstein_':
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:353: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:354: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:355: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:375: undefined reference to `dasum_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:376: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:394: undefined reference to `ddot_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:396: undefined reference to `daxpy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:403: undefined reference to `idamax_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:427: undefined reference to `dnrm2_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:428: undefined reference to `idamax_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstein.f:431: undefined reference to `dscal_'
/lib/liblapack.a(dormtr.f.o): In function `dormtr_':
/usr/src/debug/lapack-3.5.0-1/SRC/dormtr.f:245: undefined reference to `_gfortran_concat_string'
/usr/src/debug/lapack-3.5.0-1/SRC/dormtr.f:253: undefined reference to `_gfortran_concat_string'
/usr/src/debug/lapack-3.5.0-1/SRC/dormtr.f:248: undefined reference to `_gfortran_concat_string'
/usr/src/debug/lapack-3.5.0-1/SRC/dormtr.f:256: undefined reference to `_gfortran_concat_string'
/lib/liblapack.a(dstemr.f.o): In function `dstemr_':
/usr/src/debug/lapack-3.5.0-1/SRC/dstemr.f:748: undefined reference to `dswap_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstemr.f:718: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstemr.f:615: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstemr.f:578: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dstemr.f:579: undefined reference to `dscal_'
/lib/liblapack.a(dlatrd.f.o): In function `dlatrd_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:298: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:300: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:314: undefined reference to `dsymv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:316: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:318: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:320: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:322: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:323: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:325: undefined reference to `ddot_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:326: undefined reference to `daxpy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:269: undefined reference to `dsymv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:282: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:284: undefined reference to `ddot_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:285: undefined reference to `daxpy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:253: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:255: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:272: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:275: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:277: undefined reference to `dgemv_'
/lib/liblapack.a(dlatrd.f.o):/usr/src/debug/lapack-3.5.0-1/SRC/dlatrd.f:280: more undefined references to `dgemv_' follow
/lib/liblapack.a(dsytd2.f.o): In function `dsytd2_':
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:256: undefined reference to `dsymv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:260: undefined reference to `ddot_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:261: undefined reference to `daxpy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:267: undefined reference to `dsyr2_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:297: undefined reference to `dsymv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:302: undefined reference to `ddot_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:303: undefined reference to `daxpy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dsytd2.f:309: undefined reference to `dsyr2_'
/lib/liblapack.a(dormqr.f.o): In function `dormqr_':
/usr/src/debug/lapack-3.5.0-1/SRC/dormqr.f:252: undefined reference to `_gfortran_concat_string'
/usr/src/debug/lapack-3.5.0-1/SRC/dormqr.f:278: undefined reference to `_gfortran_concat_string'
/lib/liblapack.a(dormql.f.o): In function `dormql_':
/usr/src/debug/lapack-3.5.0-1/SRC/dormql.f:253: undefined reference to `_gfortran_concat_string'
/usr/src/debug/lapack-3.5.0-1/SRC/dormql.f:283: undefined reference to `_gfortran_concat_string'
/lib/liblapack.a(dlarre.f.o): In function `dlarre_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarre.f:753: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarre.f:754: undefined reference to `dcopy_'
/lib/liblapack.a(dlarrv.f.o): In function `dlarrv_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrv.f:467: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrv.f:542: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrv.f:544: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrv.f:985: undefined reference to `dscal_'
/lib/liblapack.a(dlarfg.f.o): In function `dlarfg_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfg.f:149: undefined reference to `dnrm2_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfg.f:170: undefined reference to `dscal_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfg.f:178: undefined reference to `dnrm2_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfg.f:182: undefined reference to `dscal_'
/lib/liblapack.a(dlarfb.f.o): In function `dlarfb_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:260: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:266: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:279: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:295: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:490: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:496: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:509: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:525: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:376: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:382: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:394: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:409: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:606: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:612: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:624: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:639: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:658: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:664: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:676: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:691: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:544: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:550: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:563: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:579: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:314: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:320: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:333: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:349: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:428: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:434: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:446: undefined reference to `dtrmm_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarfb.f:461: undefined reference to `dtrmm_'
/lib/liblapack.a(dlarft.f.o): In function `dlarft_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:231: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:252: undefined reference to `dtrmv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:246: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:290: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:311: undefined reference to `dtrmv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarft.f:305: undefined reference to `dgemv_'
/lib/liblapack.a(dlarrf.f.o): In function `dlarrf_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrf.f:479: undefined reference to `dcopy_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarrf.f:480: undefined reference to `dcopy_'
/lib/liblapack.a(dlarf.f.o): In function `dlarf_':
/usr/src/debug/lapack-3.5.0-1/SRC/dlarf.f:201: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarf.f:205: undefined reference to `dger_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarf.f:216: undefined reference to `dgemv_'
/usr/src/debug/lapack-3.5.0-1/SRC/dlarf.f:220: undefined reference to `dger_'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'project' failed
make: *** [project] Error 1

 I would really appreciate your help.

 

error unix lapack package • 5.4k views
ADD COMMENTlink modified 5.1 years ago by Neilfws48k • written 5.1 years ago by Carl40
2
gravatar for Neilfws
5.1 years ago by
Neilfws48k
Sydney, Australia
Neilfws48k wrote:

First thing to check is whether libgfortran is installed; if not, install it.

Second: Google the first error, it seems to be a common issue with lots of potential causes.

I tried installation on my system (running Linux Mint 16) and had a different issue:

cc -O2 -I . -lm    sstat.c io.o iogeno.o dan.o   -o sstat
iogeno.o: In function `centre_and_zero_missing_and_scale':
iogeno.c:(.text+0x592): undefined reference to `sqrt'
iogeno.o: In function `bit_encode':
iogeno.c:(.text+0xdad): undefined reference to `pow'
collect2: error: ld returned 1 exit status
make: *** [sstat] Error 1

I also note from the Github repository that the software is not maintained and has not been updated for 4 years.

So I suspect this software is not as useful as you had hoped and is probably more trouble than it is worth. I'd suggest trying something else.

ADD COMMENTlink written 5.1 years ago by Neilfws48k
2

I'll add that using -lgfortran is probably needed, as is -lblas. Anyway, the sailfish webpage even mentions that it's just trying make a single command replacement for doing PCA in R...so R would seem to be the obvious replacement.

ADD REPLYlink written 5.1 years ago by Devon Ryan90k

Thank you for your comment.

I think I will follow your suggestion and use another software.

Have a good day!

ADD REPLYlink written 5.1 years ago by Carl40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1524 users visited in the last hour