Problem compiling libgoto2 at the dllwrap step

Archambault Fabien fabien.archambault at nanotimes.fr
Mon May 30 07:28:58 UTC 2011


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 at 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 at 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


More information about the mingw mailing list