This is a follow up from this issue on Github.

Basically, on OS X El Capitan, I get this message:

ld: unknown option: -pthread
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1

As can be seen from the link above, this is from linking ffmpeg-d through dub to a d project.

But why is it happening? OS X is Posix, and I would think it'd support posix threads but it doesn't seem to, at least in my case. I tried looking online for information but there is not much documentation and it seems that it is it not supported on many systems.

Is that true on OS X?

And how should I circumvent this problem?

Thanks in advance.


Alright, I found an answer. I don't know if this is intended, but I had to run (while building ffmpeg) ./configure --disable-pthread. That fixed it, at least for now. I'm not sure if it's supposed to run without threads. Furthermore, ./configure --help shows disable pthreads [autodetect] which seems to indicate that it's meant to be detected automatically.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.