Iftikhar Burhanuddin on Thu, 10 Jan 2008 15:15:31 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: running examples/extgcd.c on cygwin


Dear Michael,

I found fixes but didn't post them due to winter break hibernation. They
are as follows:

* Add the path of the pari libary to PATH environment variable on
cygwin.

* Link against a static pari library. One has to explictly do

make install-lib-sta

to get a libpari.a file. The default pari installation
only creates the dll version (libpari.dll).

Regards,
Ifti

---------- Forwarded message ----------
Date: Fri, 28 Dec 2007 15:17:08 +0100
From: Michael.Abshoff <michael.abshoff@googlemail.com>
To: Pari Users <pari-users@list.cr.yp.to>
Subject: running examples/extgcd.c on cygwin

Hi Ifti,

ironically I hit the same problem while compiling Sage 2.9.1.1 on
cygwin. I wasn't subscribed to pari-users, so I missed the problem.
Imagine my surprise While Googling for a solution that I found your
problem, but it looks like you didn't solve it [at least you didn't
report a solution].

The problem seems to be that you link the static libpari per default and
the linker gets easily confused if duplicate symbols appear in static
libraries, maybe due to linking the same lib more than once in various
stages. Pari doesn't provide an import lib or a def file on cygwin on
top of that, so linking dynamically won't work in most cases. My default
build results in the following two libs:

$ file libpari.dll.a
libpari.dll.a: current ar archive
$ file libpari.dll
libpari.dll: MS-DOS executable PE  for MS Windows (DLL) (console) Intel
80386 32-bit

To resolve my issue [and hopefully yours] I did the following:

$ rm libpari.dll.a
$ dlltool -z libpari.def --export-all-symbol libpari.dll

Then linking libcsage against libpari dynamically worked.

Let me know if that works for you. I can provide some patch for pari so
that the def file is created automatically.

On top of that: If you need more than the roughly 1.3GB RAM the cygwin
provides for your computation ping me. My offer to build an 64 bit MSVC
build of pari for Windows is still standing. I just need a motivating
factor to actually do it. I will have some time past the Sage 2.9.2
release due out in about 6 days.

Bill Allombert mentioned in Bristol at Sage Days 6 that I would need to
create some config file manually for the MSVC build, but I will ping the
pari-devel list once I got time to do so.

Cheers,

Michael