From: "Franz Reinhardt" <franz.reinhardt@wenglor.com>
To: gcc-help@gcc.gnu.org
Subject: compiling with mudflap changes linking behaviour
Date: Thu, 03 Jan 2013 07:19:00 -0000 [thread overview]
Message-ID: <OF6B92256A.48385BBD-ONC1257AE8.00285AE3-C1257AE8.00286B58@wenglor.de> (raw)
Hi,
for a project which consists of a dynamic library and an exectuable I need
to use
mudflap. Since this is delivered software, building is working out of the
box without mudflap.
Now I'd like to use mudflap:
I added -fmudflapth to the compiler and linker options, and -lmudflapth to
the linker options.
The build of the dynamic library works. the build of the executable fails
with some linker
error "undefined reference to typeinfo "
When I compare the library symbols from both configuration (with or
without mudflap)
I discover that with mudflap more symbols show up as undefined, when I
examine the dynamic library with nm, especially from classes where no
instances
are requested in libraries translation unit.
Unfortunately, the mudflap doc doesn't mention such a side effect.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.7/lto-wrapper
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.7
--enable-ssp --disable-libssp --disable-libitm --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --with-slibdir=/lib --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-version-specific-runtime-libs
--enable-linker-build-id --program-suffix=-4.7 --enable-linux-futex
--without-system-libunwind --with-arch-32=i586 --with-tune=generic
--build=i586-suse-linux
Thread model: posix
gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux)
error message (incomplete)
../bin/libsdk.so: undefined reference to `typeinfo name for
boost::re_detail::abstract_protected_call'
../bin/libsdk.so: undefined reference to `vtable for
boost::exception_detail::error_info_container'
../bin/libsdk.so: undefined reference to `mpl_::integral_c<unsigned int,
4u>::value'
../bin/libsdk.so: undefined reference to `mpl_::int_<7>::value'
../bin/libsdk.so: undefined reference to `typeinfo for
boost::io::out_of_range'
../bin/libsdk.so: undefined reference to `mpl_::int_<5>::value'
../bin/libsdk.so: undefined reference to
`boost::re_detail::cpp_regex_traits_implementation<char>::mask_unicode'
The C++ libraries, which I'm linking to(qt and boost), are compiled with
gcc 4.1.x. I know that this may lead to trouble,
but I don't believe that it should do a change in the visibility of
symbols.
So if anyone can give hints, I would really appreciate it.
Franz
reply other threads:[~2013-01-03 7:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF6B92256A.48385BBD-ONC1257AE8.00285AE3-C1257AE8.00286B58@wenglor.de \
--to=franz.reinhardt@wenglor.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).