<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:Undefined reference (Centos 7) in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1270788#M1059</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please give us an update on the provided details.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 05 Apr 2021 08:20:45 GMT</pubDate>
    <dc:creator>AbhishekD_Intel</dc:creator>
    <dc:date>2021-04-05T08:20:45Z</dc:date>
    <item>
      <title>Undefined reference (Centos 7)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1266906#M1037</link>
      <description>&lt;P&gt;Any idea why I cannot compile with dpcpp in centos 7?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;
$ dpcpp -std=c++17 -O3 -fsycl code.cpp
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /tmp/user/code-3c6697.o: in function `main':
mardyn_cpu.cpp:(.text+0x2): undefined reference to `omp_get_thread_num'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_stringstream&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;@GLIBCXX_3.4.21'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;::_M_assign(std::__cxx11::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; const&amp;amp;)@GLIBCXX_3.4.21'
...

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ld --version
GNU ld version 2.27-43.base.el7_8.1
Copyright (C) 2016 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.


$ ldd /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
        linux-vdso.so.1 =&amp;gt;  (0x00007fff5846b000)
        libdl.so.2 =&amp;gt; /lib64/libdl.so.2 (0x00007f69f16d0000)
        libOpenCL.so.1 =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libOpenCL.so.1 (0x00007f69f1d4a000)
        libpthread.so.0 =&amp;gt; /lib64/libpthread.so.0 (0x00007f69f14b4000)
        libsvml.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libsvml.so (0x00007f69ef9b7000)
        libirng.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libirng.so (0x00007f69ef64d000)
        libstdc++.so.6 =&amp;gt; /lib64/libstdc++.so.6 (0x00007f69ef346000)
        libimf.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libimf.so (0x00007f69eecbe000)
        libm.so.6 =&amp;gt; /lib64/libm.so.6 (0x00007f69ee9bc000)
        libgcc_s.so.1 =&amp;gt; /lib64/libgcc_s.so.1 (0x00007f69ee7a6000)
        libintlc.so.5 =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007f69ee52e000)
        libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x00007f69ee160000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f69f1b42000)

        linux-vdso.so.1 =&amp;gt;  (0x00007fff5846b000)
        libdl.so.2 =&amp;gt; /lib64/libdl.so.2 (0x00007f69f16d0000)
        libOpenCL.so.1 =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libOpenCL.so.1 (0x00007f69f1d4a000)
        libpthread.so.0 =&amp;gt; /lib64/libpthread.so.0 (0x00007f69f14b4000)
        libsvml.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libsvml.so (0x00007f69ef9b7000)
        libirng.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libirng.so (0x00007f69ef64d000)
        libstdc++.so.6 =&amp;gt; /lib64/libstdc++.so.6 (0x00007f69ef346000)
        libimf.so =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libimf.so (0x00007f69eecbe000)
        libm.so.6 =&amp;gt; /lib64/libm.so.6 (0x00007f69ee9bc000)
        libgcc_s.so.1 =&amp;gt; /lib64/libgcc_s.so.1 (0x00007f69ee7a6000)
        libintlc.so.5 =&amp;gt; /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007f69ee52e000)
        libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x00007f69ee160000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f69f1b42000)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried also using LD_LIBRARY_PATH to a different compiler version:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;$ LD_LIBRARY_PATH=/home/user/gcc/gcc_install_dir/lib64 ldd /opt/intel/oneapi/compiler/2021.1.1/linu
x/lib/libsycl.so
        linux-vdso.so.1 =&amp;gt;  (0x00007fff819ab000)
        libdl.so.2 =&amp;gt; /lib64/libdl.so.2 (0x00007fab67a01000)
        libOpenCL.so.1 =&amp;gt; /opt/amdgpu-pro/lib64/libOpenCL.so.1 (0x00007fab6807a000)
        libpthread.so.0 =&amp;gt; /lib64/libpthread.so.0 (0x00007fab677e5000)
        libsvml.so =&amp;gt; not found
        libirng.so =&amp;gt; not found
        libstdc++.so.6 =&amp;gt; /home/user/gcc/gcc_install_dir/lib64/libstdc++.so.6 (0x00007fab67464000)
        libimf.so =&amp;gt; not found
        libm.so.6 =&amp;gt; /lib64/libm.so.6 (0x00007fab67162000)
        libgcc_s.so.1 =&amp;gt; /home/user/gcc/gcc_install_dir/lib64/libgcc_s.so.1 (0x00007fab66f4b000)
        libintlc.so.5 =&amp;gt; not found
        libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x00007fab66b7d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fab67e73000)

$ ~/gcc/gcc_install_dir/bin/gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ LD_LIBRARY_PATH=/home/user/gcc/gcc_install_dir/lib64:/usr/local/lib:/usr/lib:/usr/local/lib64:/us
r/lib64:$LD_LIBRARY_PATH dpcpp -std=c++17 -O3 -fsycl code.cpp
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /tmp/user/mardyn_cpu-da40aa.o: in function `main':
mardyn_cpu.cpp:(.text+0x2): undefined reference to `omp_get_thread_num'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_stringstream&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;@GLIBCXX_3.4.21'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt;::_M_assign(std::__cxx11::basic_string&amp;lt;char, std::char_traits&amp;lt;char&amp;gt;, std::allocator&amp;lt;char&amp;gt; &amp;gt; const&amp;amp;)@GLIBCXX_3.4.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code itself it is just a test. I know I will have to use `-fopenmp`, etc. But currently it does not compile even the simplest hello-world.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;omp.h&amp;gt;
#include &amp;lt;cstdio&amp;gt;

int main(int argc, char* argv[]) {
#pragma omp parallel
  {
    printf("thread id %d\n", omp_get_thread_num());
  }
  return 0;
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This compiles in another system with ubuntu, but not with centos. &lt;BR /&gt;&lt;BR /&gt;Tested also with `scl enable devtoolset-9 -- bash` and it emits the same error (undefined... GLIBCXX_3.4.21/20/22). Gcc 9.3.1&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 11:02:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1266906#M1037</guid>
      <dc:creator>RN1</dc:creator>
      <dc:date>2021-03-23T11:02:18Z</dc:date>
    </item>
    <item>
      <title>Re:Undefined reference (Centos 7)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1267335#M1039</link>
      <description>&lt;P&gt;Hi Raul,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the detailed information.&lt;/P&gt;&lt;P&gt;Unfortunately, DPC++ does not support CentOS 7 as of now. For more details please refer to the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;CentOS 8.x is supported as of now for CPU as a host/target. Please check the above link for more details regarding supported OS for the DPC++ compiler.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2021 13:06:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1267335#M1039</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-03-24T13:06:35Z</dc:date>
    </item>
    <item>
      <title>Re:Undefined reference (Centos 7)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1270788#M1059</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please give us an update on the provided details.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2021 08:20:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1270788#M1059</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-04-05T08:20:45Z</dc:date>
    </item>
    <item>
      <title>Re:Undefined reference (Centos 7)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1272879#M1083</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As we haven't heard back from you, we are considering that your issue has been resolved.&lt;/P&gt;&lt;P&gt;We will no longer monitor this thread. If you require any additional assistance from Intel, please post a new thread.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2021 12:43:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Undefined-reference-Centos-7/m-p/1272879#M1083</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-04-12T12:43:59Z</dc:date>
    </item>
  </channel>
</rss>

