Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker “error: cannot preempt symbol” when building openal-soft #7

Closed
ssterling opened this issue Jun 26, 2019 · 2 comments
Closed

Comments

@ssterling
Copy link

I've tried everything I can from a Google search of “cannot preempt symbol” (try it yourself; only 22 results). No luck after three hours. The ports version of openal-soft builds just fine for me, though.

I'm on FreeBSD 12.0-RELEASE, amd64.

[ 49%] Building C object CMakeFiles/alffplay.dir/common/almalloc.c.o
[ 50%] Building C object CMakeFiles/alffplay.dir/common/atomic.c.o
[ 51%] Building C object CMakeFiles/alffplay.dir/common/rwlock.c.o
[ 51%] Building C object CMakeFiles/alffplay.dir/common/threads.c.o
[ 52%] Building C object CMakeFiles/alffplay.dir/common/uintmap.c.o
[ 53%] Linking CXX executable alffplay
/usr/bin/ld: error: cannot preempt symbol: alcOpenDevice
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcCreateContext
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcMakeContextCurrent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcIsExtensionPresent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcGetString
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcGetError
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcGetString
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcDestroyContext
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcOpenDevice
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcMakeContextCurrent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcDestroyContext
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alcCloseDevice
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alDeleteSources
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::~AudioState())

/usr/bin/ld: error: cannot preempt symbol: alDeleteBuffers
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::~AudioState())

/usr/bin/ld: error: cannot preempt symbol: alIsExtensionPresent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())

/usr/bin/ld: error: cannot preempt symbol: alGetEnumValue
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())

/usr/bin/ld: error: cannot preempt symbol: alIsExtensionPresent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())

/usr/bin/ld: error: cannot preempt symbol: alGetEnumValue
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())

/usr/bin/ld: error: cannot preempt symbol: alIsExtensionPresent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())

/usr/bin/ld: error: cannot preempt symbol: alIsExtensionPresent
>>> defined in libopenal.so.1.18.2
>>> referenced by alffplay.cpp
>>>               CMakeFiles/alffplay.dir/examples/alffplay.cpp.o:((anonymous namespace)::AudioState::handler())
@ristoe
Copy link

ristoe commented Aug 3, 2019

Try env LDFLAGS=-fuse-ld=bfd ./build.sh

@ssterling
Copy link
Author

Works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants