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

Sage 7.5 binaries do not build #22175

Closed
vbraun opened this issue Jan 12, 2017 · 25 comments
Closed

Sage 7.5 binaries do not build #22175

vbraun opened this issue Jan 12, 2017 · 25 comments

Comments

@vbraun
Copy link
Member

vbraun commented Jan 12, 2017

Sage doesn't build in long (~100 chars) directories:

169625[dochtml] Error building the documentation.
169626[dochtml] Traceback (most recent call last):
169627[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python/runpy.py", line 174, in _run_module_as_main
169628[dochtml]     "__main__", fname, loader, pkg_name)
169629[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python/runpy.py", line 72, in _run_code
169630[dochtml]     exec code in run_globals
169631[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python2.7/site-packages/sage_setup/docbuild/__main__.py", line 2, in <module>
169632[dochtml]     main()
169633[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 1667, in main
169634[dochtml]     builder()
169635[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 316, in _wrapper
169636[dochtml]     getattr(get_builder(document), 'inventory')(*args, **kwds)
169637[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 510, in _wrapper
169638[dochtml]     build_many(build_ref_doc, L)
169639[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 252, in build_many
169640[dochtml]     ret = x.get(99999)
169641[dochtml]   File "/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2/local/lib/python/multiprocessing/pool.py", line 567, in get
169642[dochtml]     raise self._value
169643[dochtml] NameError: Singular library 'freegb.lib' not found

Upstream: Fixed upstream, but not in a stable release.

CC: @jpflori @kiwifb

Component: build

Author: Volker Braun

Branch/Commit: u/vbraun/sage_7_5_binaries_do_not_build @ d31d416

Reviewer: Eric Gourgoulhon

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

@vbraun vbraun added this to the sage-7.5 milestone Jan 12, 2017
@jdemeyer
Copy link

comment:1

Is this on every machine or just one?

@jpflori
Copy link

jpflori commented Jan 12, 2017

comment:3

Mmmm what is strange is that SAGE_FAT_BINARIES is not mentioned in Singular's spkg-install...
Can you post Singular's buid log?

@vbraun
Copy link
Member Author

vbraun commented Jan 12, 2017

comment:4

Every machine, logs are at http://build.sagedev.org/#/builders?tags=%2Bbinary-pkg

@egourgoulhon
Copy link
Member

comment:5

I don't know if this is relevant, but on my computer (Xeon E5-2623 running Ubuntu 16.04), I could build Sage 7.5 with SAGE_FAT_BINARY=yes without any error, simply a warning:

[ecm-6.4.4.p0] Warning: SAGE_FAT_BINARY is currently not really supported by this package.

Here is what I did:

export SAGE_FAT_BINARY=yes
MAKE="make -j8" make

@jpflori
Copy link

jpflori commented Jan 13, 2017

comment:6

Works as well for me on ppc64 except for #22179.

@vbraun
Copy link
Member Author

vbraun commented Jan 13, 2017

comment:7

I think the hard-coded char libnamebuf[128]; overflows, urgh...

@vbraun
Copy link
Member Author

vbraun commented Jan 14, 2017

comment:9

In fact plain singular fails when installed in a long path:

$ ./sage -singular
> LIB "freegb.lib";
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/freegb.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/bfun.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/presolve.lib (4.0.2.2,Jan_2016)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/elim.lib (4.0.0.1,Jan_2014)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/poly.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/ring.lib (4.0.3.5,Nov_2016)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/primdec.lib (4.0.2.0,Apr_2015)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/absfact.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/triang.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/random.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/matrix.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/general.lib (4.0.0.1,Jan_2014)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/inout.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/nctools.lib (4.0.3.3,Sep_2016)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/dmodapp.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/sing.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/gkdim.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/dmod.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/control.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/homolog.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/deform.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/gmssing.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/linalg.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/qhmoduli.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/rinvar.lib (4.0.1.1,Jan_2015)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/zeroset.lib (4.0.0.0,Jun_2013)
// ** loaded /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma/local/bin/../share/singular/LIB/primitiv.lib (4.0.0.0,Jun_2013)
   ? ...parse error
   ? error occurred in or before STDIN line 1: `LIB "freegb.lib";`

@vbraun
Copy link
Member Author

vbraun commented Jan 14, 2017

@vbraun
Copy link
Member Author

vbraun commented Jan 14, 2017

comment:11

Upstream at Singular/Singular#811


New commits:

d31d416Patch Singular library name buffer to decent length

@vbraun
Copy link
Member Author

vbraun commented Jan 14, 2017

Upstream: Reported upstream. No feedback yet.

@vbraun
Copy link
Member Author

vbraun commented Jan 14, 2017

Commit: d31d416

@vbraun

This comment has been minimized.

@egourgoulhon
Copy link
Member

comment:14

From a fresh git clone + git pull of the ticket branch, with a long path for Sage root (252 characters), build fails with the error

[singular-4.1.0p1] checking for main in -lpython2.7... yes
[singular-4.1.0p1] checking embedding python interface module... no
[singular-4.1.0p1] ./configure: /home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/verylongpath5/verylongpath6/verylongpath7/verylongpath8/verylongpath9/verylongpath10/verylongpath11/verylongpath12/verylongpath13/verylongpath14/verylongpath15/verylongpath16/sage/local/bin/python2.7-config: /home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/veryl: bad interpreter: No such file or directory
[singular-4.1.0p1] configure: PYTHON_LSPEC=
[singular-4.1.0p1] ./configure: /home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/verylongpath5/verylongpath6/verylongpath7/verylongpath8/verylongpath9/verylongpath10/verylongpath11/verylongpath12/verylongpath13/verylongpath14/verylongpath15/verylongpath16/sage/local/bin/python2.7-config: /home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/veryl: bad interpreter: No such file or directory
[singular-4.1.0p1] configure: error: Python Prefix is not known
[maxima-5.35.1.p2] ;;; Finished compiling /home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/verylongpath5/verylongpath6/verylongpath7/verylongpath8/verylongpath9/verylongpath10/verylongpath11/verylongpath12/verylongpath13/verylongpath14/verylongpath15/verylongpath16/sage/local/var/tmp/sage/build/maxima-5.35.1.p2/src/src/lesfac.lisp.
[maxima-5.35.1.p2] ;;;
[singular-4.1.0p1] Error configuring Singular.

As you can see from the error message above:

/home/eric/sage/verylongpath1/verylongpath2/verylongpath3/verylongpath4/veryl: bad interpreter: No such file or directory

there seems to remain some truncation issue.

@egourgoulhon
Copy link
Member

Log of failed singular build with long path on Ubuntu 16.04

@kiwifb
Copy link
Member

kiwifb commented Jan 15, 2017

comment:15

Attachment: singular-4.1.0p1.log

Could you also post config.log? This is slightly different but also interesting. Volker's original error is at runtime once singular is installed. When you run singular it cannot find its own stuff because of the long path. You are seeing an error at configuration time. I'd like to know what is going wrong then.

@egourgoulhon
Copy link
Member

config.log corresponding to the failed build of singular with long path

@kiwifb
Copy link
Member

kiwifb commented Jan 15, 2017

comment:16

Attachment: config.log

I should have been more specific. singular's config.log in SAGE_LOCAL/var/tmp/sage/build/singular-4.1.0p1/src/ I think.

@egourgoulhon
Copy link
Member

The config.log in SAGE_ROOT/local/var/tmp/sage/build/singular-4.1.0p1/src

@vbraun
Copy link
Member Author

vbraun commented Jan 15, 2017

comment:17

Attachment: config.2.log

That is the shebang line length exceeded and manifests itself in the "bad interpreter" error. On Linux, the shebang (line starting with #! at the beginning of a script) is limited to 127 chars. We already take that into account when building binaries. Note that the freegb.lib library path is a good bit longer than the path to the singular binary (which necessarily appears in the shebang).

@vbraun
Copy link
Member Author

vbraun commented Jan 15, 2017

comment:18

Patch is now merged in upstream

@vbraun
Copy link
Member Author

vbraun commented Jan 15, 2017

Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

@vbraun
Copy link
Member Author

vbraun commented Jan 15, 2017

Author: Volker Braun

@egourgoulhon
Copy link
Member

comment:21

Replying to @vbraun:

That is the shebang line length exceeded and manifests itself in the "bad interpreter" error. On Linux, the shebang (line starting with #! at the beginning of a script) is limited to 127 chars. We already take that into account when building binaries.

OK, sorry for the noise...
and thanks for your explanations. I may have wasted your time, but I've learned the shebang thing today.

@egourgoulhon
Copy link
Member

comment:22

With a small path, build completed sucessfully. Since the patch has been merged upstream, I think we can set this to positive review. François, Jean-Pierre do you agree?

@vbraun
Copy link
Member Author

vbraun commented Jan 15, 2017

Reviewer: Eric Gourgoulhon

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

5 participants