[Ecls-list] c::builder uses tempfile with only 1 object file
Greg Pfeil
sellout42 at mac.com
Thu May 11 18:25:03 UTC 2006
On 10 May 2006, at 23:54, Goffioul Michael wrote:
>> /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.
Oh, right ... yeah, it happens whenever there's a source file with the
same name as the ASDF system (I'm using BUILD-OP), not related to how
many lisp files there are at all.
If I set si::*init-function-prefix* before I call build-op, it doesn't
seem to help:
> (setf si::*init-function-prefix* "FOO")
"FOO"
> si::*init-function-prefix*
"FOO"
> (asdf:oos 'asdf:build-op :bordeaux-mp :type :dll :monolithic nil)
...
/path/to/bordeaux-mp/ecl-0.9h-linux-unknown/bordeaux-mp.o(.text+0xc50):
In function `init_BORDEAUX_MP':
: multiple definition of `init_BORDEAUX_MP'
/path/to/ECLINITnbpOry.o(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `init_BORDEAUX_MP' changed from
168 in /path/to/ECLINITnbpOry.o to 4047 in
/path/to/bordeaux-mp/ecl-0.9h-linux-unknown/bordeaux-mp.o
collect2: ld returned 1 exit status
Would a good solution be to always put a suffix like "_lib" on the
aggregate init functions in the temporary object file? It seems like
that would eliminate many of these collisions.
More information about the ecl-devel
mailing list