help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] [Fwd: Re: [Fwd: Build glpk as a shared library on Cygwin, Mi


From: Andrew Makhorin
Subject: [Help-glpk] [Fwd: Re: [Fwd: Build glpk as a shared library on Cygwin, MinGW and similar systems]]
Date: Tue, 11 Dec 2012 00:36:22 +0400

-------- Forwarded Message --------
From: Jean-Pierre Flori <address@hidden>
To: marco atzeri <address@hidden>
Cc: address@hidden
Subject: Re: [Help-glpk] [Fwd: Build glpk as a shared library on Cygwin,
MinGW and similar systems]
Date: Mon, 10 Dec 2012 20:46:25 +0100

2012/12/10 marco atzeri <address@hidden>:
> On 12/10/2012 8:20 PM, Andrew Makhorin wrote:
>
>> -------- Forwarded Message --------
>> From: Jean-Pierre Flori <address@hidden>
>> To: address@hidden
>> Subject: Build glpk as a shared library on Cygwin, MinGW and similar
>> systems
>> Date: Mon, 10 Dec 2012 19:20:19 +0100
>>
>> Dear all,
>>
>> First thanks for this great library.
>>
>> I'd like to be able to build glpk as a shared library on Cygwin and MinGW.
>> But on such system (and surely others), libtool will refuse without some
>> help.
>>
>> Would you consider adding the "-no-undefined" flag to
>> "libglpk_la_LDFLAGS" in src/Makefile.am?
>> This flag is needed under such systems to
>> promise libtool that the linker won't encounter undefined symbols at
>> link time.
>> Without it, recent (since some years) versions of libtool just don't
>> even try linking and fall back to only making static libraries.
>> (See http://www.sourceware.org/autobook/autobook/autobook_88.html for some
>> doc.)
>>
>> This flag should be harmless on other systems, but you could also only
>> add it conditionally on the fact the build is performed on Cygwin or
>> others
>> (e.g. check __CYGWIN__, surely some autotools magic does it as well,
>> using some case $host in .... *-cygwin or something like that)
>> and/or that a shared version is being built.
>>
>> The corresponding piece of code in MPIR is here:
>> https://github.com/wbhart/mpir/blob/master/configure.in#L1844
>>
>> For MPFR, you can have a look here:
>>
>> https://gforge.inria.fr/scm/viewvc.php/trunk/configure.ac?view=markup&revision=8432&root=mpfr
>> The solution is similar.
>>
>> Best,
>>
>
> Jean-Pierre
>
> glpk is already available as shared library on cygwin
>
> $ cygcheck -c -d |grep glpk
> glpk                                     4.47-1
> libglpk-devel                            4.47-1
> libglpk0                                 4.47-1
>
> and of course is configured with "LDFLAGS=-no-undefined"
>
> Why do you need to build it again ?
> Something missing on my build ?
No I think your build is perfectly fine!
>
I meant letting the -no-undefined flag being picked up automatically
by your build system when needed.

My intention is to finally to get Sage (www.sagemath.org) to build
from source on Cygwin and GLPK is included in the distribution.

I'm fine with passing LDFLAGS =-no-undefined to configure ourselves,
but for some other software I remember that it was quite painful,
especially with recent versions of gcc or ld which error out when fed
with non recognized flags, and that's the case of -no-undefined which
is really meant for libtool and not gcc or ld.
I don't think the Cygwin gcc / ld are recent enough, so that must have
been on MinGW (where -no-undefined is needed as well).
>

Best,

-- 
Jean-Pierre Flori






reply via email to

[Prev in Thread] Current Thread [Next in Thread]