Bug#882781: clang is missing a dependency on libomp-dev

Alexander Kurtz alexander at kurtz.be
Sun Nov 26 19:07:00 UTC 2017


Package: clang
Version: 1:3.8-37

Hi!

The gcc package Depends: on gcc-7 -> libgcc-7-dev -> libgomp1, which
means the following works out-of-the-box:

    alexander at shepard:~$ cat test.c 
    int main(){
        #pragma omp parallel for schedule(dynamic,50)
        for(int i = 0; i < 10; i++);
    }
    alexander at shepard:~$ gcc -fopenmp test.c 
    alexander at shepard:~$ ./a.out 
    alexander at shepard:~$ 

In contrast, the clang package does not pull in libomp-dev, which means
the following fails:

    alexander at shepard:~$ cat test.c 
    int main(){
        #pragma omp parallel for schedule(dynamic,50)
        for(int i = 0; i < 10; i++);
    }
    alexander at shepard:~$ clang -fopenmp test.c 
    /usr/bin/ld: cannot find -lomp
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    alexander at shepard:~$ 

I think that if the clang binary supports the -fopenmp switch, it is
reasonable to assume that it actually works. Therefore please make the
clang package depend on the libomp-dev package.

Best regards

Alexander Kurtz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20171126/aece0bba/attachment.sig>


More information about the Pkg-llvm-team mailing list