From: SourceForge.net <no...@so...> - 2003-03-07 21:16:18
|
Bugs item #698615, was opened at 2003-03-06 13:38 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=698615&group_id=2435 Category: ld Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrey Gusev (agusev) Assigned to: Danny Smith (dannysmith) Summary: ld crash with '-shared' Initial Comment: Ld crashed when i attempt to build the shared version of BOOST's regex library; on this step: >>g++ -shared -o gcc/libboost_regex.dll gcc/boost_regex_shared/c_regex_traits.o gcc/boost_regex_shared/c_regex_traits_common.o gcc/boost_regex_shared/cpp_regex_traits.o gcc/boost_regex_shared/cregex.o gcc/boost_regex_shared/fileiter.o gcc/boost_regex_shared/instances.o gcc/boost_regex_shared/posix_api.o gcc/boost_regex_shared/regex.o gcc/boost_regex_shared/regex_debug.o gcc/boost_regex_shared/regex_synch.o gcc/boost_regex_shared/w32_regex_traits.o gcc/boost_regex_shared/wide_posix_api.o gcc/boost_regex_shared/winstances.o Dllwrap, whereas, produces fully usable library: dllwrap *.o c:/mingw/lib/libstdc++.a --export-all --implib regex.a --output-def regex.def -o regex.dll >>gcc --version gcc (GCC) 3.2 (mingw special 20020817-1) >>ld --version GNU ld version 2.13 BOOST version - 1.29.0 ---------------------------------------------------------------------- >Comment By: Andrey Gusev (agusev) Date: 2003-03-08 00:27 Message: Logged In: YES user_id=695920 My workaround in case with regex - the simulation unnamed namespace behavior (subsequently found definition in ISO14882): --------------------------------------------------------- namespace nnn { ... }; using namespace nnn; --------------------------------------------------------- That's solves the problem. My slice of job exhausted by that. Andrey. ---------------------------------------------------------------------- Comment By: Andrey Gusev (agusev) Date: 2003-03-07 14:03 Message: Logged In: YES user_id=695920 Dllwrap, though, works fine with that fragment... ...from 'MinGW-2.0.0-3.exe 2002-09-05' distribution ! ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2003-03-07 12:30 Message: Logged In: YES user_id=11494 Thanks for that information. My successful test was actually with g++3.4 compiled code, so it looks like it maybe a g++ unnamed namespace bug that has sinced been fixed. I'll test again with 3.3 and 3.2.2 Danny ---------------------------------------------------------------------- Comment By: Luke Dunstan (infidel) Date: 2003-03-07 12:29 Message: Logged In: YES user_id=30442 Thanks, I can confirm that it crashes ld, but when I try dllwrap it invokes ld so it crashes too. The problem is that the resulting symbol includes the source filename, which normally contains a ".": .section .drectve .ascii " - export:_ZN29_GLOBAL__N_throwdll.cppVUn1ib7foo_dllEv" In a .def file a dot has a special meaning so ld misinterprets the directive, though of course it should give an error message rather than crashing. I don't know of a workaround other than what you already know. ---------------------------------------------------------------------- Comment By: Andrey Gusev (agusev) Date: 2003-03-07 11:55 Message: Logged In: YES user_id=695920 I locate the source fragment crashes ld; here it: ------------------------------- namespace /*nnn*/ { __declspec(dllexport) int iii; }; ------------------------------- Situation arise even with binutils-2.13.90-20030111-1. If i uncomment the 'nnn' - ld works fine. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2003-03-07 03:22 Message: Logged In: YES user_id=11494 Thanks for the detailed report. Could you try with RC of binutils (GNU ld version 2.13.90 20030111-1), at sourceforge download page. The g++ -shared command succeeded when I tried to repeat with BOOST 1.29.0 and the newer version of ld. Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=698615&group_id=2435 |