Skip to content

llvm: Fix compatibility with hwloc@1 and hwloc@:2.3#35387

Merged
kwryankrattiger merged 1 commit intospack:developfrom
Jordan474:fix-llvm-hwloc
May 22, 2023
Merged

llvm: Fix compatibility with hwloc@1 and hwloc@:2.3#35387
kwryankrattiger merged 1 commit intospack:developfrom
Jordan474:fix-llvm-hwloc

Conversation

@Jordan474
Copy link
Copy Markdown
Contributor

@Jordan474 Jordan474 commented Feb 8, 2023

This PR applies a patch from llvm@16 to llvm@14:15 to fix hwloc@:2.3 compatibility. Also relax hwloc contraint for llvm@:12. So only llvm@13 has issues with hwloc@1.

Here is what I tested with spack 0.20, on ubuntu 22.04, gcc 11, no system hwloc (important to catch missing include):

  • llvm@9,12 ^hwloc@1 OK for me (no constraint, no patch)
  • llvm@13 ^hwloc@1 FAIL: needs [email protected]: (1)
  • llvm@13 patches=thispr FAIL: patch does not apply
  • llvm@14,15 ^hwloc@1 FAIL: needs [email protected]:, maybe even [email protected]: (2)
  • llvm@14,15 patches=thispr ^hwloc@1 OK
  • llvm@16: ^hwloc@1:2 OK for me (the patch comes from llvm@16)

So I think #34780's constraint llvm@9: ^[email protected]: is not actually exact, and we can be further relaxed with the patch.

Do you think I miss something @kwryankrattiger ?

(1): With llvm@13 ^hwloc@1 I get error: no member named 'kind' in 'hwloc_obj_attr_u::hwloc_group_attr_s

(2): As seen in the patch there actually seem to be [email protected] code.

EDIT: tested llvm@16


