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

Error when building from source #191

Open
KaiwenXue opened this issue Sep 12, 2023 · 2 comments
Open

Error when building from source #191

KaiwenXue opened this issue Sep 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@KaiwenXue
Copy link

Describe the bug

Unable to build the software from source following instructions. The process errors out at the same spot every attempt.

Expected behavior

Build from source.

OpenCilk version

opencilk/v2.0.1 Latest

Building from source on system with cmake 3.18.4 and gcc 7.2.0

System information

OS: RHEL 7.9
CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz

Steps to reproduce (include relevant output)

git clone -b opencilk/v2.0.1 https://github.com/OpenCilk/infrastructure
infrastructure/tools/get $(pwd)/opencilk
infrastructure/tools/build $(pwd)/opencilk $(pwd)/build

Errors out at this stage:

...
[ 58%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/init.c.o
[ 58%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/hypertable.c.o
[ 59%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/fiber.c.o
[ 60%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/pedigree_globals.c.o
[ 60%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/internal-malloc.c.o
[ 62%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/fiber-pool.c.o
[ 62%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/personality.c.o
[ 63%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/reducer_impl.c.o
[ 63%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/global.c.o
[ 63%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/reducer_api.c.o
[ 64%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/hypertable.c.o
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/libhooks.cpp:8:
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/cilksan_internal.h:11:
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/dictionary.h:11:
/projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h:502:28: error: 'DSSlab_t' does not refer to a value
DJSetIdx -= offsetof(DSSlab_t, DJSets);
^
/projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h:437:10: note: declared here
struct DSSlab_t {
^
[ 66%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/init.c.o
[ 66%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/sched_stats.c.o
[ 66%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/internal-malloc.c.o
[ 67%] Building C object cheetah/runtime/CMakeFiles/opencilk-x86_64.dir/scheduler.c.o
[ 68%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/pedigree_globals.c.o
[ 69%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/personality.c.o
[ 70%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/reducer_api.c.o
[ 70%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/reducer_impl.c.o
[ 72%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/sched_stats.c.o
[ 72%] Building C object cheetah/runtime/CMakeFiles/opencilk-dynamic-x86_64.dir/scheduler.c.o
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/driver.cpp:13:
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/cilksan_internal.h:11:
In file included from /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/dictionary.h:11:
/projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h:502:28: error: 'DSSlab_t' does not refer to a value
DJSetIdx -= offsetof(DSSlab_t, DJSets);
^
/projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h:437:10: note: declared here
struct DSSlab_t {
^
1 error generated.
gmake[5]: *** [cilktools/cilksan/CMakeFiles/cilksan-x86_64_compile.dir/libhooks.cpp.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
1 error generated.
gmake[5]: *** [cilktools/cilksan/CMakeFiles/cilksan-x86_64_compile.dir/driver.cpp.o] Error 1
gmake[4]: *** [cilktools/cilksan/CMakeFiles/cilksan-x86_64_compile.dir/all] Error 2
gmake[4]: *** Waiting for unfinished jobs....
[ 73%] Linking C shared library /projects/eng/software/src/opencilk/build/lib/clang/14.0.6/lib/x86_64-unknown-linux-gnu/libopencilk-asan.so
[ 73%] Built target opencilk-asan-dynamic-x86_64
[ 74%] Linking C static library /projects/eng/software/src/opencilk/build/lib/clang/14.0.6/lib/x86_64-unknown-linux-gnu/libopencilk-asan.a
[ 74%] Linking C shared library /projects/eng/software/src/opencilk/build/lib/clang/14.0.6/lib/x86_64-unknown-linux-gnu/libopencilk.so
[ 75%] Linking C static library /projects/eng/software/src/opencilk/build/lib/clang/14.0.6/lib/x86_64-unknown-linux-gnu/libopencilk.a
[ 75%] Built target opencilk-asan-x86_64
[ 75%] Built target opencilk-x86_64
[ 75%] Built target opencilk-dynamic-x86_64
gmake[3]: *** [all] Error 2
gmake[2]: *** [runtimes/runtimes-stamps/runtimes-build] Error 2
gmake[1]: *** [runtimes/CMakeFiles/runtimes.dir/all] Error 2
gmake: *** [all] Error 2

@KaiwenXue KaiwenXue added the bug Something isn't working label Sep 12, 2023
@neboat
Copy link
Collaborator

neboat commented Sep 13, 2023

Thanks for the bug report.

It looks like this issue might be caused by certain versions of libc++.

Can you try changing the offsetof on line 502 of /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h to __builtin_offsetof and see if that resolves the issue for you?

@KaiwenXue
Copy link
Author

Thanks for the bug report.

It looks like this issue might be caused by certain versions of libc++.

Can you try changing the offsetof on line 502 of /projects/eng/software/src/opencilk/opencilk/cilktools/cilksan/disjointset.h to __builtin_offsetof and see if that resolves the issue for you?

Thank you. That resolved the issue and I'm able to finish the build now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants