Created attachment 558992 [details] emerge --info Similar to https://bugs.gentoo.org/show_bug.cgi?id=649994 but for the current stable version.
Created attachment 558996 [details] build.log.bz2
The same error with 7.0.1, and one more error there: FAIL: LLVM-Unit :: Support/./SupportTests/FileSystemTest.RealPath (2387 of 27005) ******************** TEST 'LLVM-Unit :: Support/./SupportTests/FileSystemTest.RealPath' FAILED ******************** Note: Google Test filter = FileSystemTest.RealPath [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from FileSystemTest [ RUN ] FileSystemTest.RealPath /mnt/ssdhome/portage-tmp/portage/sys-devel/llvm-7.0.1/work/llvm-7.0.1.src/unittests/Support/Path.cpp:550: Failure fs::real_path(HomeDir, Expected): did not return errc::success. error number: 2 error message: No such file or directory /mnt/ssdhome/portage-tmp/portage/sys-devel/llvm-7.0.1/work/llvm-7.0.1.src/unittests/Support/Path.cpp:469: Failure fs::remove(TestDirectory.str()): did not return errc::success. error number: 39 error message: Directory not empty [ FAILED ] FileSystemTest.RealPath (5 ms) [----------] 1 test from FileSystemTest (5 ms total) ... FAIL: LLVM-Unit :: Support/./SupportTests/JSONTest.Integers (2433 of 27005) ******************** TEST 'LLVM-Unit :: Support/./SupportTests/JSONTest.Integers' FAILED ******************** Note: Google Test filter = JSONTest.Integers [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from JSONTest [ RUN ] JSONTest.Integers /mnt/ssdhome/portage-tmp/portage/sys-devel/llvm-7.0.1/work/llvm-7.0.1.src/unittests/Support/JSONTest.cpp:320: Failure Expected: T.Val Which is: 4611686018427387905 To be equal to: *Doc Which is: 4611686018427387905 Integer, not exact double. Stored as int64, convertible. /mnt/ssdhome/portage-tmp/portage/sys-devel/llvm-7.0.1/work/llvm-7.0.1.src/unittests/Support/JSONTest.cpp:320: Failure Expected: T.Val Which is: -4611686018427387905 To be equal to: *Doc Which is: -4611686018427387905 Negative integer, not exact double. Stored as int64, convertible. [ FAILED ] JSONTest.Integers (1 ms) [----------] 1 test from JSONTest (1 ms total)
Created attachment 559018 [details] 7.0.1 build.log.bz2
What's the filesystem type used for $PORTAGE_TMPDIR?
tmpfs $ cat /etc/fstab|grep portage none /mnt/portagetmp tmpfs size=16G,noatime 0 0
Oops, no, sorry. It's ext4. $ cat /etc/portage/env/notmpfs.conf PORTAGE_TMPDIR="/mnt/ssdhome/portage-tmp" $ cat /etc/portage/package.env/x | grep llvm sys-devel/llvm notmpfs.conf
Ok, my guess for the first error is that home directory of 'portage' user does not exist. Could you verify whether that is the case? The JSON test is going to be harder to debug. If you have some spare computing power, you may try upgrading to gcc-7.4.0 and retrying.
(In reply to Michał Górny from comment #7) > Ok, my guess for the first error is that home directory of 'portage' user > does not exist. Could you verify whether that is the case? > Hmm but it should respect the ${HOME} override, so I don't think it could actually not exist. Do you have a build-dir present still? I think it might be useful to run the test executables manually and see if the first one fails as different users, and possibly with $HOME set to different values. You may also try looking into it via gdb, if you feel like trying.
Ok, so it seems that non-existing homedir is the problem indeed. It seems that for some reason the test spawned by llvm-lit doesn't get ${HOME} from environment; if I call the test executable directly with HOME set, it works fine.
/var/tmp/portage which is $HOME for 'portage' user does not exist indeed. > Do you have a build-dir present still? No, but I was just rebuilding it to test it, when I saw your last post. I guess that's not necessary anymore, but I'll let it finish for now... > you may try upgrading to gcc-7.4.0 I can try later. When gcc-7.4.0 is going to stabilize?
https://reviews.llvm.org/D56162 is for the path test failure. (In reply to Alexey from comment #10) > > you may try upgrading to gcc-7.4.0 > > I can try later. When gcc-7.4.0 is going to stabilize? I'm sorry but i don't know that. However, I'm going to try to reproduce the other issue anyway.
Thanks for the fix!
Sadly, I have no idea how to reproduce that JSON error. Could you maybe try lowering -march=, e.g. to -march=x86-64?
Changing -march=bdver2 to -march=x86-64 didn't have any effect wrt JSON. But compiling llvm-7.0.1 with clang-6.0.1 fixes the JSON issue, even with -march=bdver2.
@dev-portage, do you think Portage should complain when pw_home does not exist?
I've been able to reproduce the JSON issue with gcc 7.3.0 and 7.4.0 (but not 6.4.0). Apparently it occurs only with -O2, so it looks like new gcc optimization breaking something.
(In reply to Michał Górny from comment #15) > @dev-portage, do you think Portage should complain when pw_home does not > exist? Yes, filed as bug 674212.
Mass-closing bugs reported for removed LLVM versions. Feel free to reopen if the issue still applies and there is no newer report for it.