Cross-compiling>> libtool: compile: unrecognized option

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

I was just trying to cross-compile a modified version of 3.0beta3 for windows on my arch linux machine.
I've run "./autogen.sh" and "/configure && make && make -Cpo update-po && make distclean" (as the guide says) and it all finished successfully. But then i run win32/__BUILD_SCRIPT and it fails with the following error:

Code: Select all

libtool: compile: unrecognized option `-DPACKAGE_VERSION_STRING=\"0.18.1\"'
What am i doing wrongly? :roll:
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

The problem seems to be reproducible. I had no luck with my gentoo machine as well, it's failing with the same error message.
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by Safety0ff »

I believe I have run into this as well, I cannot remember whether or not I found a solution.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by cybersphinx »

Wrong libtool version? No idea really, it works on Debian (libtool 2.2.6b-2).
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by Safety0ff »

cybersphinx wrote:Wrong libtool version? No idea really, it works on Debian (libtool 2.2.6b-2).
I think that I had verified this, when it happened to me, so I don't think this is the issue. I'd try updating if there is an update available.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

cybersphinx wrote:Wrong libtool version? No idea really, it works on Debian (libtool 2.2.6b-2).
That's what i have in gentoo now:

Code: Select all

        host-triplet:	i686-pc-linux-gnu
        shell:		/bin/bash
        compiler:		i686-pc-linux-gnu-gcc
        compiler flags:		-O2 -march=i686 -pipe
        linker:		/usr/i686-pc-linux-gnu/bin/ld (gnu? yes)
        libtool:	(GNU libtool) 2.2.10
        automake:	automake (GNU automake) 1.11.1
        autoconf:	autoconf (GNU Autoconf) 2.65
Arch:

Code: Select all

        host-triplet:	i686-pc-linux-gnu
        shell:		/bin/sh
        compiler:		gcc
        compiler flags:		-march=i686 -mtune=generic -O2 -pipe
        linker:		/usr/bin/ld (gnu? yes)
        libtool:	(GNU libtool) 2.2.10
        automake:	automake (GNU automake) 1.11.1
        autoconf:	autoconf (GNU Autoconf) 2.67
Yeah, both distros i've been using are far less conservative than debian.
:idea: Maybe i'll try using a debian virtual machine! I'll report back when i do it.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

Nope, the problem still exists in debian squeeze. Also, i don't even need to have libtool installed in my distribution! I believe the error message refers to the "windows" libtool the script downloads from somewhere.
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by Safety0ff »

hao wrote:I believe the error message refers to the "windows" libtool the script downloads from somewhere.
The script doesn't download a "Windows libtool," it downloads gettext and it gets that error when running libtool.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

But the error is still here (and it is the same) even if i have no libtool installed at all!
Also:

Code: Select all

$ find -name libtool
./win32/libs/gettext/gettext-0.18.1.1/gettext-runtime/libasprintf/libtool
./win32/libs/gettext/gettext-0.18.1.1/gettext-runtime/libtool
./win32/libs/gettext/gettext-0.18.1.1/gettext-tools/libtool
./win32/libs/freetype2/freetype-2.4.3/builds/unix/libtool
./win32/libs/expat/expat-2.0.1/libtool
(none of these files is present before running the windows __BUILD_SCRIPT)
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by Safety0ff »

Hmm, right, I wasn't aware they came with their own copy of libtool. :stare:

There are a few things I'd try:
- Revert to gettext 0.18.1 (undo http://developer.wz2100.net/changeset/f ... c6e4#file2 )
- Delete gettext' libtool files ( from gettext-0.18.1/m4 they are lt*.m4 and libtool.m4) I tried this and the build worked the same as when they weren't there (I had libtool installed.)
- Redownload the gettext archive (downloads/gettext*/tar.gz)
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

Reverting to gettext 0.18.1 didn't seem to help, and looks like the error is the same.

By the way, here is the complete build log [on my gentoo machine]. It's a shame i didn't get an idea to attach it earlier :oops: I also replaced my build directory with some "~" to protect my anonymousness; i hope it'd be unambigious.

The problem seems to be 100% reproducible: I unpack the tarball, run the "./configure && make && make -Cpo update-po && make distclean" command as suggested, then run win32/__BUILD_SCRIPT > /some/other/dir/build1.txt 2>&1 and here's what i get (after sed'ing out the private data) (i also didn't modify the gettext file this time):
You do not have the required permissions to view the files attached to this post.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by cybersphinx »

The solution, if someone stumbles upon this again: Read http://developer.wz2100.net/wiki/Compil ... dows/Cross again, especially the part where it says that you need to install the actual cross-compiler.
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by Safety0ff »

well spotted cybersphinx:
build1.txt wrote:checking host system type... i586-pc-mingw32msvc
checking for i586-mingw32msvc-gcc... no
checking for i586-mingw32msvc-g++... no
checking for i586-mingw32msvc-c++... no
checking for i586-mingw32msvc-CC... no
checking for i586-mingw32msvc-cxx... no
checking for i586-mingw32msvc-cc++... no
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Cross-compiling>> libtool: compile: unrecognized option

Post by NoQ »

Thanks everybody, i have it working now.