5

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?

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361

2 Answers2

3

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
Community
  • 1
  • 1
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • I had a very different issue - actually this: http://trac.osgeo.org/geos/ticket/362 - with the same symptoms. I was not cross-compiling. My solution was very related to the tricky way my machine is configured, so I'll spare people the details, but the bottom line is that there was an issue with how the g++ compiler interacted with libtools and your answer put me on the right track. – Davide Feb 13 '13 at 20:56
  • I think you found a bug in the MinGW packaging. Good job, and I would recommend that you report it to the MinGW package maintainer so that they can fix it. – fouric Feb 15 '13 at 22:45
  • @InkBlend: I doubt that it is a bug - it's very possible that someone would need the C compiler and not the C++ compiler. And besides, as of Quantal (12.10) and onward, `g++` is now installed by default with the toolchain. – Nathan Osman Feb 16 '13 at 00:50
  • @GeorgeEdison, that was stupid of me. I was looking for a solution to my problem, found yours instead, and got them mixed up. You are right, it is definitely _not_ a bug. I apologize. – fouric Feb 16 '13 at 01:04
  • @InkBlend: Don't worry - no harm done. I hope you find a solution to your problem. – Nathan Osman Feb 16 '13 at 01:26
0

I know it can be trivial, but be sure to have libtool-dev installed, too:

sudo apt-get install libtool
sudo apt-get install libtool-dev