Hi all,
I am currently trying to build a couple of common unix libraries (like berkeley db, pcre) on windows.
I have successfully built these using the 32-bit version of MinGW (found at mingw.org) + MSYS natively on a WinXP SP2 machine.
Now, I was glad to see that there is a project targeting the 64bit win platform!
I am compiling on a Vista 64 bit machine, and have tried both the 32 and 64 bit hosted toolchains ("mingw-w64_x86-64_mingw32_4.4.0-1.zip" and "mingw-w64-bin_i686-mingw_20090831.zip").
However, I consistently run into problems during linking.
For example, when trying to compile PCRE v7.9, I use:
"CC=x86_64-w64-mingw32-gcc.exe ./configure --prefix=/mingw --disable-cpp"
"make"
All compilation is fine, but when starting to link, I get:
...
/bin/sh ./libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc.exe -O2 -no-undefined -version-info 0:1:0 -o libpcre.la -rpath /mingw/lib pcre_compile.lo pcre_config.lo pcre_dfa_exec.lo pcre_exec.lo pcre_fullinfo.lo pcre_get.lo pcre_globals.lo pcre_info.lo pcre_maketables.lo pcre_newline.lo pcre_ord2utf8.lo pcre_refcount.lo pcre_study.lo pcre_tables.lo pcre_try_flipped.lo pcre_ucd.lo pcre_valid_utf8.lo pcre_version.lo pcre_xclass.lo pcre_chartables.lo
x86_64-w64-mingw32-gcc.exe -shared .libs/pcre_compile.o .libs/pcre_config.o .libs/pcre_dfa_exec.o .libs/pcre_exec.o .libs/pcre_fullinfo.o .libs/pcre_get.o .libs/pcre_globals.o .libs/pcre_info.o .libs/pcre_maketables.o .libs/pcre_newline.o .libs/pcre_ord2utf8.o .libs/pcre_refcount.o .libs/pcre_study.o .libs/pcre_tables.o .libs/pcre_try_flipped.o .libs/pcre_ucd.o .libs/pcre_valid_utf8.o .libs/pcre_version.o .libs/pcre_xclass.o .libs/pcre_chartables.o -o .libs/libpcre-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libpcre.dll.a
Creating library file: .libs/libpcre.dll.a
false cru .libs/libpcre.a pcre_compile.o pcre_config.o pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o pcre_globals.o pcre_info.o pcre_maketables.o pcre_newline.o pcre_ord2utf8.o pcre_refcount.o pcre_study.o pcre_tables.o pcre_try_flipped.o pcre_ucd.o pcre_valid_utf8.o pcre_version.o pcre_xclass.o pcre_chartables.o
make[1]: *** [libpcre.la] Error 1
make[1]: Leaving directory `/home/Limit/dep-src/pcre-7.9'
make: *** [all] Error 2
...
However, ".libs/libpcre-0.dll" and ".libs/libpcre.dll.a" gets created and seems sane...
But even if they are correctly linked, any files coming after them does not get linked, and "make install" does not work...
The exact same problem occurs with Berkeley db 4.7.25 (I can post output if you want).
I would appreciate any hints on this a lot!
Thank you for your time.
-Eystein
Hello,
first to be able to reproduce your issues you have, I need to know which gcc version toolchain you are using? Also of some interest is, what date of build they have?
Kai
Hi,
Thank you for your reply.
I think I may have solved the problem, without exactly knowing why..
I have tried a couple of different versions of gcc, but I just downloaded "mingw-w64-bin_i686-mingw_20090918.zip", with "x86_64-w64-mingw32-gcc.exe --version" giving "x86_64-w64-mingw32-gcc.exe (GCC) 4.5.0 20090918 (experimental)".
I tried to compile the PCRE version found at ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz with the commands and result as in the original post.
But I read somewhere of a similar problem on Solaris (I think), that the "ar" utility was missing. I found ar.exe in /mingw/x86_64-w64-mingw32/bin, so I did "export PATH=$PATH:/mingw/x86_64-w64-mingw32/bin" before ./configure.
Now whole compilation succeeds!
I really appreciate the effort you are doing to create these tools!
It would however be very nice if the files contained a short readme/howto for newbies like me. :)