Skip to content

Commit

Permalink
Trac #29152: Cygwin: Fix cliquer, giac, meataxe, rw, libbraiding to b…
Browse files Browse the repository at this point in the history
…uild shared libraries, using `AM_LDFLAGS=-no-undefined`

Follow-up from #30396, where libtool's fallback to static library build
for `giac` caused linker errors while building sagelib.

This is fixed by passing `-no-undefined` to the libtool linking flags,
by setting `AM_LDFLAGS=-no-undefined`.

Affected packages can be found as follows:
{{{
$ grep "undefined symbols not allowed" logs/pkgs/*
cliquer-1.21.p4.log:libtool: link: warning: undefined symbols not
allowed in x86_64-unknown-cygwin shared libraries
giac-1.5.0.87p0.log:libtool: warning: undefined symbols not allowed in
x86_64-pc-cygwin shared libraries; building static only
libbraiding-1.0.p0.log:libtool: warning: undefined symbols not allowed
in x86_64-unknown-cygwin shared libraries; building static only
rw-0.7.p0.log:libtool: link: warning: undefined symbols not allowed in
x86_64-unknown-cygwin shared libraries
singular-4.1.1p2.p0.log:libtool: warning: undefined symbols not allowed
in x86_64-unknown-cygwin shared libraries; building static only
}}}

In `singular`, only the `gitfan.la` library (module) is affected:
{{{
Making all in gitfan
...
/usr/bin/bash ../../../libtool  --tag=CXX   --mode=link g++ -std=gnu++11
-O2 -g  -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs
-Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-
frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-
exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-
space -funroll-loops -fno-delete-null-pointer-checks -fno-rtti -module
-export-dynamic -avoid-version -flat_namespace
-weak_reference_mismatches weak -undefined dynamic_lookup
-L/cygdrive/d/a/sage/sage/local/lib
-Wl,-rpath,/cygdrive/d/a/sage/sage/local/lib  -pipe -fno-common -g0 -O3
-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-
pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv
-fvisibility=default -finline-functions -fno-exceptions -fconserve-space
-funroll-loops -fno-delete-null-pointer-checks  -Wl,-Bdynamic -o
gitfan.la -rpath /cygdrive/d/a/sage/sage/local/libexec/singular/MOD
gitfan_la-gitfan.lo  -lreadline -lncurses -lmpfr -lrt
libtool: warning: undefined symbols not allowed in x86_64-unknown-cygwin
shared libraries; building static only
libtool: link: ar cru .libs/gitfan.a  gitfan_la-gitfan.o
libtool: link: ranlib .libs/gitfan.a
libtool: link: ( cd ".libs" && rm -f "gitfan.la" && ln -s "../gitfan.la"
"gitfan.la" )
}}}

The issue also affects the optional package `meataxe`.
{{{
[meataxe-1.0.p0] /usr/bin/bash ../libtool  --tag=CC   --mode=link gcc
-g -O2  -L/opt/sagemath-9.0/local/lib
-Wl,-rpath,/opt/sagemath-9.0/local/lib  -o libmtx.la -rpath
/opt/sagemath-9.0/local/lib args.lo berlekmp.lo bsand.lo bscore.lo
bsdup.lo bsissub.lo bsmatch.lo bsminus.lo bsop.lo bsor.lo bsprint.lo
bsread.lo bswrite.lo cfinfo.lo charpol.lo chbasis.lo error.lo ffio.lo
fpcore.lo fpdup.lo fpmul.lo fpmul2.lo fpprint.lo gcd.lo genseed.lo
grmaprow.lo grmatcore.lo grtable.lo homcomp.lo imatcore.lo imatread.lo
imatwrite.lo init.lo intio.lo issub.lo isisom.lo kernel-0.lo ldiag.lo
maddmul.lo mat2vec.lo matadd.lo matclean.lo matcmp.lo maketabF.lo
matcopy.lo matcore.lo matcut.lo matdup.lo matech.lo matid.lo matins.lo
matinv.lo matmul.lo matnull.lo matorder.lo matpivot.lo matprint.lo
matpwr.lo matread.lo mattr.lo mattrace.lo matwrite.lo message.lo
mfcore.lo mfread.lo mfreadlong.lo mfwrite.lo mfwritelong.lo minpol.lo
mkendo.lo mmulscal.lo mraddgen.lo mrcore.lo mrread.lo mrtranspose.lo
mrwrite.lo msclean.lo mscore.lo mtensor.lo mtxobj.lo os.lo permcmp.lo
permcore.lo permdup.lo perminv.lo permmul.lo permorder.lo permprint.lo
permpwr.lo permread.lo permwrite.lo poladd.lo polcmp.lo polcore.lo
polderive.lo poldiv.lo poldup.lo polgcd.lo polmul.lo polprint.lo
polread.lo polwrite.lo quotient.lo random.lo rdcfgen.lo saction.lo
setcore.lo setinsert.lo settest.lo spinup.lo spinup2.lo split.lo
stabpwr.lo stfcore.lo stfread.lo stfwrite.lo string.lo sumint.lo
temap.lo tkinfo.lo vec2mat.lo wgen.lo window.lo zcleanrow.lo zcmprow.lo
zgap.lo zpermrow.lo zzz2.lo
[meataxe-1.0.p0] libtool:   error: can't build x86_64-unknown-cygwin
shared library unless -no-undefined is specified
}}}

This is a common issue especially when using libtool to link Windows
DLLs and should hopefully be straightforward to fix.

See also:
 - #30271 `nauty`: Switch to autotoolized fork so that shared libraries
can be built

URL: https://trac.sagemath.org/29152
Reported by: embray
Ticket author(s): Matthias Koeppe, Miguel Marco, Simon King
Reviewer(s): Matthias Koeppe, Dima Pasechnik
  • Loading branch information
Release Manager committed Mar 1, 2021
2 parents dd6f37e + 6b6ee5c commit 10b3abc
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 21 deletions.
7 changes: 4 additions & 3 deletions build/pkgs/cliquer/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Description
-----------

Cliquer is a set of C routines for finding cliques in an arbitrary
weighted graph. It uses an exact branch-and-bound algorithm recently
developed by Patr Ostergard.
weighted graph. It uses an exact branch-and-bound algorithm
developed by Patric Östergård.

License
-------
Expand All @@ -30,4 +30,5 @@ Dependencies
Patches
-------

- autotoolized - see https://github.com/dimpase/autocliquer
- minor config updates (v1.22)
- autotoolized - see https://github.com/dimpase/autocliquer (v1.21)
7 changes: 4 additions & 3 deletions build/pkgs/cliquer/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=cliquer-VERSION.tar.gz
sha1=930ec79f64facb8ac4035a3e3702ed2b1dabd092
md5=1d985e0bed876cc69aed43953a814a6a
cksum=766312376
sha1=2973abfcf84f9d098e8abbf4f0ac4b776c7f6105
md5=f37da2689c4f867407a9030a5cfc39e6
cksum=1511776397
upstream_url=https://github.com/dimpase/autocliquer/releases/download/vVERSION/cliquer-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/cliquer/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.p4
1.22
7 changes: 4 additions & 3 deletions build/pkgs/libbraiding/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=libbraiding-VERSION.tar.gz
sha1=849d146abc03f0773a74e41351711b56b6bfc5d3
md5=969f2f1f412c60e8ff1ea107f00a25b1
cksum=357804794
sha1=06610e47eb243b27aea0ad399b41614fcdb179c9
md5=5466605026b90bdca7ca20852f88b5c5
cksum=704753563
upstream_url=https://github.com/miguelmarco/libbraiding/releases/download/1.1/libbraiding-1.1.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/libbraiding/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.p0
1.1
9 changes: 5 additions & 4 deletions build/pkgs/meataxe/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=shared_meataxe-VERSION.tar.gz
sha1=1a84840fb928ca2684f16dc630c854ce579b0c2e
md5=5e1aab41b19c9fec967d02ead5077eca
cksum=2618257012
tarball=shared_meataxe-VERSION.tar.bz2
sha1=6764f72fab8b4472660cff6605087356ab91d3b7
md5=c9af9efa686e120612455778d64a71ca
cksum=1648865875
upstream_url=https://github.com/simon-king-jena/SharedMeatAxe/releases/download/vVERSION/shared_meataxe-VERSION.tar.bz2
2 changes: 2 additions & 0 deletions build/pkgs/meataxe/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Old Fedora package meataxe was replaced by sharedmeataxe
sharedmeataxe
2 changes: 1 addition & 1 deletion build/pkgs/meataxe/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.p0
1.0.1
2 changes: 1 addition & 1 deletion build/pkgs/rw/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description

rw is a program that calculates rank-width and rank-decompositions.

http://pholia.tdi.informatik.uni-frankfurt.de/~philipp/software/rw.shtml
https://sourceforge.net/projects/rankwidth/

License
-------
Expand Down
7 changes: 4 additions & 3 deletions build/pkgs/rw/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=rw-VERSION.tar.gz
sha1=4f2b92af13848c70b834c330cd751b22c03738aa
md5=58695835a1b5aaa3935143feabc8619a
cksum=3270113719
sha1=5c9c8a5c2eda798f6b0fe5218ba08ef429e0aa9f
md5=829612ea322d64bc529ffbb6be42d97e
cksum=93091513
upstream_url=https://sourceforge.net/projects/rankwidth/files/rw-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/rw/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.p0
0.9

0 comments on commit 10b3abc

Please sign in to comment.