I have another issue with llvm/lib/libomp.so missing a NEEDED to libhwloc since at least llvm@12 (it's ok in llvm@9). I don't know if this is intentional yet, but anyway this will be for another PR if I find something.

kwryankrattiger
kwryankrattiger previously approved these changes Feb 8, 2023
Copy link
Copy Markdown
Contributor

@kwryankrattiger kwryankrattiger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and things being fixed in the upstream is even better.

@haampie
Copy link
Copy Markdown
Member

haampie commented Feb 20, 2023

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Feb 20, 2023

I've started that pipeline for you!

auto-merge was automatically disabled February 20, 2023 13:57

Head branch was pushed to by a user without write access

@Jordan474
Copy link
Copy Markdown
Contributor Author

I inadvertently disabled the auto merge by pushing a rebase, sorry about that.

@Jordan474 Jordan474 requested review from kwryankrattiger and removed request for haampie and trws March 6, 2023 08:14
@naromero77
Copy link
Copy Markdown
Contributor

@Jordan474 Can you take a look at the CI failures? If it was random, we can get a Spack maintainer to restart the CI?

@Jordan474
Copy link
Copy Markdown
Contributor Author

@naromero77 I don't know why it failed last time. I updated the branch and now everything is green again.

@kwryankrattiger kwryankrattiger merged commit 52ee196 into spack:develop May 22, 2023
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request May 23, 2023
luigi-calori pushed a commit to RemoteConnectionManager/spack that referenced this pull request Jun 7, 2023
greenc-FNAL pushed a commit to FNALssi/spack that referenced this pull request Jul 19, 2023
greenc-FNAL pushed a commit to FNALssi/spack that referenced this pull request Aug 22, 2023
greenc-FNAL pushed a commit to greenc-FNAL/spack that referenced this pull request Aug 22, 2023
greenc-FNAL pushed a commit to FNALssi/spack that referenced this pull request Aug 23, 2023
greenc-FNAL pushed a commit to FNALssi/spack that referenced this pull request Aug 23, 2023
marcmengel pushed a commit to FNALssi/spack that referenced this pull request Aug 23, 2023
* llvm: add version 16.0.3 (spack#37472)

* llvm: Fix hwloc@1 and hwloc@:2.3 compatibility (spack#35387)

* llvm: optionally build compiler-rt, libcxx and libunwind as runtimes (spack#32476)

* llvm: replace +omp_as_runtime with omp=runtime

* llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo

* llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo

* llvm: fix-up for the black reformatting

* llvm: fetch 'constexpr_longdouble.patch' from upstream repo

* llvm: optionally build libcxx as a runtime

* llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo

* llvm: update 'sanitizer-ipc_perm_mode.patch'

* llvm: refactor compiler conflicts when libcxx=project

* llvm: fetch 'llvm_python_path.patch' from upstream repo

* llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch'

* llvm: optionally build compiler-rt as a runtime

* llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo

* llvm: fetch 'llvm_py37.patch' from upstream repo

* llvm: rename variant 'internal_unwind' to 'libunwind'

* llvm: optionally build libunwind as a runtime

* llvm: extend the list of maintainers

* llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3'

* llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo

* llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch'

* llvm: regroup patches for missing include directives and drop compiler constraints for them

* llvm: fetch 'llvm-gcc11.patch' from upstream repo

* llvm: fetch 'no_cyclades.patch' from upstream repo

* llvm: update comments and condition for 'no_cyclades9.patch'

* llvm: rename variant 'omp' to 'openmp'

* llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan'

* llvm: rename variant 'omp_debug' to 'libomptarget_debug'

* llvm: do not apply same patch twice

* llvm: constrain and document the '*-thread.patch' patches

* llvm: document the '~lld+libomptarget' conflict

* llvm: update comments for the 'D133513.diff' patch

* llvm: add new versions and set default for libomptarget according to os (spack#38092)

* llvm: add new versions and set default for libomptarget according to os

	modified:   var/spack/repos/builtin/packages/llvm/package.py

* Incorporate reviewer suggestions

Co-authored-by: Sergey Kosukhin <[email protected]>

---------

Co-authored-by: Sergey Kosukhin <[email protected]>

* Add 1606 (spack#38511)

* llvm: fix build against libstdc++ 13 (spack#38329)

llvm @13-15 is required for ispc, but fails to build with GCC 13.
14.0.6 and 15.0.7 built successfully with upstream patch, 13.0.1
still fails. Thus upstream patch is applied to 14 and 15 only.

* ispc: on ARM, build with ARM targets enabled, and updates (spack#38080)

* llvm: fix build with libcxx=none

* ispc: checksum 1.20.0

* ispc: ensure that it does not crash immediately

this would happen if linked to the wrong libc++

* ispc: fix build on macos

find ncurses instead of curses and link against tinfo in order to avoid
unresolved references to _del_curterm, _set_curterm, _setupterm, and
_tigetnum

* ispc: enable arm targets, if building on arm

* ispc: remove double cmake argument

I forgot to remove the constant -DARM_ENABLED=FALSE when adding
-DARM_ENABLED with a value depending on target architecture

* ispc: fix linux build

since 1.20, linux build uses TBB as default tasking system and thus
needs to depend on it

* ispc: try to fix link error on linux

link against both curses (as before) and tinfo (added because of macos)

* ispc: update for recent llvm changes

libcxx=none instead of ~libcxx

---------

Co-authored-by: Satish Balay <[email protected]>
Co-authored-by: Jordan Galby <[email protected]>
Co-authored-by: Sergey Kosukhin <[email protected]>
Co-authored-by: Sajid Ali <[email protected]>
Co-authored-by: Sergey Kosukhin <[email protected]>
Co-authored-by: Paul R. C. Kent <[email protected]>
Co-authored-by: Martin Aumüller <[email protected]>
@Jordan474 Jordan474 deleted the fix-llvm-hwloc branch March 12, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants