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

cilksan ease of use suggestions #48

Open
wheatman opened this issue Apr 25, 2021 · 0 comments
Open

cilksan ease of use suggestions #48

wheatman opened this issue Apr 25, 2021 · 0 comments

Comments

@wheatman
Copy link
Contributor

A minor thing I noticed when trying to create a minimal example for #47

If you use cilksan and forget to compile with -fopencilk you get a lot of linker errors instead of a clear message of the mistake.
I don't know if this could be easily detected, but if so it might help users.

error:

/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(driver.cpp.o): in function `__csan_init':
/home/neboat/opencilk/cilktools/cilksan/driver.cpp:214: undefined reference to `__cilkrts_is_initialized'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(driver.cpp.o): in function `init_internal':
/home/neboat/opencilk/cilktools/cilksan/driver.cpp:215: undefined reference to `__cilkrts_internal_set_nworkers'
/usr/bin/ld: /home/neboat/opencilk/cilktools/cilksan/driver.cpp:216: undefined reference to `__cilkrts_internal_set_force_reduce'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o): in function `__csan_pthread_mutex_lock':
/home/neboat/opencilk/cilktools/cilksan/locking.cpp:128: undefined reference to `__cilkrts_get_tls_worker'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o): in function `__csan_pthread_mutex_trylock':
/home/neboat/opencilk/cilktools/cilksan/locking.cpp:142: undefined reference to `__cilkrts_get_tls_worker'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o): in function `__csan_pthread_mutex_unlock':
/home/neboat/opencilk/cilktools/cilksan/locking.cpp:156: undefined reference to `__cilkrts_get_tls_worker'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o): in function `__csan_mtx_lock':
/home/neboat/opencilk/cilktools/cilksan/locking.cpp:169: undefined reference to `__cilkrts_get_tls_worker'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o): in function `__csan_mtx_trylock':
/home/neboat/opencilk/cilktools/cilksan/locking.cpp:183: undefined reference to `__cilkrts_get_tls_worker'
/usr/bin/ld: /home/ubuntu/OpenCilk-10.0.1-Linux/lib/clang/10.0.1/lib/x86_64-unknown-linux-gnu/libclang_rt.cilksan.a(locking.cpp.o):/home/neboat/opencilk/cilktools/cilksan/locking.cpp:200: more undefined references to `__cilkrts_get_tls_worker' follow
/usr/bin/ld: /tmp/del-7249a6.o: in function `main':
del.cpp:(.text+0x25e): undefined reference to `__csan_llvm_x86_avx2_gather_d_d'
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
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

1 participant