Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade bliss package to 0.73 with Debian patches; install header files in location expected by polymake #20901

Closed
mkoeppe opened this issue Jun 28, 2016 · 45 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 28, 2016

New upstream archive: http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip (we have 0.72)

Upstream bliss does not have a proper build system (in particular no 'make install').
"spkg-install" installs header files with generic names such as "graph.hh" flat into $SAGE_LOCAL/include/

Debian has https://packages.debian.org/sid/math/bliss
which autotoolizes the package and adjust the include file location.
This matches where Polymake (#20892) expects the header files.

On https://github.com/mkoeppe/bliss in branch sage_package I have applied the Debian patches and a few more patches for Sage. The spkg-src script clones from there and builds a distribution. The result is available here:

tarball: https://github.com/mkoeppe/bliss/releases/download/sage_package%2F0.73%2Bdebian-1%2Bsage-2016-08-02/bliss-0.73.debian-1.sage-2016-08-02.tar.gz (rename to bliss-0.73+debian-1+sage-2016-08-02.tar.gz)

Upstream: Reported upstream. No feedback yet.

CC: @sagetrac-azi @jdemeyer @videlec @kcrisman @dimpase @fchapoton @stumpc5 @mo271 @vbraun

Component: packages: optional

Author: Matthias Koeppe

Branch: c0c0427

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/20901

@mkoeppe mkoeppe added this to the sage-7.3 milestone Jun 28, 2016
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

Dependencies: #20692

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 15, 2016

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 15, 2016

Commit: 3837a48

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 15, 2016

New commits:

3837a48bliss: Use autotoolized package from Debian

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 15, 2016

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 15, 2016

Changed dependencies from #20692 to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2016

comment:5

Needs review. Prerequisite for polymake (#20892).

@dimpase
Copy link
Member

dimpase commented Jul 16, 2016

comment:6

what are the new goodies? a shared library?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2016

comment:7

Replying to @dimpase:

what are the new goodies? a shared library?

A shared library, proper include files location, and as a result works as a prerequisite for polymake.
New upstream version -- but upstream is silent about what has changed compared to 0.72.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

225755ebliss: Add more info in SPKG.txt

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2016

Changed commit from 3837a48 to 225755e

@jdemeyer
Copy link
Contributor

comment:9

The usual way to ship packages in Sage is to start from the original unmodified sources and then apply patches (either at packaging time or at build time). Here, you are instead forking upstream for no clear reason.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 17, 2016

Changed commit from 225755e to 4b22211

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 17, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

4b22211bliss: Use upstream tarball and patches

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2016

comment:11

Replying to @jdemeyer:

The usual way to ship packages in Sage is to start from the original unmodified sources and then apply patches (either at packaging time or at build time). Here, you are instead forking upstream for no clear reason.

OK, I've changed it to using upstream + a patch.
Unfortunately our patches cannot be as elegant as Debian's because we cannot rely on the availability of autotools. So my patch has to ship the whole autogenerated build system.

@mkoeppe

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Jul 18, 2016

comment:12

Learn to write a spkg-src file like for ecl
https://github.com/sagemath/sage-prod/blob/master/build/pkgs/ecl/spkg-src
or glpk at #20710. It will require you to produce a new tarball and host it somewhere until the ticket is merged.

@dimpase
Copy link
Member

dimpase commented Jul 20, 2016

comment:13

yeah, spkg-src is important, as you don't want to become the only one in state to perform an update...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 26, 2016

comment:14

Unfortunately this update causes some tests to fail with segfault.

age:             sage: g3 = polytopes.hypercube(3).vertex_graph(); g3
Graph on 8 vertices
sage:             sage: g3.automorphism_group().cardinality()
python(2197,0x7fff7b8f9000) malloc: *** error for object 0x1001d3fff: pointer being realloc'd was not allocated
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x00007fff8b2cff06 in __pthread_kill () from /usr/lib/system/libsystem_kernel.dylib
(gdb) where
#0  0x00007fff8b2cff06 in __pthread_kill () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff92ea14ec in pthread_kill () from /usr/lib/system/libsystem_pthread.dylib
#2  0x00007fff8ec5c6e7 in abort () from /usr/lib/system/libsystem_c.dylib
#3  0x00007fff933d879d in realloc () from /usr/lib/system/libsystem_malloc.dylib
#4  0x0000000107284ddd in __pyx_f_4sage_3ext_6memory_sage_sig_realloc () from /Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/ext/memory.so
#5  0x0000000106afca01 in __gmpz_realloc () from /Users/mkoeppe/cvs/sage/local/lib/libgmp.16.dylib
#6  0x0000000106af8c0e in __gmpz_mul_si () from /Users/mkoeppe/cvs/sage/local/lib/libgmp.16.dylib
#7  0x00000001aefad6f0 in ?? () from /Users/mkoeppe/cvs/sage/local/lib/libbliss.2.dylib
#8  0x00000001aefaf43c in ?? () from /Users/mkoeppe/cvs/sage/local/lib/libbliss.2.dylib
#9  0x00000001aef96e13 in __pyx_pw_4sage_6graphs_5bliss_1automorphism_group(_object*, _object*, _object*) ()
   from /Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/graphs/bliss.so
#10 0x00000001000e92a4 in PyEval_EvalFrameEx () from /Users/mkoeppe/cvs/sage/local/lib/libpython2.7.dylib
#

I could use some help here.

@kiwifb
Copy link
Member

kiwifb commented Jul 26, 2016

comment:15

Well known problem. Disable gmp in bliss that's the culprit.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 26, 2016

comment:16

Replying to @kiwifb:

Well known problem. Disable gmp in bliss that's the culprit.

Thanks!

@dimpase
Copy link
Member

dimpase commented Jul 26, 2016

comment:17

Why would bliss need gmp? Looks strange to me.

@kiwifb
Copy link
Member

kiwifb commented Jul 26, 2016

comment:18

It's a build option, ask the author.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2016

Changed commit from 4b22211 to 1d2707c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

3111091Merge tag '7.3.beta9' into t/20901/upgrade_bliss_package_to_0_73_with_debian_patches__install_header_files_in_location_expected_by_polymake
1c398a3Merge tag '7.3.rc0' into t/20901/upgrade_bliss_package_to_0_73_with_debian_patches__install_header_files_in_location_expected_by_polymake
1d2707cUse repackaged archive instead of huge patch

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 3, 2016

comment:21

Replying to @kiwifb:

Learn to write a spkg-src file

Thanks, done.

Ready for review.

@dimpase
Copy link
Member

dimpase commented Aug 3, 2016

comment:22

there is something funny with tarball name: if I do sage -i bliss it looks for bliss-0.73+debian-1+sage-2016-08-02.tar.gz, while wget with your URL gives bliss-0.73.debian-1.sage-2016-08-02.tar.gz.

OK, I renamed the tarball, and was able to run sage -i bliss, but the following make fails:

[sagelib-7.3.rc0] building 'sage.graphs.bliss' extension
[sagelib-7.3.rc0] Executing 1 command (using 1 thread)
[sagelib-7.3.rc0] [1/1] gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I/home/scratch/dimpase/sage/sage/local/include -I/home/scratch/dimpase/sage/sage/local/include/python2.7 -I/home/scratch/dimpase/sage/sage/local/lib/python2.7/site-packages/numpy/core/include -I/home/scratch/dimpase/sage/sage/src -I/home/scratch/dimpase/sage/sage/src/sage/ext -I/home/scratch/dimpase/sage/sage/src/build/cythonized -I/home/scratch/dimpase/sage/sage/src/build/cythonized/sage/ext -I/home/scratch/dimpase/sage/sage/local/include/python2.7 -c /home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.cpp -o build/temp.linux-x86_64-2.7/home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.o -fno-strict-aliasing
[sagelib-7.3.rc0] /home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.cpp:317:20: fatal error: graph.hh: No such file or directory
[sagelib-7.3.rc0] compilation terminated.
[sagelib-7.3.rc0] error: command 'gcc' failed with exit status 1

This is on Fedora23, Sage 7.3.rc0, with gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC).

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 3, 2016

comment:23

Replying to @dimpase:

there is something funny with tarball name: if I do sage -i bliss it looks for bliss-0.73+debian-1+sage-2016-08-02.tar.gz, while wget with your URL gives bliss-0.73.debian-1.sage-2016-08-02.tar.gz.

It's a limitation of github, it renames + to .

OK, I renamed the tarball, and was able to run sage -i bliss, but the following make fails:

[sagelib-7.3.rc0] building 'sage.graphs.bliss' extension
[sagelib-7.3.rc0] Executing 1 command (using 1 thread)
[sagelib-7.3.rc0] [1/1] gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I/home/scratch/dimpase/sage/sage/local/include -I/home/scratch/dimpase/sage/sage/local/include/python2.7 -I/home/scratch/dimpase/sage/sage/local/lib/python2.7/site-packages/numpy/core/include -I/home/scratch/dimpase/sage/sage/src -I/home/scratch/dimpase/sage/sage/src/sage/ext -I/home/scratch/dimpase/sage/sage/src/build/cythonized -I/home/scratch/dimpase/sage/sage/src/build/cythonized/sage/ext -I/home/scratch/dimpase/sage/sage/local/include/python2.7 -c /home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.cpp -o build/temp.linux-x86_64-2.7/home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.o -fno-strict-aliasing
[sagelib-7.3.rc0] /home/scratch/dimpase/sage/sage/src/build/cythonized/sage/graphs/bliss.cpp:317:20: fatal error: graph.hh: No such file or directory
[sagelib-7.3.rc0] compilation terminated.
[sagelib-7.3.rc0] error: command 'gcc' failed with exit status 1

This is on Fedora23, Sage 7.3.rc0, with gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC).

Thanks for catching this. Fix coming shortly.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2016

Changed commit from 1d2707c to c0c0427

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

c0c0427Adjust to changed bliss header file locations

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 3, 2016

comment:25

Fixed.

@mkoeppe

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Aug 3, 2016

comment:27

OK, this works. In order to keep the release manager happy, I suggest that you put the tarball somewhere where it can be wget'ed without renaming hassle...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 4, 2016

comment:28

Is this a "positive_review"?

@dimpase
Copy link
Member

dimpase commented Aug 4, 2016

comment:29

I trust you are able to put the tarball somewhere where the name mangling does not happen. :-)

@dimpase
Copy link
Member

dimpase commented Aug 4, 2016

Reviewer: Dima Pasechnik

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 4, 2016

comment:30

Thanks, Dima.

Volker - does the upload location of the tarball work for you?

@vbraun
Copy link
Member

vbraun commented Aug 7, 2016

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 10, 2016

Changed commit from c0c0427 to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 10, 2016

Upstream: Reported upstream. No feedback yet.

@fchapoton
Copy link
Contributor

comment:33

some patchbots meet compilation problems:

[sagelib-7.4.beta1] /home/worker/sage-patchbot/src/build/cythonized/sage/graphs/bliss.cpp:317:26: fatal error: bliss/graph.hh: No such file or directory
[sagelib-7.4.beta1]  #include "bliss/graph.hh"
[sagelib-7.4.beta1]                           ^
[sagelib-7.4.beta1] compilation terminated.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 18, 2016

comment:34

Well, the install location of this header file changed with this upgrade, so the patchbots will have to reinstall the package.

@jdemeyer
Copy link
Contributor

comment:35

I hope that #21288 will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants