Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662108 - llvm-core/clang doesn't install i586-pc-linux-gnu-clang{,++} when CHOST=i586-pc-linux-gnu
Summary: llvm-core/clang doesn't install i586-pc-linux-gnu-clang{,++} when CHOST=i586-...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-25 14:05 UTC by Calvin Walton
Modified: 2024-12-11 13:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,4.87 KB, text/plain)
2018-07-25 14:05 UTC, Calvin Walton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Calvin Walton 2018-07-25 14:05:35 UTC
Created attachment 541006 [details]
emerge --info

This causes build failures in the runtime libraries, like the following in sys-libs/compiler-rt:
                                      
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: i586-pc-linux-gnu-clang
CMake Error at CMakeLists.txt:10 (project):
  The CMAKE_C_COMPILER:

    i586-pc-linux-gnu-clang
                                                                                                                                                                         
  is not a full path and was not found in the PATH.                                                                                                                      

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

I've worked around the issue for now by manually creating the needed symlinks.
Comment 1 Sam 2019-03-12 20:14:17 UTC
Bumped into the same issue emerging compiler-rt:

loading initial cache file compiler-rt-6.0.1/work/compiler-rt-6.0.1_build/gentoo_common_config.cmake
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: x86_64-gentoo-linux-gnu-clang
CMake Error at CMakeLists.txt:10 (project):
  The CMAKE_C_COMPILER:

    x86_64-gentoo-linux-gnu-clang

  is not a full path and was not found in the PATH.


I noticed that the file work/compiler-rt-6.0.1_build/gentoo_toolchain.cmake contained my custom CHOST (I know.. because of reasons) in it, while clang installed symlinks with a generic/profile CHOST.
Comment 2 Sam 2019-03-12 20:16:24 UTC
This may be related to bugs #616566 and #651908 and seems caused by clang ebuild not taking custom CHOST into account when installing symlinks.
Comment 3 subzero_ro 2021-12-05 06:53:53 UTC
> 
> I've worked around the issue for now by manually creating the needed
> symlinks.

Can you please post some instructions on how to create those symlinks? I even got three errors:

CMAKE_C_COMPILER: i486-pc-linux-gnu-clang
CMAKE_CXX_COMPILER: i486-pc-linux-gnu-clang++
CMAKE_ASM_COMPILER: i486-pc-linux-gnu-clang
Comment 4 Calvin Walton 2021-12-07 16:52:28 UTC
You can see the existing symlinks by e.g.
cd /usr/lib/llvm/13/bin
ls -l i686-pc-linux-gnu-*

You can make the symlinks manually, but here's a little one-liner script you could use (run in the same directory):

for tool in clang clang++ clang-cl clang-cpp; do ln -s "${tool}-13" "i486-pc-linux-gnu-${tool}-13"; ln -s "i486-pc-linux-gnu-${tool}-13" "i486-pc-linux-gnu-${tool}"; done