Opened 4 years ago

Closed 4 years ago

#22175 closed defect (fixed)

Sage 7.5 binaries do not build

Reported by: vbraun Owned by:
Priority: blocker Milestone: sage-7.5
Component: build Keywords:
Cc: jpflori, fbissey Merged in:
Authors: Volker Braun Reviewers: Eric Gourgoulhon
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: u/vbraun/sage_7_5_binaries_do_not_build (Commits, GitHub, GitLab) Commit: d31d416c95b221ea0a6a9bd0830b64ae4873bb06
Dependencies: Stopgaps:

Status badges

Description (last modified by vbraun)

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

Attachments (3)

singular-4.1.0p1.log (17.5 KB) - added by egourgoulhon 4 years ago.
Log of failed singular build with long path on Ubuntu 16.04
config.log (43.8 KB) - added by egourgoulhon 4 years ago.
config.log corresponding to the failed build of singular with long path
config.2.log (160.9 KB) - added by egourgoulhon 4 years ago.
The config.log in SAGE_ROOT/local/var/tmp/sage/build/singular-4.1.0p1/src

Download all attachments as: .zip

Change History (27)

comment:1 Changed 4 years ago by jdemeyer

Is this on every machine or just one?

comment:2 Changed 4 years ago by jpflori

  • Cc jpflori added

comment:3 Changed 4 years ago by jpflori

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

comment:4 Changed 4 years ago by vbraun

Last edited 4 years ago by vbraun (previous) (diff)

comment:5 Changed 4 years ago by egourgoulhon

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
Last edited 4 years ago by egourgoulhon (previous) (diff)

comment:6 Changed 4 years ago by jpflori

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

comment:7 Changed 4 years ago by vbraun

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

comment:8 Changed 4 years ago by fbissey

  • Cc fbissey added

comment:9 Changed 4 years ago by vbraun

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";`

comment:10 Changed 4 years ago by vbraun

  • Branch set to u/vbraun/sage_7_5_binaries_do_not_build

comment:11 Changed 4 years ago by vbraun

  • Commit set to d31d416c95b221ea0a6a9bd0830b64ae4873bb06
  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

Upstream at https://github.com/Singular/Sources/pull/811


New commits:

d31d416Patch Singular library name buffer to decent length

comment:12 Changed 4 years ago by vbraun

  • Status changed from new to needs_review

comment:13 Changed 4 years ago by vbraun

  • Description modified (diff)

comment:14 Changed 4 years ago by egourgoulhon

  • Status changed from needs_review to needs_work

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.

Changed 4 years ago by egourgoulhon

Log of failed singular build with long path on Ubuntu 16.04

comment:15 Changed 4 years ago by fbissey

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.

Changed 4 years ago by egourgoulhon

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

comment:16 Changed 4 years ago by fbissey

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

Changed 4 years ago by egourgoulhon

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

comment:17 follow-up: Changed 4 years ago by 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. 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).

comment:18 Changed 4 years ago by vbraun

  • Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

Patch is now merged in upstream

comment:19 Changed 4 years ago by vbraun

  • Status changed from needs_work to needs_review

comment:20 Changed 4 years ago by vbraun

  • Authors set to Volker Braun

comment:21 in reply to: ↑ 17 Changed 4 years ago by egourgoulhon

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.

Last edited 4 years ago by egourgoulhon (previous) (diff)

comment:22 Changed 4 years ago by egourgoulhon

  • Status changed from needs_review to positive_review

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?

comment:23 Changed 4 years ago by vbraun

  • Reviewers set to Eric Gourgoulhon

comment:24 Changed 4 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.