pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgsrc lang/llvm 16.x vs. cmake vs. $ORIGIN
>>> I'm beginning to wonder if I'm the only one seeng this issue?
>>
>> I wonder how is NetBSD/macppc 9.0 different from NetBSD/amd64
>> 9.0? And (both architectures) 9.3?
>>
>> I didn't the problem under amd64 9.3 nor 10.99.
>
> I've updated all the binary packages to 2023Q3 level, which got
> me a little bit older cmake (3.27.6), and I'm currently
> retrying the build.
>
> One question, though: what's supposed to take care of setting
> CMAKE_SKIP_RPATH? (Again, my lack of understanding of the
> dependency tracking of cmake and resulting confusion comes into
> play.) I'm not seeing it in llvm/Makefile, and only find it in
> oldish build logs for LLVM version 10.0.1nb1 on this build host.
The answer to "who's supposed to set ..." appears to be "Nothing
sets CMAKE_SKIP_RPATH (anymore?)". If I add
CMAKE_ARGS+= -DCMAKE_SKIP_RPATH=TRUE
to lang/llvm/Makefile, I get an llvm 16 which installs. (I've
not yet verified that it actually works, that's next...)
Looking around a bit ("cvs diff") reveals that I've had skirmishes
with this package before on this host, probably with earlier
versions. The complete diff I currently have relative to pkgsrc
follows attached below.
Regards,
- Håvard
? patches/patch-cmake_modules_CMakeLists.txt
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/llvm/Makefile,v
retrieving revision 1.94
diff -u -r1.94 Makefile
--- Makefile 23 Nov 2023 11:01:46 -0000 1.94
+++ Makefile 14 Feb 2024 08:58:12 -0000
@@ -52,6 +52,12 @@
CMAKE_ARGS+= -DLLVM_INSTALL_UTILS=ON
CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON
CMAKE_ARGS+= -DLLVM_ENABLE_RTTI=ON
+CMAKE_ARGS+= -DCMAKE_SKIP_RPATH=TRUE
+
+# Let's see how cmake is invoked
+#PKG_DEBUG_LEVEL=1
+# ...and more verbosity...
+#MAKE_ENV+= VERBOSE=1
CMAKE_ARGS.Darwin+= -DCMAKE_LIBTOOL=/usr/bin/libtool
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/llvm/distinfo,v
retrieving revision 1.42
diff -u -r1.42 distinfo
--- distinfo 6 Oct 2023 19:15:20 -0000 1.42
+++ distinfo 14 Feb 2024 08:58:12 -0000
@@ -8,7 +8,8 @@
Size (llvm-16.0.6.src.tar.xz) = 56149540 bytes
SHA1 (patch-CMakeLists.txt) = c53cef61bdaeaf5216b78330992357a632a2b0b2
SHA1 (patch-cmake_config-ix.cmake) = f5cd0c949d35020d1051f95417e7944aa71a3d54
-SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4e6668e0c3e13423ce3e19304f4ad60f66d41562
+SHA1 (patch-cmake_modules_AddLLVM.cmake) = c4c4f3a664c4deb4a407abd8d0729305f5465998
+SHA1 (patch-cmake_modules_CMakeLists.txt) = 54b550726250ba1ae2b9959857a161360177bc83
SHA1 (patch-include_llvm-c_DataTypes.h) = ff547cae5bdf90c5a1371b9eb196e7537a03b18d
SHA1 (patch-include_llvm_Analysis_ConstantFolding.h) = 0a8db4d876b749dd492fced6fbc8c4faf3ff2450
SHA1 (patch-lib_Support_BLAKE3-blake3__impl.h) = 29624dc764c747b247dbde19e9d186a853b59134
Index: patches/patch-cmake_modules_AddLLVM.cmake
===================================================================
RCS file: /cvsroot/pkgsrc/lang/llvm/patches/patch-cmake_modules_AddLLVM.cmake,v
retrieving revision 1.9
diff -u -r1.9 patch-cmake_modules_AddLLVM.cmake
--- patches/patch-cmake_modules_AddLLVM.cmake 14 Nov 2022 18:44:05 -0000 1.9
+++ patches/patch-cmake_modules_AddLLVM.cmake 14 Feb 2024 08:58:12 -0000
@@ -2,10 +2,11 @@
On Darwin, create symbolic links to shared libraries.
On Darwin, use correct install-name for shared libraries.
+If instructed to skip setting RPATH, do skip.
--- cmake/modules/AddLLVM.cmake.orig 2022-09-20 06:05:50.000000000 +0000
+++ cmake/modules/AddLLVM.cmake
-@@ -627,7 +627,7 @@ function(llvm_add_library name)
+@@ -657,7 +657,7 @@ function(llvm_add_library name)
endif()
if(ARG_SHARED)
@@ -14,7 +15,19 @@
get_target_property(output_name ${name} OUTPUT_NAME)
if(${output_name} STREQUAL "output_name-NOTFOUND")
set(output_name ${name})
-@@ -2270,7 +2270,7 @@ function(llvm_setup_rpath name)
+@@ -2300,6 +2300,11 @@ function(llvm_codesign name)
+ endfunction()
+
+ function(llvm_setup_rpath name)
++ # Should we bother at all?
++ if(CMAKE_SKIP_RPATH)
++ return()
++ endif()
++
+ if(CMAKE_INSTALL_RPATH)
+ return()
+ endif()
+@@ -2311,7 +2316,7 @@ function(llvm_setup_rpath name)
endif()
if (APPLE)
granny-smith: {41} cat patches/patch-cmake_modules_CMakeLists.txt
$NetBSD$
--- cmake/modules/CMakeLists.txt.orig 2021-09-24 16:18:10.000000000 +0000
+++ cmake/modules/CMakeLists.txt
@@ -1,5 +1,10 @@
include(ExtendPath)
include(LLVMDistributionSupport)
+
+# Attempt at fixing missing setting of CMAKE_THREAD_LIBS_INIT
+# referenced from LLVMConfig.cmake, causing missing pthread library...
+include(FindThreads)
+
include(FindPrefixFromConfig)
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
Home |
Main Index |
Thread Index |
Old Index