Is my lapck 'make' wrong? I cannot make your code on Ubuntu system.
End030 opened this issue · 2 comments
I have some problems in process of running the code, I hope you can help me , thank you!
When I ‘make’lapack ,there are some options to pick, gfortran/pghpf/alpha ect. I chose gfortran to ‘make’. Then outputs liblapack.a/liblapacke.a/librefblas.a/libtmglib.a and lapacke.h/lapacke_config.h/lapacke_mangling.h/lapacke_mangling_with_flags.h/lapacke_utils.h. I put them into /usr/local/lib and /usr/local/include respectively. But when I ‘make’ your code , it occurs some problems as below. I don’t know which step I have made wrong. I hope you can help me , thank you !
fan@fan-ThinkStation-P300:~/EmbryonicCell/ellipse-detection/ELSDc-master$ make
make -C src
make[1]: Entering directory '/home/fan/EmbryonicCell/ellipse-detection/ELSDc-master/src'
cc -O3 -I/usr/local/lib -o elsdc main.c pgm.c svg.c elsdc.c gauss.c curve_grow.c polygon.c ring.c ellipse_fit.c rectangle.c iterator.c image.c lapack_wrapper.c misc.c -llapack -lm
//usr/local/lib/liblapack.a(dsyev.o):In function ‘dsyev_’:
dsyev.f:(.text+0x508): ‘dscal_’undefined reference
//usr/local/lib/liblapack.a(dsytrd.o):In function ‘dsytrd_’:
dsytrd.f:(.text+0x386): ‘dsyr2k_’undefined reference
dsytrd.f:(.text+0x6a7): ‘dsyr2k_’undefined reference
//usr/local/lib/liblapack.a(dsteqr.o):In function ‘dsteqr_’:
dsteqr.f:(.text+0xab0): ‘dswap_’undefined reference
//usr/local/lib/liblapack.a(xerbla.o):In function ‘xerbla_’:
xerbla.f:(.text+0x49): ‘gfortran_st_write’undefined reference
xerbla.f:(.text+0x54): ‘gfortran_string_len_trim’undefined reference
xerbla.f:(.text+0x69): ‘gfortran_transfer_character_write’undefined reference
xerbla.f:(.text+0x79): ‘gfortran_transfer_integer_write’undefined reference
xerbla.f:(.text+0x81): ‘gfortran_st_write_done’undefined reference
xerbla.f:(.text+0x8a): ‘gfortran_stop_string’undefined reference
//usr/local/lib/liblapack.a(dlatrd.o):In function ‘dlatrd’:
dlatrd.f:(.text+0x125): ‘dgemv’undefined reference
dlatrd.f:(.text+0x1a3): ‘dgemv’undefined reference
dlatrd.f:(.text+0x29e): ‘dsymv’undefined reference
dlatrd.f:(.text+0x326): ‘dgemv’undefined reference
dlatrd.f:(.text+0x3a0): ‘dgemv’undefined reference
dlatrd.f:(.text+0x425): ‘dgemv_’undefined reference
dlatrd.f:(.text+0x4a2): ‘dgemv_’undefined reference
dlatrd.f:(.text+0x4f0): ‘dscal_’undefined reference
dlatrd.f:(.text+0x55d): ‘ddot_’undefined reference
dlatrd.f:(.text+0x5c1): ‘daxpy_’undefined reference
dlatrd.f:(.text+0x6f5): ‘dsymv_’undefined reference
dlatrd.f:(.text+0x738): ‘dscal_’undefined reference
dlatrd.f:(.text+0x788): ‘ddot_’undefined reference
dlatrd.f:(.text+0x7d2): ‘daxpy_’undefined reference
dlatrd.f:(.text+0x880): ‘dgemv_’undefined reference
dlatrd.f:(.text+0x8f7): ‘dgemv_’undefined reference
dlatrd.f:(.text+0x99a): ‘dgemv_’undefined reference
dlatrd.f:(.text+0xa16): ‘dgemv_’undefined reference
dlatrd.f:(.text+0xa9f): ‘dgemv_’undefined reference
//usr/local/lib/liblapack.a(dlatrd.o):dlatrd.f:(.text+0xb16): Undefined reference to dgemv_
//usr/local/lib/liblapack.a(dsytd2.o):In function ‘dsytd2_’:
dsytd2.f:(.text+0x1b3): ‘dsymv_’undefined reference
dsytd2.f:(.text+0x1ff): ‘ddot_’undefined reference
dsytd2.f:(.text+0x249): ‘daxpy_’undefined reference
dsytd2.f:(.text+0x28b): ‘dsyr2_’undefined reference
dsytd2.f:(.text+0x46d): ‘dsymv_’undefined reference
dsytd2.f:(.text+0x4cc): ‘ddot_’undefined reference
dsytd2.f:(.text+0x529): ‘daxpy_’undefined reference
dsytd2.f:(.text+0x58a): ‘dsyr2_’undefined reference
//usr/local/lib/liblapack.a(dlarfg.o):In function ‘dlarfg_’:
dlarfg.f:(.text+0x39): ‘dnrm2_’undefined reference
dlarfg.f:(.text+0x16f): ‘dscal_’undefined reference
dlarfg.f:(.text+0x1fc): ‘dscal_’undefined reference
dlarfg.f:(.text+0x24a): ‘dnrm2_’undefined reference
//usr/local/lib/liblapack.a(dlarfb.o):In function ‘dlarfb_’:
dlarfb.f:(.text+0x1ec): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x24e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x2c1): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x331): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x54c): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x5bb): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x62e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x69e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x7ee): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x873): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x8e1): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x95a): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xaed): ‘dcopy_’undefined reference
dlarfb.f:(.text+0xb5b): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xbce): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xc3e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xdaf): ‘dcopy_’undefined reference
dlarfb.f:(.text+0xe37): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xea5): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0xf23): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x10b5): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x1150): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x11be): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x1249): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x13a7): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x143e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x14ac): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x1532): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x16a4): ‘dcopy_’undefined reference
dlarfb.f:(.text+0x170b): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x177e): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x17ee): ‘dtrmm_’undefined reference
dlarfb.f:(.text+0x18f5): ‘dgemm_’undefined reference
dlarfb.f:(.text+0x1971): ‘dgemm_’undefined reference
dlarfb.f:(.text+0x19ff): ‘dgemm_’undefined reference
dlarfb.f:(.text+0x1a83): ‘dgemm_’undefined reference
dlarfb.f:(.text+0x1b14): ‘dgemm_’undefined reference
//usr/local/lib/liblapack.a(dlarfb.o):dlarfb.f:(.text+0x1b82): Undefined reference to dgemm_
//usr/local/lib/liblapack.a(dlarft.o):In function ‘dlarft_’:
dlarft.f:(.text+0x4c4): ‘dgemv_’undefined reference
dlarft.f:(.text+0x543): ‘dtrmv_’undefined reference
dlarft.f:(.text+0x6db): ‘dgemv_’undefined reference
dlarft.f:(.text+0x87d): ‘dgemv_’undefined reference
dlarft.f:(.text+0x91b): ‘dtrmv_’undefined reference
dlarft.f:(.text+0xa6a): ‘dgemv_’undefined reference
//usr/local/lib/liblapack.a(dorg2l.o):In function ‘dorg2l_’:
dorg2l.f:(.text+0x221): ‘dscal_’undefined reference
//usr/local/lib/liblapack.a(dorg2r.o):In function ‘dorg2r_’:
dorg2r.f:(.text+0x2e6): ‘dscal_’undefined reference
//usr/local/lib/liblapack.a(dlarf.o):In function ‘dlarf_’:
dlarf.f:(.text+0x13a): ‘dgemv_’undefined reference
dlarf.f:(.text+0x185): ‘dger_’undefined reference
dlarf.f:(.text+0x206): ‘dgemv_’undefined reference
dlarf.f:(.text+0x250): ‘dger_’undefined reference
collect2: error: ld returned 1 exit status
Makefile:28: recipe for target 'elsdc' failed
make[1]: *** [elsdc] Error 1
make[1]: Leaving directory '/home/fan/EmbryonicCell/ellipse-detection/ELSDc-master/src'
Makefile:21: recipe for target 'elsdc' failed
make: *** [elsdc] Error 2
Is lapack library added to your library path? https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux
Thank you for your answer. I have solved the problem. There are some libs have been left when 'make' lapack.