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 to GCC 4.9.1 #17169

Closed
vbraun opened this issue Oct 17, 2014 · 111 comments
Closed

Upgrade to GCC 4.9.1 #17169

vbraun opened this issue Oct 17, 2014 · 111 comments

Comments

@vbraun
Copy link
Member

vbraun commented Oct 17, 2014

ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2

Upstream: Reported upstream. No feedback yet.

CC: @jpflori

Component: packages: standard

Keywords: yosemite

Author: Volker Braun

Branch: e16d2ae

Reviewer: R. Andrew Ohana, Jeroen Demeyer, François Bissey

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

@vbraun vbraun added this to the sage-6.4 milestone Oct 17, 2014
@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2014

Branch: u/vbraun/upgrade_to_gcc_4_8_3

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2014

comment:2
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/asan.o differs
gcc/c/c-decl.o differs
gcc/cfg.o differs
gcc/coverage.o differs
gcc/cp/class.o differs
gcc/cp/semantics.o differs
gcc/cp/tree.o differs
gcc/dse.o differs
gcc/java/jcf-io.o differs
gcc/objc/objc-act.o differs
gcc/tree-ssa-ccp.o differs
gcc/tree-ssa-coalesce.o differs
gcc/tree-ssa-pre.o differs
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[5]: *** [compare] Error 1
make[4]: *** [stage3-bubble] Error 2
make[3]: *** [all] Error 2

The files are indeed different, but after I strip them then they are identical. So its something wonky in the debug info...


New commits:

86b8ba0Update to gcc-4.8.3, add OSX 10.10 patch

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2014

Commit: 86b8ba0

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

comment:3

