On Sat, 2009-03-14 at 15:16 +0100, Robert Millan wrote: > When attempting to build a plugin: > > i586-mingw32msvc-gcc -Os -Wl,--file-alignment,512 -Werror > -L/usr/i586-mingw32msvc/lib/nsis -lpluginapi sm_cleanboot.c -shared -o > sm_cleanboot.dll > /usr/i586-mingw32msvc/lib/nsis/libpluginapi.a: could not read symbols: > Archive has no index; run ranlib to add one > > Note: you should run i586-mingw32msvc-ranlib, not ranlib as the error message > says
Hmmm, the build logs (i386 and my local amd64 one) show that i586-mingw32msvc-ranlib is run during the nsis build process on libpluginapi.a. > After i586-mingw32msvc-ranlib is run, breakage still happens: > > i586-mingw32msvc-gcc -Os -Wl,--file-alignment,512 -Werror -L. -lpluginapi > sm_cleanboot.c -shared -o sm_cleanboot.dll > /tmp/cc8gFFj2.o:sm_cleanboot.c:(.text+0x18): undefined reference to > `_g_stringsize' > /tmp/cc8gFFj2.o:sm_cleanboot.c:(.text+0x20): undefined reference to > `_g_stacktop' > /tmp/cc8gFFj2.o:sm_cleanboot.c:(.text+0x28): undefined reference to > `_g_variables' > /tmp/cc8gFFj2.o:sm_cleanboot.c:(.text+0x69): undefined reference to > `_pushstr...@4' > > The first three symbols are declared as externs in pluginapi.h > (should they be there?). The last one appears to be provided by > libpluginapi.a, no idea why it can't be resolved. The first 3 are declared as global variables in pluginapi.c: unsigned int g_stringsize; stack_t **g_stacktop; char *g_variables; That is then compiled using this: i586-mingw32msvc-gcc -o build/release/ExDLL/pluginapi.o -c -Wall -g -O2 -Os -Wall -fno-strict-aliasing "-DNSISCALL= __attribute__((__stdcall__))" -ISource/exehead Contrib/ExDLL/pluginapi.c i586-mingw32msvc-ar rc build/release/ExDLL/libpluginapi.a build/release/ExDLL/pluginapi.o i586-mingw32msvc-ranlib build/release/ExDLL/libpluginapi.a No idea about this error, I'll have to consult the mingw32 maintainer. -- bye, pabs http://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part