2011/4/13 Fridrich Strba
Maarten,
On 13/04/11 11:14, Maarten Bosmans wrote:
When trying to link a project (pulseaudio) against win_iconv, I got problems. The pulseaudio configure scripts detects the iconv implementation, but then tries to link against the dynamic library, which does not exist.
Funny enough, I just removed the MINGW32_LDFLAGS overriding in the package and rebuilt here locally, and everything was just fine. The crucial part of the success to link with a mix of static and shared libraries on win32 is to short-circuit the libtool shared library detection heuristic. This is done by the line:
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}
in the spec file. The linker will then be able to find what it needs.
Hmm, yes indeed. It just so happened that I added that line at the same time as I added the LDFLAGS override. (I am on Ubuntu, so I can't easily build locally and try many different things) So when it worked, I came to the wrong conclusion.
The problem seems to lie in the following line in the mingw32-filesystem macros file: %_mingw32_ldflags -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a
Those are just directives to the linker so that it does not export from the given library the symbols contained inside libintl.a and libiconv.a static libraries. Otherwise, many libraries would export the libintl and iconv symbols and other binaries would link them randomly from whichever library is first in the linker line.
Thanks for the explanation.
Fridrich
Maarten -- To unsubscribe, e-mail: opensuse-mingw+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-mingw+help@opensuse.org