Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PoCL portability #259

Open
maleadt opened this issue Oct 17, 2024 · 4 comments
Open

Improve PoCL portability #259

maleadt opened this issue Oct 17, 2024 · 4 comments

Comments

@maleadt
Copy link
Member

maleadt commented Oct 17, 2024

PoCL compiles using Clang, which assumes that the host OS provides certain libraries. For example, on Linux:

      From worker 6:	ld.lld: error: unable to find library -lm
      From worker 6:	ld.lld: error: unable to find library -lgcc
      From worker 6:	ld.lld: error: unable to find library -lgcc_s
      From worker 6:	ld.lld: error: unable to find library -lc
      From worker 6:	ld.lld: error: unable to find library -lgcc
      From worker 6:	ld.lld: error: unable to find library -lgcc_s

... or, on macOS:

      From worker 2:	ld64.lld: error: library not found for -lm
      From worker 2:	ld64.lld: error: library not found for -lm
      From worker 2:	ld64.lld: error: library not found for -lSystem

This is obviously not something we can work with, as we want our artifacts to be stand-alone.

@giordano Do you know where I could get these from, or what is the approach taken on Yggdrasil? CSL_jll seems to only provide libgcc_s.

@giordano
Copy link

The gcc ones are in compilersupportlibraries, but we don't have the libc ones anywhere (well, in the compiler shards used by BinaryBuilder, but not easily accessible by anywhere else).

@maleadt
Copy link
Member Author

maleadt commented Oct 17, 2024

Maybe I ought to copy stuff over from the sysroot when creating pocl_jll then?

@giordano
Copy link

Uhm, that could work, as long as you don't add them as library products which are automatically dlopened (file products are fine, if you do want to add them, but not necessary)

@maleadt
Copy link
Member Author

maleadt commented Oct 17, 2024

Note to self: PoCL is broken on macOS right now because of the switch to lld:

      From worker 28:	ld64.lld: error: must specify -platform_version
      From worker 28:	error: linker command failed with exit code 1 (use -v to see invocation)
      From worker 28:	Final linking of kernel _Z24partial_mapreduce_device8identity1_5Int163ValILi10EE16CartesianIndicesILi1E5TupleI5OneToI5Int64EEESA_13CLDeviceArrayIS1_Li2ELi1EESB_IS1_Li1ELi1EE failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants