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

Parallel compilation #38

Open
chrhansk opened this issue Oct 22, 2023 · 2 comments
Open

Parallel compilation #38

chrhansk opened this issue Oct 22, 2023 · 2 comments

Comments

@chrhansk
Copy link
Contributor

I noticed after some debugging that the standard command

$ARCHDEFS/install_optrove

uses make internally to compile libcutest.a. Unfortunately, the compilation rule uses commands modifying the file libcutest.a in place. The compilation therefore breaks whenever multiple threads are used (i.e., using make -j<n> or by having MAKEFLAGS="-j<n>" set in the environment).

Since the behavior is unpredictable and errors of the form

/usr/bin/ar: /cutest/cutest/objects/pc64.lnx.gfo/double/libcutest.a: error reading cutest.o: file truncated 
/usr/bin/ar: /cutest/cutest/objects/pc64.lnx.gfo/double/libcutest.a: malformed archive

are not caught, the compilation can silently fail. I think it would be a good idea to put a warning in the wiki to.

@nimgould
Copy link
Contributor

nimgould commented Oct 23, 2023 via email

@chrhansk chrhansk changed the title Parllel compilation Parallel compilation Oct 27, 2023
@amontoison
Copy link
Member

amontoison commented Jun 13, 2024

@chrhansk
I just merged the Meson build system (release 2.1.0).

meson setup builddir
meson compile -C builddir
meson install -C builddir

It compiles libcutest_single.a and libcutest_double.a in less than 30 seconds.

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