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

Build fails on Ubuntu with Nonrepresentable section on output #31555

Closed
josefsachs opened this issue Mar 30, 2019 · 8 comments
Closed

Build fails on Ubuntu with Nonrepresentable section on output #31555

josefsachs opened this issue Mar 30, 2019 · 8 comments
Labels
domain:building Build system, or building Julia or its dependencies

Comments

@josefsachs
Copy link

josefsachs commented Mar 30, 2019

With a fresh clone of master. End of make output follows.

/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (6837)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (4256)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (5638)
/usr/bin/ld: /home/sachs/src/julia-master/usr/lib/libuv.a(libuv_la-uv-common.o)(.debug_info+0x10d7): reloc against `.debug_str': error 2
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [/home/sachs/src/julia-master/src/flisp/flisp] Error 1
make[1]: *** [flisp/libflisp.a] Error 2
make: *** [julia_flisp.boot.inc.phony] Error 2
@vchuravy
Copy link
Sponsor Member

vchuravy commented Mar 30, 2019

Also recently seen on https://travis-ci.org/JuliaLang/julia/jobs/513419893

cc: @staticfloat since this might be due to #31441

@KristofferC KristofferC added the domain:building Build system, or building Julia or its dependencies label Mar 30, 2019
@staticfloat
Copy link
Sponsor Member

@josefsachs what kind of system are you running on (OS, architecture, etc...)? What version of binutils (ld --version)? What is the linker invocation that caused that error?

@josefsachs
Copy link
Author

$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ uname -a
Linux sojaks.com 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty

@staticfloat
Copy link
Sponsor Member

staticfloat commented Mar 31, 2019

This appears to be a bug in old ld (version 2.24). You have two options:

  • Install the binutils-2.26 package on Ubuntu 14.04, which will provide ld-2.26, then just copy ld-2.26 over your /usr/bin/ld executable. (Note I recommend backing that original linker up before doing this). I have verified that this does indeed work, and compiles all the way through.

  • Don't use BinaryBuilder LibUV, which seems to be the trouble child here triggering the ld bug. You can do this by setting the USE_BINARYBUILDER_LIBUV=0 make flag when compiling.

In case anyone is interested in reproducing, here's a Dockerfile showing the issue:

FROM ubuntu:14.04

RUN apt update && apt install -y build-essential m4 curl git tmux gfortran cmake ccache python
WORKDIR /julia
RUN git clone https://github.com/JuliaLang/julia .

# Build this `Dockerfile`, then run `make` and watch it crash and burn while trying to link `flisp`.

@vchuravy
Copy link
Sponsor Member

Can we make check the Ubuntu/ld version in the makefile and disable Libuv for that? I suspect there are still plenty of Supercomputer around that are not up to date in that regard

@josefsachs
Copy link
Author

Works okay after upgrading to binutils-2.26. Thanks.

owainkenwayucl added a commit to UCL-RITS/rcps-buildscripts that referenced this issue Nov 18, 2019
See: JuliaLang/julia#31555

We get this on RHEL 7.x

```
...
    LINK src/flisp/libflisp.a
    CC src/flisp/flmain.o
    LINK src/flisp/flisp
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (4444)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (4531)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (4402)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (4737)
/usr/bin/ld: libuv_la-uv-common.o: access beyond end of merged section (3913)
...
```
owainkenwayucl added a commit to UCL-RITS/rcps-buildscripts that referenced this issue Nov 18, 2019
@owainkenwayucl
Copy link

owainkenwayucl commented Nov 18, 2019

So I've stumbled across this on RHEL 7.x and there is an issue that USE_BINARYBUILDER_LIBUV=0 doesn't work in Make.user as it seems to be ignored.

Appending it to Make.inc seems to solve the problem.

owainkenwayucl added a commit to UCL-RITS/rcps-buildscripts that referenced this issue Nov 18, 2019
JuliaLang/julia#31555

Putting USE_BINARYBUILDER_LIBUV=0 in Make.user doesn't work.

Appending USE_BINARYBUILDER_LIBUV := 0 to Make.inc works.
@owainkenwayucl
Copy link

I should add that all USE_BINARYBUILDER settings in Make.user are ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

6 participants