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@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
Archambault Fabien schreef op di 03-05-2011 om 13:14 [+0200]:
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@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
Hi Fabien,
My guess is that there's an issue in the Makefile used by this project. There is an '-l' argument given but without an library to link against: -l -lgfortran
As gcc expects an argument after the '-l' it thinks that the library to link against is named '-lgfortran' (which doesn't exist), hence you get the error that a library named '-lgfortran' could not be found.
Kind regards,
Erik van Pienbroek
On 05/03/2011 07:23 PM, Erik van Pienbroek wrote:
Archambault Fabien schreef op di 03-05-2011 om 13:14 [+0200]:
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@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
Hi Fabien,
My guess is that there's an issue in the Makefile used by this project. There is an '-l' argument given but without an library to link against: -l -lgfortran
As gcc expects an argument after the '-l' it thinks that the library to link against is named '-lgfortran' (which doesn't exist), hence you get the error that a library named '-lgfortran' could not be found.
Kind regards,
Erik van Pienbroek
mingw mailing list mingw@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mingw
Hi Erik,
thanks for your judicious remark and support. Thanks to it I tried to understand more the Makefiles and figured out that this was defined in FEXTRALIB so I tried: make BINARY=32 CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran FEXTRALIB="-L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt" But it ends like: i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \ --entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_nehalemp-r1.13.lib -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt ../libgoto2_nehalemp-r1.13.lib(memory.obj):memory.c:(.text+0x3a5): undefined reference to `_cpuid' ../libgoto2_nehalemp-r1.13.lib(parameter.obj):parameter.c:(.text+0x2b): undefined reference to `_cpuid' collect2: ld returned 1 exit status i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1 make[1]: *** [libgoto2.dll] Error 1
I cannot understand where is defined the FEXTRALIB using grep it seems to be defined with the compiler but I am not enough used to Makefiles. Also the new error I do not know from where could "cpuid" arise?
Thanks a lot, Fabien
Archambault Fabien schreef op wo 04-05-2011 om 10:18 [+0200]:
thanks for your judicious remark and support. Thanks to it I tried to understand more the Makefiles and figured out that this was defined in FEXTRALIB so I tried: make BINARY=32 CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran FEXTRALIB="-L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt" But it ends like: i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \ --entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_nehalemp-r1.13.lib -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt ../libgoto2_nehalemp-r1.13.lib(memory.obj):memory.c:(.text+0x3a5): undefined reference to `_cpuid' ../libgoto2_nehalemp-r1.13.lib(parameter.obj):parameter.c:(.text+0x2b): undefined reference to `_cpuid' collect2: ld returned 1 exit status i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1 make[1]: *** [libgoto2.dll] Error 1
Hi,
This error means that something in the files memory.c and parameter.c try to call a function named 'cpuid' which doesn't seem to be provided by any of the libraries mentioned in the final linker command.
According to a grep in /usr/i686-w64-mingw32/sys-root/mingw/include there is a function called '__cpuid' (mentioned in conio.h and intrin.h). Note that this function uses two underscores while the linker tries to locate a function which just one underscore. I don't know if the program you're trying to compile also expects this '__cpuid' function, but I think you can better ask this question to the upstream developers.
Regards,
Erik van Pienbroek
On 05/05/2011 04:12 PM, Erik van Pienbroek wrote:
Archambault Fabien schreef op wo 04-05-2011 om 10:18 [+0200]:
thanks for your judicious remark and support. Thanks to it I tried to understand more the Makefiles and figured out that this was defined in FEXTRALIB so I tried: make BINARY=32 CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran FEXTRALIB="-L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt" But it ends like: i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \ --entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_nehalemp-r1.13.lib -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt ../libgoto2_nehalemp-r1.13.lib(memory.obj):memory.c:(.text+0x3a5): undefined reference to `_cpuid' ../libgoto2_nehalemp-r1.13.lib(parameter.obj):parameter.c:(.text+0x2b): undefined reference to `_cpuid' collect2: ld returned 1 exit status i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1 make[1]: *** [libgoto2.dll] Error 1
Hi,
This error means that something in the files memory.c and parameter.c try to call a function named 'cpuid' which doesn't seem to be provided by any of the libraries mentioned in the final linker command.
According to a grep in /usr/i686-w64-mingw32/sys-root/mingw/include there is a function called '__cpuid' (mentioned in conio.h and intrin.h). Note that this function uses two underscores while the linker tries to locate a function which just one underscore. I don't know if the program you're trying to compile also expects this '__cpuid' function, but I think you can better ask this question to the upstream developers.
Regards,
Erik van Pienbroek
mingw mailing list mingw@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mingw
Hi,
yes I already sent an email to upstream but they did not replied yet. i will try to find those calls to cpuid if it is only a matter of underscore...
I read a lot and some persons say that sometimes it is linked to a misplacement of libs when linking like -lthing1 -lthing2 does not work but -lthing2 -lthing1 works but I did not manage to find which combination is good...
Thanks, Fabien
On 05/05/2011 04:22 PM, Archambault Fabien wrote:
On 05/05/2011 04:12 PM, Erik van Pienbroek wrote:
Archambault Fabien schreef op wo 04-05-2011 om 10:18 [+0200]:
thanks for your judicious remark and support. Thanks to it I tried to understand more the Makefiles and figured out that this was defined in FEXTRALIB so I tried: make BINARY=32 CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran FEXTRALIB="-L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt" But it ends like: i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \ --entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_nehalemp-r1.13.lib -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt ../libgoto2_nehalemp-r1.13.lib(memory.obj):memory.c:(.text+0x3a5): undefined reference to `_cpuid' ../libgoto2_nehalemp-r1.13.lib(parameter.obj):parameter.c:(.text+0x2b): undefined reference to `_cpuid' collect2: ld returned 1 exit status i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1 make[1]: *** [libgoto2.dll] Error 1
Hi,
This error means that something in the files memory.c and parameter.c try to call a function named 'cpuid' which doesn't seem to be provided by any of the libraries mentioned in the final linker command.
According to a grep in /usr/i686-w64-mingw32/sys-root/mingw/include there is a function called '__cpuid' (mentioned in conio.h and intrin.h). Note that this function uses two underscores while the linker tries to locate a function which just one underscore. I don't know if the program you're trying to compile also expects this '__cpuid' function, but I think you can better ask this question to the upstream developers.
Regards,
Erik van Pienbroek
mingw mailing list mingw@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mingw
Hi,
yes I already sent an email to upstream but they did not replied yet. i will try to find those calls to cpuid if it is only a matter of underscore...
I read a lot and some persons say that sometimes it is linked to a misplacement of libs when linking like -lthing1 -lthing2 does not work but -lthing2 -lthing1 works but I did not manage to find which combination is good...
Thanks, Fabien
Hi again,
sorry to send again but I could not find the solution (yet). And the mainstream does not answer my emails... Do someone know how I can compile it?
Fabien
On 05/16/2011 10:07 AM, Archambault Fabien wrote:
On 05/05/2011 04:22 PM, Archambault Fabien wrote:
On 05/05/2011 04:12 PM, Erik van Pienbroek wrote:
Archambault Fabien schreef op wo 04-05-2011 om 10:18 [+0200]:
thanks for your judicious remark and support. Thanks to it I tried to understand more the Makefiles and figured out that this was defined in FEXTRALIB so I tried: make BINARY=32 CC=i686-w64-mingw32-gcc FC=i686-w64-mingw32-gfortran FEXTRALIB="-L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt" But it ends like: i686-w64-mingw32-ranlib ../libgoto2_nehalemp-r1.13.lib i686-w64-mingw32-dllwrap -o libgoto2.dll --def libgoto2.def \ --entry _dllinit@12 -s dllinit.obj --dllname libgoto2.dll ../libgoto2_nehalemp-r1.13.lib -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lm -lmingw32 -lmoldname -lmingwex -lmsvcrt -lmingw32 -lmoldname -lmingwex -lmsvcrt ../libgoto2_nehalemp-r1.13.lib(memory.obj):memory.c:(.text+0x3a5): undefined reference to `_cpuid' ../libgoto2_nehalemp-r1.13.lib(parameter.obj):parameter.c:(.text+0x2b): undefined reference to `_cpuid' collect2: ld returned 1 exit status i686-w64-mingw32-dllwrap: i686-w64-mingw32-gcc exited with status 1 make[1]: *** [libgoto2.dll] Error 1
Hi,
This error means that something in the files memory.c and parameter.c try to call a function named 'cpuid' which doesn't seem to be provided by any of the libraries mentioned in the final linker command.
According to a grep in /usr/i686-w64-mingw32/sys-root/mingw/include there is a function called '__cpuid' (mentioned in conio.h and intrin.h). Note that this function uses two underscores while the linker tries to locate a function which just one underscore. I don't know if the program you're trying to compile also expects this '__cpuid' function, but I think you can better ask this question to the upstream developers.
Regards,
Erik van Pienbroek
mingw mailing list mingw@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mingw
Hi,
yes I already sent an email to upstream but they did not replied yet. i will try to find those calls to cpuid if it is only a matter of underscore...
I read a lot and some persons say that sometimes it is linked to a misplacement of libs when linking like -lthing1 -lthing2 does not work but -lthing2 -lthing1 works but I did not manage to find which combination is good...
Thanks, Fabien
Hi again,
sorry to send again but I could not find the solution (yet). And the mainstream does not answer my emails... Do someone know how I can compile it?
Fabien
Hi all,
I have found that GotoBlas had a mailing list and there I had same support from guys using the library. In fact the main maintainer does not answer to any mails since months... One guy had forked the GotoBlas library to OpenBLAS (https://github.com/xianyi/OpenBLAS) and he found fixes in order to compile the library using mingw (mostly in c_check and f_check files).
If someone has the same issues he should enjoy the OpenBLAS repository!
Fabien