Problem compiling libgoto2 at the dllwrap step
Archambault Fabien
fabien.archambault at nanotimes.fr
Tue May 3 11:14:55 UTC 2011
Hi all,
I am using the repo mingw for Fedora which is up-to-date in Fedora 14:
# cat /etc/yum.repos.d/fedora-cross.repo
[fedora-cross]
name=fedora-cross
baseurl=http://build1.openftd.org/fedora-cross/$basearch
gpgcheck=1
enabled=1
gpgkey=http://build1.openftd.org/fedora-cross/RPM-GPG-KEY-Erik-van-Pienbroek
exclude=cross-gcc*.fc15_cross* cross-cpp*.fc15_cross*
mingw32-gcc*.fc15_cross* mingw32-cpp*.fc15_cross*
mingw64-gcc*.fc15_cross* mingw64-cpp*.fc15_cross*
I installed the 64 and 32 bits of gfortran and gcc:
$ i686-w64-mingw32-gfortran -v
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-w64-mingw32/4.6.0/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../configure --prefix=/usr --bindir=/usr/bin
--includedir=/usr/include --libdir=/usr/lib64 --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--with-gnu-as --with-gnu-ld --verbose --without-newlib
--disable-multilib --with-system-zlib --disable-nls
--without-included-gettext --disable-win32-registry
--enable-languages=c,c++,objc,obj-c++,fortran
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-libgomp
--target=i686-w64-mingw32 --with-sysroot=/usr/i686-w64-mingw32/sys-root
Thread model: win32
gcc version 4.6.0 20110205 (Fedora MinGW 4.6.0-0.5.20110205.fc14) (GCC)
I am trying to compile the libgoto2 for having windows dll but it fails
at the end when using dllwrap. The package can be downloaded there:
http://www.tacc.utexas.edu/tacc-projects/gotoblas2/downloads/
When you untar the file you just need to modify the Makefile to remove
the tests (as you cannot execute them on Linux as you are compiling for
Windows). This means:
all :: libs tests netlib shared
To become:
all :: libs netlib shared
Then for the 32 bits compilation you need to do: make BINARY=32
CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran
For the 64: make BINARY=64 CC=x86_64-w64-mingw32-gcc
FC=x86_64-w64-mingw32-gfortran
For both architectures it ends with:
perl ./gensymbol win2k x86 dummy 0 0 > libgoto2.def
i686-w64-mingw32-gcc -O2 -Wall -m32 -DF_INTERFACE_GFORT -DSMP_SERVER
-DMAX_CPU_NUMBER=24 -DASMNAME=dllinit -DASMFNAME=dllinit_
-DNAME=dllinit_ -DCNAME=dllinit -DCHAR_NAME=\"dllinit_\"
-DCHAR_CNAME=\"dllinit\" -DNO_AFFINITY -I.. -c -o dllinit.obj -s dllinit.c
i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib
i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \
--entry _dllinit at 12 -s dllinit.obj --dllname libgoto2.dll
../libgoto2_nehalemp-r1.13.lib -L/usr/lib64/gcc/i686-w64-mingw32/4.6.0
-L/usr/lib64/gcc/i686-w64-mingw32/4.6.0/../../../../i686-w64-mingw32/lib/../lib
-L/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib
-L/usr/lib64/gcc/i686-w64-mingw32/4.6.0/../../../../i686-w64-mingw32/lib
-L/usr/i686-w64-mingw32/sys-root/mingw/lib -l -lgfortran -lmingw32
-lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname
-lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt
/usr/lib64/gcc/i686-w64-mingw32/4.6.0/../../../../i686-w64-mingw32/bin/ld:
cannot find -l-lgfortran
collect2: ld returned 1 exit status
i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1
make[1]: *** [libgoto2.dll] Error 1
make[1]: Leaving directory `/PATH/GotoBLAS2/exports'
make: *** [shared] Error 2
I have found a similar topic:
http://sourceforge.net/projects/mingw-w64/forums/forum/723797/topic/3766987
They say that the issue is solved with a patch from July 2010. I would
like to know if you can reproduce the problem and if the patch is
available or do I have to modify the source package?
Cheers,
Fabien
More information about the mingw
mailing list