Bug 21754 - ./libtool: /mingw/bin/ar: Invalid argument
Summary: ./libtool: /mingw/bin/ar: Invalid argument
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-05-25 15:14 UTC by Christopher Dawes
Modified: 2012-01-11 14:04 UTC (History)
2 users (show)

See Also:
Host: Mingw32
Target: Mingw32
Build: Mingw32
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Dawes 2005-05-25 15:14:51 UTC
Having tweaked the bootstrapclasspath for dom & sax for libjava and applied the
patch in bug 21022 I've hit another problem. When it gets to the final stages
with libtool it produces the following error:

--------------------------
./libtool: /mingw/bin/ar: Invalid argument
make[1]: *** [libgcj0_convenience.la] Error 126
make[1]: Leaving directory `/f/GCC_BuildDir/obj/mingw32/libjava'
--------------------------

I compiled using the following script:

------------------
../gcc-4.0.0/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32
--target=mingw32 --prefix=/mingw  --enable-threads --disable-nls
--enable-languages=c++,c,java --disable-win32-registry --enable-shared
--enable-libgcj
make "CFLAGS=-O2" "LDFLAGS=-s" bootstrap
make
make DESTDIR=/f/GCC_InstallDir install
------------------

The command is unfortuately too long to fit in the comment box so i have
uploaded it to:

http://www.christopherdawes.f2s.com/error%20compiling%20GCC%204.0.0%20with%20MINGW%20on%20windows.rtf

along with the error
Comment 1 Danny Smith 2005-05-31 09:45:32 UTC
Try changing --enable-shared to --disable-shared when configuring.  Building 
shared libgcj with libtool doesn't really work on windows targets.  You could 
try using Mohan Embars scripts to build a static lib and and then convert to 
dll. See http://www.thisiscool.com/gcc_mingw.htm

Danny
Comment 2 Christopher Dawes 2005-05-31 14:19:26 UTC
Unfortunately it's nothing to do with compiling or linking, it's when it's then
trying to archive it however i've not managed to find the part of the Makefile
which calls ar.exe, if i could I'd try splitting it into individual statements
to ar each file one by one until i found out whether there were too many
arguments or whether there was an incorrect argument.
Comment 3 Richard Biener 2012-01-11 14:04:33 UTC
No activity.