Skip to content

[SYCL] linking sycl gives missing __cpu_model #10

Closed

Description

@airlied

On Fedora 28 + gcc 8.2.1

CMakeFiles/sycl.dir/source/detail/device_info.cpp.o: In function cl::sycl::detail::get_native_vector_width(unsigned long)': device_info.cpp:(.text._ZN2cl4sycl6detail23get_native_vector_widthEm+0x3): undefined reference to __cpu_model'

I can fix this by manually adding -lgcc to the end of the c++ linker line, but that probably means something has gone wrong elsewhere, just mentioning here in case anyone else hits it.

Activity

  1. bader commented on Jan 29, 2019

    @bader
    Contributor

    Hi Dave, thanks for reporting this issue. We have seen the sample problem with Ubuntu and implemented a workaround in CMake files here: https://github.com/intel/llvm/blob/sycl/sycl/CMakeLists.txt#L102
    I think we should look at this problem more carefully and implement a more robust solution.

  2. kusma commented on Jan 29, 2019

    @kusma

    I'm seeing the same problem as well on Fedora 29 + gcc 8.2.1.

  3. keryell commented on Jan 30, 2019

    @keryell
    Contributor

    It works out of the box on Ubuntu 18.10 & g++ 8.2.0 at least...

  4. airlied commented on Feb 1, 2019

    @airlied
    ContributorAuthor

    There's probably no harm in expanding the workaround to always just link -lgcc on gcc.

  5. added a commit that references this issue on Mar 7, 2019
  6. 84 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions