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

complex build works with GCC but not Clang #324

Closed
PhilipDeegan opened this issue Feb 1, 2022 · 5 comments
Closed

complex build works with GCC but not Clang #324

PhilipDeegan opened this issue Feb 1, 2022 · 5 comments

Comments

@PhilipDeegan
Copy link

Hi there,

We have a pretty complicated and template heavy code over at https://github.com/PHAREHUB/PHARE/
I've noticed that our tests are failing with strange errors when I use mold with Clang, but not mold with GCC.

Happy to help in the investigation.

@rui314
Copy link
Owner

rui314 commented Feb 1, 2022

Is it easy to build? If so, I'll do that myself to reproduce your issue locally.

What are your clang and gcc versions?

@PhilipDeegan
Copy link
Author

PhilipDeegan commented Feb 1, 2022

Is it easy to build?

With the dockerfiles we have it is more so, as there are a few prerequisites (MPI/HDF5/etc)
base: https://github.com/PHARCHIVE/phare-teamcity-agent
src dependencies: https://github.com/PHARCHIVE/phare-teamcity-agent_dep
run "build_image.sh 34" for both, to build Fedora 34 images
mold is installed in "phare-teamcity-agent_dep"

load docker container

docker run -it 129.104.6.165:32219/phare/teamcity-fedora_dep:34 bash

in docker container:

git clone https://github.com/PHAREHUB/PHARE --depth 1 --recursive phare; cd phare; mkdir build; cd build
#export CC=clang CXX=clang++ # fine without this, not fine with this
cmake .. -G Ninja
mold --run ninja
ctest -j10

GCC: 10.2
Clang: 11.0.1-2

@rui314 rui314 closed this as completed in e65c5d2 Feb 6, 2022
@rui314
Copy link
Owner

rui314 commented Feb 6, 2022

It was an ABI incompatibility issue between GCC and Clang. I think mold can now handle it. Please rebuild mold with the above commit and try again.

@PhilipDeegan
Copy link
Author

awesome

@rui314
Copy link
Owner

rui314 commented Feb 6, 2022

No hurry, but please close this bug when you verify my fix to confirm that my fix was correct.

@rui314 rui314 reopened this Feb 6, 2022
@rui314 rui314 closed this as completed Apr 7, 2022
This issue was closed.
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