<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69905>69905</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[OpenMP] replay utility does not build on OpenBSD
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
ggeorgakoudis
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
brad0
</td>
</tr>
</table>
<pre>
Everything about OpenMP builds on OpenBSD except for the kernel replay utility.
```
[1/2] /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DOMPT_SUPPORT=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/brad/llvm/llvm-build/projects/openmp/libomptarget/tools/kernelreplay -I/home/brad/llvm/llvm-brad/openmp/libomptarget/tools/kernelreplay -I/home/brad/llvm/llvm-build/include -I/home/brad/llvm/llvm-brad/llvm/include -I/home/brad/llvm/llvm-build/projects/openmp/runtime/src -I/home/brad/llvm/llvm-brad/openmp/libomptarget/include -isystem /usr/local/include -pipe -fno-ret-protector -mno-retpoline -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -O2 -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o -MF projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o.d -o projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o -c /home/brad/llvm/llvm-brad/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
FAILED: projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DOMPT_SUPPORT=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/brad/llvm/llvm-build/projects/openmp/libomptarget/tools/kernelreplay -I/home/brad/llvm/llvm-brad/openmp/libomptarget/tools/kernelreplay -I/home/brad/llvm/llvm-build/include -I/home/brad/llvm/llvm-brad/llvm/include -I/home/brad/llvm/llvm-build/projects/openmp/runtime/src -I/home/brad/llvm/llvm-brad/openmp/libomptarget/include -isystem /usr/local/include -pipe -fno-ret-protector -mno-retpoline -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -O2 -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o -MF projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o.d -o projects/openmp/libomptarget/tools/kernelreplay/CMakeFiles/llvm-omp-kernel-replay.dir/llvm-omp-kernel-replay.cpp.o -c /home/brad/llvm/llvm-brad/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp
/home/brad/llvm/llvm-brad/openmp/libomptarget/tools/kernelreplay/llvm-omp-kernel-replay.cpp:89:9: error: reinterpret_cast from 'std::optional<long long>::value_type' (aka 'long long') to 'ptrdiff_t' (aka 'long') is not allowed
reinterpret_cast<ptrdiff_t>(It.getAsInteger().value()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWE9v2zoS_zT0haAhU3FiHXywLatroI6D2IV7MyhxJHNDkVpy5DR72M--oKTdGO1rX19f3-slgSNL80_DH4fzM0Z4ryoDMCfTJeG8qsC6SjzZVipPOCfTdCRaPFs3z52Q0Si38mW-voB7wbMyFRW5bZHuGjDbB5q3SktPrekEy31K4VMBDdLSOopnoE_gDGjqoNHihbaotMKXMYlSEi2G6200fPrH6XJCeBbyoIRnrXeEZ7kyhGcF4UvCl5Sl7w7r_eH0j8X-9Hg4bEicRpSlu-3D4bT_8PCwezyQOJ1Qlp7S9fLDu3Dz7v1mufr48bTY79ePh83ufh-kp_0hXZ1Wu_v9YXF_OG0Xq8fdlSLbPW4XX4rfb7abV-mG8OxsawhpOiEJz7S-1MMX6wAiPGuc_ScU6AnPbAOmboKBym3doHAVIOEZWquDvodsQOz3wveinxpyyFiZQrcSvjODQfS9Tt9AxbUGVefoXfEn1___dJR_8Qj1a0VpWwh9bdGoBihlpbHMAbLGWYQCraOs7kWN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