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

mold fails to build on s390x-linux-gnu and riscv64-linux-gnu #276

Closed
doko42 opened this issue Jan 18, 2022 · 3 comments
Closed

mold fails to build on s390x-linux-gnu and riscv64-linux-gnu #276

doko42 opened this issue Jan 18, 2022 · 3 comments

Comments

@doko42
Copy link

doko42 commented Jan 18, 2022

a first step at packaging:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+sourcepub/13210136/+listing-archive-extra

fails to build on s390x and riscv64

In file included from /<>/third-party/tbb/src/tbb/tools_api/ittnotify_static.c:17,
from /<>/third-party/tbb/src/tbb/itt_notify.cpp:43:
/<>/third-party/tbb/src/tbb/tools_api/ittnotify_config.h: In function ‘long int __itt_interlocked_increment(volatile long int*)’:
/<>/third-party/tbb/src/tbb/tools_api/ittnotify_config.h:348:12: error: ‘__TBB_machine_fetchadd4’ was not declared in this scope
348 | return __TBB_machine_fetchadd4(ptr, 1) + 1L;
| ^~~~~~~~~~~~~~~~~~~~~~~

is there a way to build with the tbb provided by the distribution?

@Alcaro
Copy link

Alcaro commented Jan 18, 2022

See also: #267, #222

Yes, you can set SYSTEM_TBB=1 on the make invocation.

Looks to me like an issue in upstream TBB. We're on the latest release (2021.5), did anyone file that issue? ...does Intel even have a proper bug tracker?

@rui314
Copy link
Owner

rui314 commented Jan 18, 2022

As @Alcaro pointed out, it looks like Intel OneTBB library cannot be built on those ISAs. Please report the issue to Intel at https://github.com/oneapi-src/oneTBB.

Besides that, I want to make it clear that even if you can build mold on s390 and RISC-V, mold can't be used to build programs on those machines. Being able to run on architecture A is different from being able to produce machine code for architecture A. Only you can do would be cross compilation (from RISC-V or s390 to x86-64, i386 or ARM64). So, for now, I believe it is better to just support x86-64, i386 and ARM64 unless you have another reason to run mold on other architectures.

@rui314
Copy link
Owner

rui314 commented Oct 5, 2022

We now support riscv64 and s390x both as hosts and targets.

@rui314 rui314 closed this as completed Oct 5, 2022
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

3 participants