Issue with libarcher in the libomp-10-dev package

Sylvestre Ledru sylvestre at debian.org
Fri May 15 16:42:34 BST 2020


Hello

Could you please open a bug

https://bugs.llvm.org/enter_bug.cgi?product=Packaging


Thanks

Sylvestre


Le 15/05/2020 à 17:36, Joachim Protze a écrit :
> Dear LLVM package maintainers,
>
> I'm glad, that libarcher made it into a debian package. But 
> unfortunately it doesn't work.
>
> The idea of Archer is to complement ThreadSanitizer and provide the 
> synchronization semantics for OpenMP. In a vanilla build of LLVM with 
> openmp, libarcher is loaded by the OpenMP runtime (libomp.so) 
> automatically and checks whether the TSan library is present in the 
> execution:
>
> $ export ARCHER_OPTIONS=verbose=1
> $ clang -fopenmp -fsanitize=thread red-norace.c -g
> $ OMP_NUM_THREADS=2 ./a.out
> Archer detected OpenMP application with TSan, supplying OpenMP 
> synchronization semantics
> Sum: 4999950000
>
> Using clang-10 from the package, there are several issues. First, the 
> archer library is not found as the library is not in the dl search path
> $ clang-10 -fopenmp -fsanitize=thread red-norace.c -g
> $ OMP_NUM_THREADS=2 ./a.out
> ... WARNING: ThreadSanitizer: data race ...
>
> Creating a link in /lib/x86_64-linux-gnu should help for this.
>
> The next issue (after I added the link):
> $ OMP_NUM_THREADS=2 ./a.out
> Archer detected OpenMP application without TSan stopping operation
> ... WARNING: ThreadSanitizer: data race ...
>
> I could not figure out, why the archer library does not use the 
> exported dynamic symbols from the tsan runtime, which is statically 
> linked into the application:
>
> $ readelf --dyn-syms a.out | grep RunningOnValgrind
>    529: 000000000048f6f0    18 FUNC    GLOBAL DEFAULT   13 
> RunningOnValgrind
> $ readelf --dyn-syms /usr/lib/llvm-10/lib/libarcher.so | grep 
> RunningOnValgrind
>     61: 0000000000002770    10 FUNC    WEAK   DEFAULT   12 
> RunningOnValgrind
> $ readelf --dyn-syms /home/.../clang/10.0/lib/libarcher.so | grep 
> RunningOnValgrind
>     64: 0000000000002590    10 FUNC    WEAK   DEFAULT   12 
> RunningOnValgrind
>
> I can successfully use clang-10 with my vanilla build of libarcher. 
> So, it seems like there is something funny going on with libarcher 
> from the deb package.
>
> Finally, I'm not sure why the library should not be installed if 
> compiler and OpenMP runtime are installed. I can understand that 
> developers packages are not installed by default, but a compiler is 
> typically installed by developers?
>
> Thanks in advance for looking into this.
>
> Best
> Joachim
>
>
> _______________________________________________
> Pkg-llvm-team mailing list
> Pkg-llvm-team at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-llvm-team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-llvm-team/attachments/20200515/6a7695b7/attachment.html>


More information about the Pkg-llvm-team mailing list