Why is libtool is throwing "unsupported hardcode properties" errors and what do they mean?

Nathan Osman picture Nathan Osman · Aug 15, 2012 · Viewed 7.4k times · Source

I am cross-compiling gettext-0.18.2 for Windows but running into some problems. During the linking stages of one of the shared libraries, libtool gives me the following error message:

/bin/bash ../libtool --tag=CXX ...
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

You can see the full build log including the libtool command here (the error is at the very bottom of the page).

What would cause this error and what does it mean? I can't seem to find any information about this error in the documentation, despite the claim in the error message.

Also of note: the thing that really makes this weird is that the build succeeded without error on Ubuntu 12.10 (Quantal)... but it's failing on Ubuntu 12.04, the current LTS release.


Additional: I did a diff of the line invoking libtool between the build that succeeded and the build that failed. The diff looks something like this:

enter image description here

So apparently the C++ compiler is being omitted from the command. Could this cause the above error?

Answer

Nathan Osman picture Nathan Osman · Aug 15, 2012

Aha!

The problem turned out to be extremely subtle. The mingw-w64 Install mingw-w64 package in Ubuntu 12.10 (Quantal) lists g++-mingw-w64 Install g++-mingw-w64 as a dependency - but this is not the case in Ubuntu 12.04 (Precise). So all I needed to do was to specify g++-mingw-w64 as a build dependency.

The reason for the actual error message above was because the configure script couldn't find the C++ compiler for the cross-compiler toolchain:

Quantal:

checking for g++... i686-w64-mingw32-g++
checking whether the C++ compiler (...) works... yes

Precise:

checking for g++... i686-w64-mingw32-g++
checking whether the C++ compiler (...) works... no