Skip to content

Missing symbol when building on gcc 7.1 #1856

Closed

Description

@pavanky

Command used to reproduce:

mkdir build && cd build
cmake .. -DBUILD_CUDA=OFF -DBUILD_OPENCL=OFF -DBUILD_GRAPHICS=OFF && make example_helloworld_cpu

Error message:

[100%] Linking CXX executable helloworld/helloworld_cpu
../src/backend/cpu/libafcpu.so.3.5.0: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status

Activity

  1. added this to the v3.5.1 milestone on Jun 23, 2017
  2. mlloreda commented on Jun 23, 2017

    @mlloreda
    Member

    This seems to only occur when -DBUILD_GRAPHICS=OFF.

  3. pavanky commented on Jun 25, 2017

    @pavanky
    MemberAuthor

    @mlloreda This is also only happening when I use regular blas / cblas / lapack / lapacke packages (which are single threaded) instead of openblas (which is multi threaded).

    It's probably happening because the symbol is inherited from libraries that have pthread already linked to them.

  4. pavanky commented on Jun 25, 2017

    @pavanky
    MemberAuthor

    @umar456 do you think it is a good idea to link all libaf* with thread libraries?

  5. self-assigned this
    on Jul 17, 2017
  6. umar456 commented on Jul 20, 2017

    @umar456
    Member

    Fixed via #1872

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions