-------- Messaggio Inoltrato --------
Oggetto: Building on OS X
Data: Mon, 14 Dec 2015 14:13:33 +0100
Mittente: Carlos Sánchez de La Lama <address@hidden>
A: Jacopo Corno <address@hidden>
CC: Thomas Treichl <address@hidden>
Hi Jacopo,
(I write you directly as I did not want to send a bug report for such a
minor building issue. Feel free to forward this to whenever you find
appropiate).
when building odepkg-0.8.5 in my OS X (powerpc, 10.4) box, I get an
error during final linking:
LFLAGS="-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/lib/octave/4.0.0
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/lib -framework vecLib
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/lib
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc/powerpc-apple-darwin8.11.0/4.8.4
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc/powerpc-apple-darwin8.11.0/4.8.4/../../..
-lgfortran -lm -lSystemStubs" mkoctfile odepkg_octsolver_mebdfdae.o
odepkg_octsolver_mebdfi.o odepkg_octsolver_ddaskr.o odepkg_octsolver_radau.o
odepkg_octsolver_radau5.o odepkg_octsolver_rodas.o odepkg_octsolver_seulex.o
odepkg_auxiliary_functions.o cash/mebdfdae.o cash/mebdfi.o daskr/ddaskr.o
daskr/dlinpk.o hairer/decsol.o hairer/dc_decsol.o hairer/radau.o hairer/radau5.o
hairer/rodas.o hairer/seulex.o -o dldsolver.oct \
-framework vecLib
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/lib
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc/powerpc-apple-darwin8.11.0/4.8.4
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc
-L/Users/csanchez/local/powerpc-apple-darwin8.11.0/stow/gcc-4.8.4/bin/../lib/gcc/powerpc-apple-darwin8.11.0/4.8.4/../../..
-lgfortran -lm -lSystemStubs
mkoctfile: unrecognized argument vecLib
The problem comes from "-framework vecLib" argument to mkoctfile. Newest
versions of octave (I have 4.0.0) allow any argument starting with dash
for mkoctfile, so "-framework" is not the problem (I have seen in closed
bug reports it *used* to be a problem) but "vecLib" is not recognized as
an argument or a file name and thus the error.
I do not understand why $(LAPACK_LIBS) and $(FLIBS) are passed in the
linking step to mkoctfile, as they are already on LFLAGS. In fact,
removing those flags at the end of the linking commands solves the
problem and odepkg then builds and runs on my machine.
diff -r odepkg-0.8.5.old/src/Makefile odepkg-0.8.5/src/Makefile
55,56c55
< LFLAGS="$(LFLAGS)" $(MKOCTFILE) $(SOLVEROBJECTS) -o
$(SOLVEROCTFILE) \
< $(LAPACK_LIBS) $(FLIBS)
---
LFLAGS="$(LFLAGS)" $(MKOCTFILE) $(SOLVEROBJECTS) -o
$(SOLVEROCTFILE)
AFAIU this change should not break anything.
BR
Carlos
--
'I sir, to be honest as this world goes, is to bee one man pick'd out of two
thousand.'
William Shakespeare, "Hamlet" (1601)