[Ecls-list] c::builder uses tempfile with only 1 object file

Goffioul Michael goffioul at imec.be
Wed May 10 23:57:00 UTC 2006


> However, the additional object file seems to be created and 
> used regardless of whether there are multiple object files. 
> This doesn't seem to cause a problem when a static library is 
> created, but causes an error (below) when building a dll.
> 
> ;;; Note: Invoking external command:
> ;;; gcc -o "/path/to/libmoptilities.so" -L"/path/to/lib/ecl" 
> "/path/to/ECLINITWmzMYO.o" "/path/to/moptilities/dev/moptilities.o"  
> -Wl,--rpath,/path/to/lib/ecl -shared   -lecl -lpthread -ldl  -lm   
> -lgmp
> 
> /path/to/moptilities/dev/moptilities.o(.text+0x2db4): In function
> `init_MOPTILITIES':
> : multiple definition of `init_MOPTILITIES'
> /path/to/ECLINITWmzMYO.o(.text+0x0): first defined here
> /usr/bin/ld: Warning: size of symbol `init_MOPTILITIES' changed from
> 112 in /path/to/ECLINITWmzMYO.o to 7392 in 
> /path/to/moptilities/dev/moptilities.o
> collect2: ld returned 1 exit status

This is due to the fact that the source file and the target lib have the
same root "moptilities". I guess you can work around that by making use
of the si::*init-function-prefix* variable: define it to "MOP" (for
instance)
when compiling your source file.

Michael.




More information about the ecl-devel mailing list