[IPOL discuss] small compilation error in LSD code (ubuntu 11.10)
Juan Cardelino
juan.cardelino at gmail.com
Wed Nov 16 11:36:10 CET 2011
Dear all,
What is the recommended procedure to report a bug? Shall
it be sent directly to the authors, to discuss, or to the tech list?
For this time only I will send it here.
One of my students found that lsd-1.5 source code does not compile in
ubuntu 11.10 with the provided makefile. I verified that behaviour
(gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)).
When trying to compile, it gives a lot of undefined references to
math functions due to the order that -lm is specified. The simple way
to make it compile is to place the -lm at the end of the compilation
line. However, I think the problem is related to passing from a .c
source file directly to the executable (compiling and linking in one
step). I'm not sure about the explanation, but I think this is not a
good idea, at least in my experience each time I do that I end up with
problems with the ordering of libraries. Can someone explain what is
going on?
On the other hand, in mac osx lion with gcc and clang works fine:
*Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
*gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
A small suggestion: for other compiler users (not gcc), I could be
nice to have a CC variable defined in the makefile, to allow changing
the compiler easily.
Best regards,
Juan
More information about the discuss
mailing list