[LLVMbugs] [Bug 8397] New: Issue of clang++ symlink at installation time using CMake

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 17 06:49:17 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8397

           Summary: Issue of clang++ symlink at installation time using
                    CMake
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: oroppas at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Creation of the symlink to clang fails when installing clang using package
manager such as pacman.

Here's what the pacman basically does:

cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ...
make
make DESTDIR=${pkgdir} install

where ${pkgdir} is the pacman's package install destination,
which is not /usr but rather /home/ryuta/devel/llvm/pkg/usr,
for example. pacman later strips out irrelevant path.

After cmake executed, build/tools/clang/tools/driver/cmake_install.cmake
looks like:

...

    IF(CMAKE_INSTALL_DO_STRIP)
      EXECUTE_PROCESS(COMMAND "/usr/bin/strip"
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/clang")
    ENDIF(CMAKE_INSTALL_DO_STRIP)
  ENDIF()
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL
"Unspecified")

IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL
"Unspecified")
  execute_process(COMMAND "/usr/bin/cmake" -E create_symlink "/usr/bin/clang"
"//usr/bin/clang++")
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL
"Unspecified")


Unlike clang where its install prefix is $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX},
clang++ prefix is hardwired as /usr and symlink doesn't take place.
I think more comprehensive symlink mechanism would be appreciated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list