It comes with some precompiled objects using Basic Linear Algebra libs LAPACK, BLAS, and f2c (Fortran to C) http://madb.mageia.org/package/list/arch/x86_64/application/0/t_search/f2c in archive files, which compiles OK using the makefile
- Code: Select all
# Use supplied libs
LIB_LIST += -pthread -lGL -lGLU -lX11 -ldl $(GTK_LIBS) $(LIB_DIR)/lapack.a \
$(LIB_DIR)/blas.a $(LIB_DIR)/libf2c.a $(LIB_DIR)/libjpeg.a
but I thought I'd try it with the Mageia libs (it was first written a few years ago, so who knows, maybe the algorithms in the libraries have been optimised a bit more since then ):
- Code: Select all
# Use local libs
#LIB_LIST += -pthread -lGL -lGLU -lX11 -ldl $(GTK_LIBS) -llapack -lblas -lf2c -ljpeg
which fails with
- Code: Select all
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.9.2/../../../../lib64/libf2c.so: undefined reference to `MAIN__'
collect2: error: ld returned 1 exit status
makefile:48: recipe for target 'VisualSFM' failed
make: *** [VisualSFM] Error 1
As its a precompiled library it doesn't say exactly where the error is, so I tried ldd
- Code: Select all
ldd -r /usr/lib/gcc/x86_64-mageia-linux-gnu/4.9.2/../../../../lib64/libf2c.so
linux-vdso.so.1 (0x00007ffd58da7000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8bb0e7c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f8bb0ac8000)
/lib64/ld-linux-x86-64.so.2 (0x00005629fa8d0000)
undefined symbol: MAIN__ (/usr/lib/gcc/x86_64-mageia-linux-gnu/4.9.2/../../../../lib64/libf2c.so)
Is this perhaps a bug in how M5 libf2c has been compiled, perhaps not using options for a shared library like http://www.adp-gmbh.ch/cpp/gcc/create_lib.html, or is it that the source file main.c http://netlib.org/f2c/ doesn't define a return type for main(). I've noticed that other related parts of linked code return a lot of warnings that seem to be related to changes in how more modern compilers expect to see things written. (I'm no C/C++ programmer, just starting to learn a bit through attempting to get things to compile).
[Post title edited to better reflect contents]