* [bug#56452] [PATCH 2/5] gnu: llvm-3.7, llvm-3.8: Fix build with gcc.
2022-07-08 15:58 ` [bug#56452] [PATCH 1/5] gnu: llvm-8: Fix build with gcc-10 Greg Hogan
@ 2022-07-08 15:58 ` Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 3/5] gnu: faust-2: Update to 2.41.1 Greg Hogan
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Greg Hogan @ 2022-07-08 15:58 UTC (permalink / raw)
To: 56452; +Cc: Greg Hogan
* gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch,
gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch: New files.
* gnu/packages/llvm.scm (clang-runtime-3.7, llvm-3.7, llvm-3.8): Use patches.
* gnu/local.mk: Register patches.
---
gnu/local.mk | 2 ++
gnu/packages/llvm.scm | 9 ++++++---
...lang-runtime-3.7-fix-build-with-python3.patch | 16 ++++++++++++++++
.../patches/llvm-3.x.1-fix-build-with-gcc.patch | 15 +++++++++++++++
4 files changed, 39 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch
create mode 100644 gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 0a5de26266..d646a19f0d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -955,6 +955,7 @@ dist_patch_DATA = \
%D%/packages/patches/clang-runtime-esan-build-fixes.patch \
%D%/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch \
%D%/packages/patches/clang-runtime-3.5-libsanitizer-mode-field.patch \
+ %D%/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch \
%D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \
%D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \
%D%/packages/patches/classpath-aarch64-support.patch \
@@ -1452,6 +1453,7 @@ dist_patch_DATA = \
%D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch \
%D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \
%D%/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch \
+ %D%/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch \
%D%/packages/patches/llvm-8-fix-build-with-gcc-10.patch \
%D%/packages/patches/llvm-9-fix-bitcast-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index f8320c4112..6b216ee78c 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1036,7 +1036,8 @@ (define-public llvm-3.8
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))))))
+ "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))
+ (patches (search-patches "llvm-3.x.1-fix-build-with-gcc.patch"))))))
(define-public clang-runtime-3.8
(clang-runtime-from-llvm
@@ -1060,7 +1061,8 @@ (define-public llvm-3.7
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))))))
+ "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))
+ (patches (search-patches "llvm-3.x.1-fix-build-with-gcc.patch"))))))
(define-public clang-runtime-3.7
(clang-runtime-from-llvm
@@ -1068,7 +1070,8 @@ (define-public clang-runtime-3.7
"10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx"
'("clang-runtime-asan-build-fixes.patch"
"clang-runtime-3.8-libsanitizer-mode-field.patch"
- "clang-3.5-libsanitizer-ustat-fix.patch")))
+ "clang-3.5-libsanitizer-ustat-fix.patch"
+ "clang-runtime-3.7-fix-build-with-python3.patch")))
(define-public clang-3.7
(clang-from-llvm llvm-3.7 clang-runtime-3.7
diff --git a/gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch b/gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch
new file mode 100644
index 0000000000..042f0e025a
--- /dev/null
+++ b/gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch
@@ -0,0 +1,16 @@
+Patch based on changes from
+https://github.com/llvm/llvm-project/commit/c1fde4fa943fd03a3d40bc5d32b9e0045fd29208
+
+diff --git a/lib/sanitizer_common/scripts/gen_dynamic_list.py b/lib/sanitizer_common/scripts/gen_dynamic_list.py
+index 5ea2ca1..d7bc287 100755
+--- a/lib/sanitizer_common/scripts/gen_dynamic_list.py
++++ b/lib/sanitizer_common/scripts/gen_dynamic_list.py
+@@ -100,7 +100,7 @@ def main(argv):
+ print('global:')
+ result.sort()
+ for f in result:
+- print(' ' + f.encode('utf-8') + ';')
++ print(u' %s;' % f)
+ if args.version_list:
+ print('local:')
+ print(' *;')
diff --git a/gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch b/gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch
new file mode 100644
index 0000000000..75236c4069
--- /dev/null
+++ b/gnu/packages/patches/llvm-3.x.1-fix-build-with-gcc.patch
@@ -0,0 +1,15 @@
+Patch from https://github.com/digego/extempore/issues/318
+
+diff --git a/include/llvm/IR/ValueMap.h.orig b/include/llvm/IR/ValueMap.h
+index ad518ac..d928f6a 100644
+--- a/include/llvm/IR/ValueMap.h
++++ b/include/llvm/IR/ValueMap.h
+@@ -99,7 +99,7 @@
+ explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
+ : Map(NumInitBuckets), Data(Data) {}
+
+- bool hasMD() const { return MDMap; }
++ bool hasMD() const { return static_cast<bool>(MDMap); }
+ MDMapT &MD() {
+ if (!MDMap)
+ MDMap.reset(new MDMapT);
--
2.36.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#56452] [PATCH 3/5] gnu: faust-2: Update to 2.41.1.
2022-07-08 15:58 ` [bug#56452] [PATCH 1/5] gnu: llvm-8: Fix build with gcc-10 Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 2/5] gnu: llvm-3.7, llvm-3.8: Fix build with gcc Greg Hogan
@ 2022-07-08 15:58 ` Greg Hogan
2022-07-11 22:06 ` [bug#56452] [PATCH 0/5] Fix and update LLVM and clang-toolchain Ludovic Courtès
2022-07-08 15:58 ` [bug#56452] [PATCH 4/5] gnu: LLVM, Clang, LLD: Update to 14.0.6 Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 5/5] gnu: clang-toolchain-14: Build with libomp-14 Greg Hogan
3 siblings, 1 reply; 11+ messages in thread
From: Greg Hogan @ 2022-07-08 15:58 UTC (permalink / raw)
To: 56452; +Cc: Greg Hogan
* gnu/packages/audio.scm (faust-2): Update to 2.41.1.
[build-system]: Replace gnu-build-system with cmake-build-system.
[native-inputs]: Replace llvm-3.8 with llvm.
---
gnu/packages/audio.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 0922c74788..646f4af7a3 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1952,7 +1952,7 @@ (define-public faust-0.9.67
(define-public faust-2
(package
(inherit faust)
- (version "2.5.23")
+ (version "2.41.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/grame-cncm/faust/"
@@ -1960,15 +1960,15 @@ (define-public faust-2
"/faust-" version ".tar.gz"))
(sha256
(base32
- "1yz5jnr76hh7rmxkpdi7gyrw1wp4gyqfpq8zyl97qdi5ga5gjznq"))))
- (build-system gnu-build-system)
+ "0gk8ifxrbykq7ay0nvjns8fjryhp0wfhv5npgrl8xpgw9wfmw53j"))))
+ (build-system cmake-build-system)
(arguments
(substitute-keyword-arguments (package-arguments faust)
((#:make-flags flags)
`(list (string-append "prefix=" (assoc-ref %outputs "out"))
"world"))))
(native-inputs
- `(("llvm" ,llvm-3.8)
+ `(("llvm" ,llvm)
("which" ,which)
("xxd" ,xxd)
("ctags" ,emacs-minimal) ; for ctags
--
2.36.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#56452] [PATCH 0/5] Fix and update LLVM and clang-toolchain.
2022-07-08 15:58 ` [bug#56452] [PATCH 3/5] gnu: faust-2: Update to 2.41.1 Greg Hogan
@ 2022-07-11 22:06 ` Ludovic Courtès
2022-07-12 20:06 ` Greg Hogan
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2022-07-11 22:06 UTC (permalink / raw)
To: Greg Hogan; +Cc: 56452
Hi,
Greg Hogan <code@greghogan.com> skribis:
> * gnu/packages/audio.scm (faust-2): Update to 2.41.1.
> [build-system]: Replace gnu-build-system with cmake-build-system.
> [native-inputs]: Replace llvm-3.8 with llvm.
It fails to build for me, like so:
--8<---------------cut here---------------start------------->8---
Consolidate compiler generated dependencies of target faustmachinestatic
make[4]: Leaving directory '/tmp/guix-build-faust-2.41.1.drv-0/faust-2.41.1/build/faustdir'
[100%] Built target faustmachinestatic
make[3]: Leaving directory '/tmp/guix-build-faust-2.41.1.drv-0/faust-2.41.1/build/faustdir'
Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:60 (file):
file cannot create directory: /usr/local/bin. Maybe need administrative
privileges.
make[2]: *** [Makefile:103: install] Error 1
make[2]: Leaving directory '/tmp/guix-build-faust-2.41.1.drv-0/faust-2.41.1/build/faustdir'
make[1]: *** [Makefile:333: install] Error 2
make[1]: Leaving directory '/tmp/guix-build-faust-2.41.1.drv-0/faust-2.41.1/build'
make: *** [Makefile:200: install] Error 2
error: in phase 'install': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("install" "prefix=/gnu/store/bxzj1inf7y4d4y7gxdmzk24zi1xgwifv-faust-2.41.1" "world") exit-status: 2 term-signal: #f stop-signal: #f>
phase `install' failed after 4.8 seconds
command "make" "install" "prefix=/gnu/store/bxzj1inf7y4d4y7gxdmzk24zi1xgwifv-faust-2.41.1" "world" failed with status 2
--8<---------------cut here---------------end--------------->8---
Could you take a look?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#56452] [PATCH 0/5] Fix and update LLVM and clang-toolchain.
2022-07-11 22:06 ` [bug#56452] [PATCH 0/5] Fix and update LLVM and clang-toolchain Ludovic Courtès
@ 2022-07-12 20:06 ` Greg Hogan
0 siblings, 0 replies; 11+ messages in thread
From: Greg Hogan @ 2022-07-12 20:06 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Ricardo Wurmus, 56452
On Mon, Jul 11, 2022 at 6:06 PM Ludovic Courtès <ludo@gnu.org> wrote:
>
> Hi,
>
> Greg Hogan <code@greghogan.com> skribis:
>
> > * gnu/packages/audio.scm (faust-2): Update to 2.41.1.
> > [build-system]: Replace gnu-build-system with cmake-build-system.
> > [native-inputs]: Replace llvm-3.8 with llvm.
>
> It fails to build for me, [...]
>
> Could you take a look?
>
> Thanks,
> Ludo’.
Ludo',
Thanks for the review! I failed to register that by switching the
dependency from llvm-3.8 to llvm, the faust-2 build would no longer be
initiated when building all dependencies of llvm-3.8.
I have a patch to follow-up with git send-email. I have cc'd Ricardo
since he looks to be both a user and maintainer of the faust packages.
Greg
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#56452] [PATCH 4/5] gnu: LLVM, Clang, LLD: Update to 14.0.6.
2022-07-08 15:58 ` [bug#56452] [PATCH 1/5] gnu: llvm-8: Fix build with gcc-10 Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 2/5] gnu: llvm-3.7, llvm-3.8: Fix build with gcc Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 3/5] gnu: faust-2: Update to 2.41.1 Greg Hogan
@ 2022-07-08 15:58 ` Greg Hogan
2022-07-08 15:58 ` [bug#56452] [PATCH 5/5] gnu: clang-toolchain-14: Build with libomp-14 Greg Hogan
3 siblings, 0 replies; 11+ messages in thread
From: Greg Hogan @ 2022-07-08 15:58 UTC (permalink / raw)
To: 56452; +Cc: Greg Hogan
* gnu/packages/llvm.scm (llvm-14, clang-14, lld-14): Update to 14.0.6.
(%llvm-monorepo-hashes, %llvm-patches): Adjust accordingly.
---
gnu/packages/llvm.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6b216ee78c..67ca5ab5ea 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -543,10 +543,10 @@ (define (make-clang-toolchain clang)
("libc-static" ,glibc "static")))))
(define %llvm-monorepo-hashes
- '(("14.0.5" . "1hdv020x4k5fp38hik3bxz8k2sr3gnyj9iym3yhjhwygzgwgxjh9")))
+ '(("14.0.6" . "14f8nlvnmdkp9a9a79wv67jbmafvabczhah8rwnqrgd5g3hfxxxx")))
(define %llvm-patches
- '(("14.0.5" . ("clang-14.0-libc-search-path.patch"))))
+ '(("14.0.6" . ("clang-14.0-libc-search-path.patch"))))
(define (llvm-monorepo version)
(origin
@@ -561,7 +561,7 @@ (define (llvm-monorepo version)
(define-public llvm-14
(package
(name "llvm")
- (version "14.0.5")
+ (version "14.0.6")
(source (llvm-monorepo version))
(build-system cmake-build-system)
(outputs '("out" "opt-viewer"))
@@ -649,7 +649,7 @@ (define-public clang-14
(package-version llvm-14)))
(sha256
(base32
- "1p9y5fbcw3ynb79nzyadirwdla03bq38k6d9nhv9x8z2q4ypsga4"))))))
+ "0rhq4wkmvr369nkk059skzzw7jx6qhzqhmiwmqg4sp66avzviwvw"))))))
(package
(inherit template)
(arguments
@@ -1206,7 +1206,7 @@ (define-public libunwind-headers
(define-public lld-14
(package
(name "lld")
- (version "14.0.5")
+ (version "14.0.6")
(source (llvm-monorepo version))
(build-system cmake-build-system)
(inputs
--
2.36.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#56452] [PATCH 5/5] gnu: clang-toolchain-14: Build with libomp-14.
2022-07-08 15:58 ` [bug#56452] [PATCH 1/5] gnu: llvm-8: Fix build with gcc-10 Greg Hogan
` (2 preceding siblings ...)
2022-07-08 15:58 ` [bug#56452] [PATCH 4/5] gnu: LLVM, Clang, LLD: Update to 14.0.6 Greg Hogan
@ 2022-07-08 15:58 ` Greg Hogan
3 siblings, 0 replies; 11+ messages in thread
From: Greg Hogan @ 2022-07-08 15:58 UTC (permalink / raw)
To: 56452; +Cc: Greg Hogan
* gnu/packages/llvm.scm (libomp-14): New variable.
(libomp-13): Inherit from libomp-14.
(libomp): Define as libomp-13.
(make-clang-toolchain): Parameterize libomp.
(clang-toolchain-14): Use libomp-14.
---
gnu/packages/llvm.scm | 109 +++++++++++++++++++++++++++---------------
1 file changed, 70 insertions(+), 39 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 67ca5ab5ea..5a2f411eb2 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -485,7 +485,7 @@ (define (clang-properties version)
"znver3")
'())))))
-(define (make-clang-toolchain clang)
+(define* (make-clang-toolchain clang #:optional (libomp libomp-13))
(package
(name (string-append (package-name clang) "-toolchain"))
(version (package-version clang))
@@ -660,8 +660,50 @@ (define-public clang-14
(lambda _
(chdir "clang"))))))))))
+(define-public libomp-14
+ (package
+ (name "libomp")
+ (version "14.0.6")
+ (source (origin
+ (method url-fetch)
+ (uri (llvm-uri "openmp" version))
+ (sha256
+ (base32
+ "07zby3gwy5c8jssabrhjk3nsxlwipnm6sk4dsvck1l5d0br1ywsg"))
+ (file-name (string-append "libomp-" version ".tar.xz"))))
+ (build-system cmake-build-system)
+ ;; XXX: Note this gets built with GCC because building with Clang itself
+ ;; fails (missing <atomic>, even when libcxx is added as an input.)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DLIBOMP_USE_HWLOC=ON"
+ "-DOPENMP_TEST_C_COMPILER=clang"
+ "-DOPENMP_TEST_CXX_COMPILER=clang++")
+ #:test-target "check-libomp"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir-to-source-and-install-license
+ (lambda _
+ (chdir #$(string-append "../openmp-" version ".src"))
+ (install-file "LICENSE.TXT"
+ (string-append #$output "/share/doc")))))))
+ (native-inputs
+ (list clang-14 llvm-14 perl pkg-config python))
+ (inputs
+ (list `(,hwloc "lib")))
+ (home-page "https://openmp.llvm.org")
+ (synopsis "OpenMP run-time support library")
+ (description
+ "This package provides the run-time support library developed by the LLVM
+project for the OpenMP multi-theaded programming extension. This package
+notably provides @file{libgomp.so}, which is has a binary interface compatible
+with that of libgomp, the GNU Offloading and Multi Processing Library.")
+ (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
+ (upstream-name . "openmp")))
+ (license license:expat)))
+
(define-public clang-toolchain-14
- (make-clang-toolchain clang-14))
+ (make-clang-toolchain clang-14 libomp-14))
(define-public llvm-13
(package
@@ -699,6 +741,31 @@ (define-public clang-13
(base32
"1l4jjdqfl9hrh0fwzv27hc263zc6x61h09vs4ni3yla8i1cwhayc")))))
+(define-public libomp-13
+ (package
+ (inherit libomp-14)
+ (version "13.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (llvm-uri "openmp" version))
+ (sha256
+ (base32
+ "0kvbr4j6ldpssiv7chgqra5y77n7jwbyxlwcl7z32v31f49jcybb"))
+ (file-name (string-append "libomp-" version ".tar.xz"))))
+ (arguments
+ '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON"
+ "-DOPENMP_TEST_C_COMPILER=clang"
+ "-DOPENMP_TEST_CXX_COMPILER=clang++"
+
+ ;; Work around faulty target detection, fixed in 14:
+ ;; https://github.com/llvm/llvm-project/issues/52910
+ "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF")
+ #:test-target "check-libomp"))
+ (native-inputs
+ (modify-inputs (package-native-inputs libomp-14)
+ (replace "clang" clang-13)
+ (replace "llvm" llvm-13)))))
+
(define-public clang-toolchain-13
(make-clang-toolchain clang-13))
@@ -1515,43 +1582,7 @@ (define-public libclc
;; Apache license 2.0 with LLVM exception
(license license:asl2.0)))
-(define-public libomp
- (package
- (name "libomp")
- (version "13.0.1")
- (source (origin
- (method url-fetch)
- (uri (llvm-uri "openmp" version))
- (sha256
- (base32
- "0kvbr4j6ldpssiv7chgqra5y77n7jwbyxlwcl7z32v31f49jcybb"))
- (file-name (string-append "libomp-" version ".tar.xz"))))
- (build-system cmake-build-system)
- ;; XXX: Note this gets built with GCC because building with Clang itself
- ;; fails (missing <atomic>, even when libcxx is added as an input.)
- (arguments
- '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON"
- "-DOPENMP_TEST_C_COMPILER=clang"
- "-DOPENMP_TEST_CXX_COMPILER=clang++"
-
- ;; Work around faulty target detection, fixed in 14:
- ;; https://github.com/llvm/llvm-project/issues/52910
- "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF")
- #:test-target "check-libomp"))
- (native-inputs
- (list clang llvm perl pkg-config python))
- (inputs
- (list `(,hwloc "lib")))
- (home-page "https://openmp.llvm.org")
- (synopsis "OpenMP run-time support library")
- (description
- "This package provides the run-time support library developed by the LLVM
-project for the OpenMP multi-theaded programming extension. This package
-notably provides @file{libgomp.so}, which is has a binary interface compatible
-with that of libgomp, the GNU Offloading and Multi Processing Library.")
- (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
- (upstream-name . "openmp")))
- (license license:expat)))
+(define-public libomp libomp-13)
(define-public python-llvmlite
(package
--
2.36.1
^ permalink raw reply related [flat|nested] 11+ messages in thread