<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - compilation errors while static linking with openmp"
href="https://bugs.llvm.org/show_bug.cgi?id=32456">32456</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>compilation errors while static linking with openmp
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Runtime Library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ilia.taraban@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Problems with static linking openmp:
==============openmp.c=================
#include "omp.h"
int main(){
int a[10];
int i = 0;
#pragma omp parallel
for (i = 0; i < 10; ++i){
a[i] = i;
}
return 0;
}
=======================================
<span class="quote">>>>clang -v</span >
clang version 5.0.0 (trunk 298997)
...
<span class="quote">>>>clang -o openmp.exe -static -fopenmp openmp.c</span >
.../llvm/bin/../lib/libomp.a(ittnotify_static.c.o): In function
`__kmp_itt_fini_ittlib':
ittnotify_static.c:(.text.__kmp_itt_fini_ittlib+0x4e): undefined reference to
`dlsym'
.../llvm/bin/../lib/libomp.a(ittnotify_static.c.o): In function
`__kmp_itt_init_ittlib':
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x14f): undefined reference to
`dlopen'
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x16e): undefined reference to
`dlsym'
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x187): undefined reference to
`dlsym'
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x21d): undefined reference to
`dlerror'
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x3a1): undefined reference to
`dlsym'
ittnotify_static.c:(.text.__kmp_itt_init_ittlib+0x405): undefined reference to
`dlsym'
clang-5.0: error: linker command failed with exit code 1 (use -v to see
invocation)
------------------------
Intel Software Engineer
Ilia Taraban</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>