Created attachment 562870 [details] build.log Compile error dev-lang/rust on ~amd64. Previous version: https://bugs.gentoo.org/674664
Created attachment 562872 [details] emerge --info
Comment on attachment 562870 [details] build.log "To learn more, run the command again with --verbose." Why isn't that enabled by default?
(In reply to Jeroen Roovers from comment #2) > Comment on attachment 562870 [details] > build.log > > "To learn more, run the command again with --verbose." > > Why isn't that enabled by default? Actually I haven't relevant changes in options for this case.
Created attachment 562874 [details] build.log --verbose
New build.log with added "--verbose": src_compile() { env $(cat "${S}"/config.env)\ "${EPYTHON}" ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) \ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 }
I can confirm this w/ llvm 7.0.1 and gcc 8.2.0 (on ~amd64). Besides that, building with -system-llvm requires cblas to be installed (which is missing as a dependency from the rust ebuild) otherwise the vendored llvm will error out during the configure phase w/ cmake.
One more data point: Compiling rust w/ clang 7.0.1 and system-llvm works just fine on my system whereas using gcc (8.2.0) fails with the stated error.
(In reply to Matthias Dahl from comment #7) > One more data point: Compiling rust w/ clang 7.0.1 and system-llvm works > just fine on my system whereas using gcc (8.2.0) fails with the stated error. I confirm.
With sys-devel/gcc-7.4.0 : CMake Error at cmake/modules/AddLLVM.cmake:459 (add_library): Cannot find source file: /usr/include/cblas.h After emerging virtual/cblas : -> [ebuild N ] app-eselect/eselect-cblas-0.1 [ebuild N ] sci-libs/gsl-1.16 USE="-cblas-external -static-libs" [ebuild N ~] virtual/cblas-3.7 emerge of [ebuild U ~] dev-lang/rust-1.32.0 [1.30.1-r1] [ebuild U ~] virtual/rust-1.32.0 [1.30.1] [ebuild U ~] virtual/cargo-1.32.0 [1.30.1] succeeds right away. (In reply to Matthias Dahl from comment #6) > ... (which is missing as a dependency from the rust ebuild) ... +1
guys, cblas is not needed. it's just a bug in cmake files. if you have to install cblas to build rust it means you have a stale header in system dirs. since cblas headers are symlinks it means at some point you had cblas installed and removed it, but symlinks are left on the filesystem. rust's build system finds it and tries to link, but there are no files, just a broken symlink. find cblas.h and remove it if you don't have cblas installed and rust's llvm fails to build
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bd888b197bae54fa4b5d6033768f2438180b314 commit 9bd888b197bae54fa4b5d6033768f2438180b314 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-02-01 04:07:49 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-02-01 04:36:41 +0000 dev-lang/rust: re-add cblas patch Since some systems have stale cblas.h symlink rust's bundled llvm finds cblas.h and tries to link unconditionally. Fix it. This reverts commit 0e00cd7cc089acdd3114b4aafc34fc921aabe058. Closes: https://bugs.gentoo.org/676278 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../1.32.0-fix-configure-of-bundled-llvm.patch | 32 ++++++++++++++++++++++ dev-lang/rust/rust-1.32.0.ebuild | 1 + 2 files changed, 33 insertions(+)
pushed a fix, please let me know if it still fails for some reason.
*** Bug 676882 has been marked as a duplicate of this bug. ***
(In reply to Georgy Yakovlev from comment #10) > ... but symlinks are left Confirmed. Re-Produce: - emerge -1 virtual/cblas - emerge --depclean --> leaving behind: # find . -name *cblas* | grep -v portage ./include/cblas.h ./lib64/libcblas.a ./lib64/pkgconfig/cblas.pc ./lib64/libcblas.so ./lib64/libcblas.so.0 which belong to sci-libs/gsl-1.16 Bug 677044 - sci-libs/gsl-1.16 : uninstalling, orphaned links are left behind, causing breakage
I checked my system and I had virtual/cblas installed already. So there should have not been any 'stale' headers. elias@eliasgentoo ~ $ eix cblas [I] app-eselect/eselect-cblas Available versions: 0.1 Installed versions: 0.1(02:32:25 AM 12/02/2017) Homepage: https://www.gentoo.org/proj/en/eselect/ Description: C-language BLAS module for eselect * sci-libs/cblas-reference Available versions: 20030223-r6 ~20151113-r2 ~20161223 Homepage: http://www.netlib.org/cblas/ Description: C wrapper interface to the F77 reference BLAS implementation [I] virtual/cblas Available versions: 1.0 ~3.6 ~3.7 Installed versions: 1.0(08:47:20 AM 02/01/2019) Description: Virtual for BLAS C implementation elias@eliasgentoo ~ $ equery depends cblas * These packages depend on cblas: dev-python/numpy-1.14.5 (lapack ? virtual/cblas) sci-libs/gsl-1.16 (cblas-external ? virtual/cblas) I am not sure deleting the header is the right solution.
Disregard the comment above. The new patch fixes the issue and build is successful.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dad9246cf2dd4fc349139ceb963efe11bce75e63 commit dad9246cf2dd4fc349139ceb963efe11bce75e63 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-04-12 05:00:42 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-04-12 05:08:02 +0000 dev-lang/rust: fix cblas headers again, don't build RISCV Bug: https://bugs.gentoo.org/676278 Bug: https://bugs.gentoo.org/678186 Bug: https://bugs.gentoo.org/683128 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> ...Add-additional-headers-only-if-they-exist.patch | 41 ++++++++++++++++++++++ .../{rust-1.34.0.ebuild => rust-1.34.0-r1.ebuild} | 3 ++ 2 files changed, 44 insertions(+)