Summary: | sci-physics/root-5.26.00-r2 fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Savchenko <bircoph> |
Component: | Current packages | Assignee: | Gentoo Science Physics related packages <sci-physics> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 318469 | ||
Attachments: |
build.log.bz2
environment |
Description
Andrew Savchenko
![]() Created attachment 230625 [details]
build.log.bz2
Log is compressed because it's too large.
Created attachment 230627 [details]
environment
(In reply to comment #0) > CXXFLAGS="-march=athlon-xp -m32 --param l1-cache-line-size=64 --param > l1-cache-size=64 --param l2-cache-size=512 -O2 -funswitch-loops -fpredict > ive-commoning -fgcse-after-reload -fomit-frame-pointer -ftree-loop-linear > -floop-interchange -floop-strip-mine -mfpmath=sse -pipe" Does it still fail with simpler flags, such as CXXFLAGS="-O2 -march=native"? It compiles with original complex CFLAGS, but with -j1 and ccache disabled. Well, I blame my build system. So this bug may be considered as invalid. However, I doubt why ccache failed. It never does so. When I build 5.26.00-r4 I hit this bug again, but now it seems I found the reason for this problem. Formally this may be considered as a problem of my build system, but it reveals problems in the root build process itself. My build setup is the following: x86 native host + ccache + distcc helper on amd64; -march=athlon-xp option is explicitly specified on CFLAGS/CXXFLAGS/FFLAGS, because -march=native can't be used with distcc. Default march on x86 (when no -march option is specified) is i686. amd64 host was set up to build x86 binaries using native gcc with -m32 option forcefully added (this was done via helper scripts), thus no crosscompilation is requeired, but for this setup default -march is i386 (when -march is absent in the original distcc client CFLAGS). And here the problem lies: if *FLAGS options are passed to gcc for each compilation process, -march=athlon-xp is present and everything is fine, but if for some reason gcc/g++ is called without passing CFLAGS/CXXFLAGS to them, the problem occurs: __sync_fetch_and_add_4 builtin is not available on i386, thus link fails. Ideally *FLAGS should be passed everywhere for compiler, but for some small parts of the code they are not. Another side effect of this is that these usually small parts of the code are not optimized properly, because *FLAGS are not used on them. At this moment I fixed this by forcing -march=i686 "$@" on amd64 distcc helper and purging miscompiled files from ccache's cache, and problem is gone now. But ideally the bug should be fixed so, that *FLAGS are used everywhere during the build process. Of course, this is not only the root package problem, I hit it on some other packages as well (like chromium) before it was fixed in the way described above. (In reply to comment #5) > ideally the bug should be fixed so, that *FLAGS are used everywhere during the > build process. Several portion of the ROOT code specifically seem to specifically require no optimization, see https://savannah.cern.ch/bugs/?63599 as an example. A patch is welcome if you have one around though. |