Re: [mpir-devel] bad mpirxx.dll from MPIR 2.6.0 release

137 views
Skip to first unread message

Brian Gladman

unread,
Nov 10, 2012, 10:56:42 AM11/10/12
to mpir-...@googlegroups.com
On 10/11/2012 13:32, redp wrote:
> Hi
> I tried to build MPIR 2.6.0 release on 32bit windows xp with visual studio 2008. Nothing special:
>
> cd win
> configure.bat --enable-shared
> make
> make check

Hi

Sadly, the command line build was maintained by Jason and it seems that
it is not fully up to date. I have looked at it and, as you have found,
the DLL build does not include the cxx routines as it should.

I have added a correction to the SVN but I have not tested it as I don't
use this build myself.

If you are able to test this change, I would apprecciate feedback on
whether it now works (my correction is a one off - I am not volunteering
to maintain the command line build!).

Brian

redp

unread,
Nov 10, 2012, 11:34:42 AM11/10/12
to mpir-...@googlegroups.com
Hi
I got make.bat from svn and rebuild all. Now I have following errors during make check:
testing cxx_t-unary.exe
try.c
..\..\..\tests\devel\try.c(138) : warning C4273: '__sys_nerr' : inconsistent dll
 linkage
        f:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(284) :
see previous definition of '__sys_nerr'
..\..\..\tests\devel\try.c(148) : warning C4273: 'strerror' : inconsistent dll linkage
        f:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\string.h(126) :
see previous definition of 'strerror'
   Creating library try.lib and object try.exp
try.obj : error LNK2001: unresolved external symbol ___gmpn_sub_err2_n
try.obj : error LNK2001: unresolved external symbol ___gmpn_add_err2_n
try.obj : error LNK2001: unresolved external symbol ___gmpn_sub_err1_n
try.obj : error LNK2001: unresolved external symbol ___gmpn_add_err1_n
try.exe : fatal error LNK1120: 4 unresolved externals
ERROR

Brian Gladman

unread,
Nov 10, 2012, 12:40:47 PM11/10/12
to mpir-...@googlegroups.com
On 10/11/2012 16:34, redp wrote:
> Hi
> I got make.bat from svn and rebuild all. Now I have following errors during
> make check:
> testing cxx_t-unary.exe
> try.c
> ..\..\..\tests\devel\try.c(138) : warning C4273: '__sys_nerr' :
> inconsistent dll
> linkage
> f:\Program Files\Microsoft Visual Studio
> 9.0\VC\INCLUDE\stdlib.h(284) :
> see previous definition of '__sys_nerr'
> ..\..\..\tests\devel\try.c(148) : warning C4273: 'strerror' : inconsistent
> dll linkage
> f:\Program Files\Microsoft Visual Studio
> 9.0\VC\INCLUDE\string.h(126) :
> see previous definition of 'strerror'
> Creating library try.lib and object try.exp
> try.obj : error LNK2001: unresolved external symbol ___gmpn_sub_err2_n
> try.obj : error LNK2001: unresolved external symbol ___gmpn_add_err2_n
> try.obj : error LNK2001: unresolved external symbol ___gmpn_sub_err1_n
> try.obj : error LNK2001: unresolved external symbol ___gmpn_add_err1_n
> try.exe : fatal error LNK1120: 4 unresolved externals
> ERROR

If these are all errors in try, do the tests all pass?

You can ignore errors in try, which does not work with the DLL build
because it uses MPIR internals that are not exported by the DLL.

Brian

redp

unread,
Nov 10, 2012, 1:10:57 PM11/10/12
to mpir-...@googlegroups.com

If these are all errors in try, do the tests all pass?

You can ignore errors in try, which does not work with the DLL build
because it uses MPIR internals that are not exported by the DLL.
after commenting out in win\make.bat strings
rem cd devel
rem cl %OPT% ..\..\..\tests\devel\try.c /I..\..\..\ /I..\..\..\tests ..\refmpn.obj ..\refmpz.obj ..\trace.obj ..\spinner.obj ..\misc.obj ..\memory.obj ..\getopt.obj %MPIRLIB%
rem if errorlevel 1 goto :err
rem cd ..
(perhaps they should be surrounded with IF %LIBTYPE% == lib ( ?) all remaining tests were ok

Thank you !

Brian Gladman

unread,
Nov 10, 2012, 2:21:15 PM11/10/12
to mpir-...@googlegroups.com
I'm pleased its now working for you. I took a look at why try fails
with the DLL build and I found that this was easy to fix by exporting a
few more symbols.

So I will ensure that it works in the next release.

Brian

Reply all
Reply to author
Forward
0 new messages