Fails just the same way on 10.9 so it is not the OS version at fault. The only thing I can think of is that the requirement for building gcc 4.8+ have been raised (that's not hypothetical, it is a fact) but I would be surprised if

  • the clang shipped was insufficient. That would be a well known problem
  • surely it would break before stage 3

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

comment:4

So I bootstrapped this with gcc 4.7.3 from sage 6.4.beta5 and it worked so
Replying to @kiwifb:

Fails just the same way on 10.9 so it is not the OS version at fault. The only thing I can think of is that the requirement for building gcc 4.8+ have been raised (that's not hypothetical, it is a fact) but I would be surprised if

  • the clang shipped was insufficient. That would be a well known problem

Apparently that's the case.

  • surely it would break before stage 3

What do I know?

@jdemeyer
Copy link

comment:5

What happens is that GCC builds stage 2 with debug symbols, stage 3 without debug symbols. Then GCC checks that the code is identical using some tools from binutils. This checks are indeed broken on some systems.

The line in spkg-install

# Disable bootstrap-debug, since it doesn't work on an OS X 10.4 PPC
# machine, nor on some Solaris machine. bootstrap-debug only does
# additional checks during the build, so it is safe not to use it.
MAKE="$MAKE BUILD_CONFIG="

is supposed to disable that, but apparently this disabling no longer works.

@jdemeyer
Copy link

comment:6

GCC 4.8 requires a C++ compiler, so this ticket needs changes to the installation guide, to build/install and to $SAGE_ROOT/configure.ac.

@ohanar
Copy link
Member

ohanar commented Oct 18, 2014

comment:7

Replying to @jdemeyer:

The line in spkg-install
...
is supposed to disable that, but apparently this disabling no longer works.

It seems that this line is the culprit in this case, somehow disabling bootstrap-debug (if this is still actually disabling it) is now breaking the build.

@vbraun
Copy link
Member Author

vbraun commented Oct 18, 2014

comment:8

Replying to @jdemeyer:

What happens is that GCC builds stage 2 with debug symbols, stage 3 without debug symbols.

The object files from stage 2 and 3 have the same size for me. That is, before stripping the size is the same, after stripping the size is the same, but stripping reduces the size. They compare identical after stripping. The difference is not in something that is human-readable (at least not to me ;-)

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

comment:9

Confirmed. I tried a few things but I completely missed that line. That takes my number 2 spot in the "configuration option that leads to a build of gcc to fail" [my number one spot can be summarised with "it fails in stage 1 when I change the installation prefix (yes I mean --prefix=...)"].

I am relieved that clang++ is enough to build gcc 4.8+.

@vbraun

This comment has been minimized.

@vbraun
Copy link
Member Author

vbraun commented Oct 18, 2014

comment:10

I can build gcc 4.9.1 so I suggest we go for that. I'm using it on my desktop daily (Fedora 21 alpha)

@vbraun vbraun changed the title Upgrade to GCC 4.8.3 Upgrade to GCC 4.9.1 Oct 18, 2014
@vbraun
Copy link
Member Author

vbraun commented Oct 18, 2014

Changed branch from u/vbraun/upgrade_to_gcc_4_8_3 to u/vbraun/upgrade_to_gcc_4_9_1

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

comment:12

Why not going to 4.9.x was one of the question I had when first seeing the ticket. For reference the bug for building on yosemite on gcc's bugzilla. The fix is merged in trunk along with a couple of other stuff that we probably don't care much about, but it will be in 4.9.2 and 5.0. I think this is ready for review.


New commits:

8eb5fe4Update to gcc 4.9.1

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

Changed commit from 86b8ba0 to 8eb5fe4

@vbraun
Copy link
Member Author

vbraun commented Oct 18, 2014

Changed keywords from none to yosemite

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Changed commit from 8eb5fe4 to bee1a24

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

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

0c000b4Update documentation that we need a C++ compiler
7672943Check for C++ compiler
bee1a24Look at C++ compiler to decide whether to install gcc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Changed commit from bee1a24 to 2fc95e7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

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

2fc95e7Evil workaround for broken OSX system header

@kiwifb
Copy link
Member

kiwifb commented Oct 18, 2014

comment:16

Replying to @sagetrac-git:

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

2fc95e7Evil workaround for broken OSX system header

I think you forgot a bit in that commit. A destination file.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Changed commit from 2fc95e7 to 38a826a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

38a826aEvil workaround for broken OSX system header

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f62f6c3Evil workaround for broken OSX system header

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 18, 2014

Changed commit from 38a826a to f62f6c3

@jpflori
Copy link

jpflori commented Oct 29, 2014

comment:77

To choose which languages to support sure, but I remember we also removed other things.
Don't have time for looking into that now.

I've put a stripped down tarball at:


New commits:

40528ebVarious fixes for GCC installation, remove deprecated sage_fortran script

@jpflori
Copy link

jpflori commented Oct 29, 2014

Changed commit from afa9541 to 40528eb

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:78

Presumably the checksum is different

@jpflori
Copy link

jpflori commented Oct 29, 2014

comment:79

Hopefully yes, and if it gets used, the spkg-src script should be put back.

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:80

IMHO this is not a "lets also beautify this script" ticket, right now Sage is broken on one of the main supported platforms. This ticket fixes it. If you want further changes feel free to open another ticket.

@jdemeyer
Copy link

comment:81

Replying to @vbraun:

IMHO this is not a "lets also beautify this script" ticket, right now Sage is broken on one of the main supported platforms. This ticket fixes it. If you want further changes feel free to open another ticket.

It's not about beautifying any script, just about the decision whether or not to use it.

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:82

If you want to do things different then go ahead. I just don't think that pushing a broken branch in hopes that somedbody else will fix it for you is a good way to making progress here.

@jdemeyer
Copy link

comment:83

I'm confused. Are you refering to the removal of sage_fortran? Technically, that should be a new ticket, but it's a totally trivial/obvious thing so I thought you wouldn't mind.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2014

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

e16d2aeDisable building of libitm

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 29, 2014

Changed commit from 40528eb to e16d2ae

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:85

No, I'm referring to JP changing the package-version.txt to 4.9.1.p0 without updating checksums or even naming the hand-crafted tarball correctly.

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:86

Oh no you committed that, Jeroen ;-)

@jpflori
Copy link

jpflori commented Oct 29, 2014

comment:87

I just put a stripped-down tarball on the web, using the name pattern we usually use for such stripped-down tarball, that is just including the upstream version number without any patch level...
The only exception is IIRC that we add ugly date to the version number when we actually add non upstream stuff within the tarball we distribute.
Didn't push anything to the git repo.
It's just in case you want a more lightweight Sage.

@kiwifb
Copy link
Member

kiwifb commented Oct 29, 2014

Changed reviewer from R. Andrew Ohana to R. Andrew Ohana, Jeroen Demeyer, François Bissey

@kiwifb
Copy link
Member

kiwifb commented Oct 29, 2014

comment:88

OK the compiler now compiles and seem to work so far for me. I haven't needed to import the other yosemite tickets yet and I am at maxima. Make that ntl now.

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:89

You don't need other tickets for compiling if you don't have SAGE_CHECK=yes.

Jeroen: whats with 4.9.1.p0 now, you want to upload a modified tarball and add the checksum or should I revert that?

@jdemeyer
Copy link

comment:90

Replying to @vbraun:

you want to upload a modified tarball and add the checksum or should I revert that?

For me it's fine as it is... in any case with the new configure options the difference between the vanilla tarball and the stripped down tarball is not very significant. It's essentially a choice between ease-of-maintaining and download size.

@jdemeyer
Copy link

comment:91

I added .p0 just because it's a patched version, not completely vanilla.

@kiwifb
Copy link
Member

kiwifb commented Oct 29, 2014

comment:92

And now I am at the conway_polynomial segfault which I think started everything.

@vbraun
Copy link
Member Author

vbraun commented Oct 29, 2014

comment:93

Oh, that is because you didn't apply #17204. Forgot about that one since I merged it a while ago.

@kiwifb
Copy link
Member

kiwifb commented Oct 30, 2014

comment:94

Replying to @vbraun:

Oh, that is because you didn't apply #17204. Forgot about that one since I merged it a while ago.

Indeed. All compiled now.

@vbraun
Copy link
Member Author

vbraun commented Oct 30, 2014

Changed branch from u/jdemeyer/ticket/17169 to e16d2ae

@vbraun
Copy link
Member Author

vbraun commented Oct 30, 2014

Changed commit from e16d2ae to none

@vbraun
Copy link
Member Author

vbraun commented Oct 30, 2014

comment:96

Aaaand 4.9.2 was just released ;-)

@vbraun
Copy link
Member Author

vbraun commented Oct 30, 2014

comment:97

Next is #17262

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