/usr/bin/ld: unrecognized option '-pthread'

I am building 'mozldap' from source (mozldap is also known as ldapsdk. The current port of ldapsdk is very out of date and I need to build a new one).

My build process fails when `ld` tries to use `-pthread` option though the `configure` scripts doesn't complain about `pthread`:

Code:
# ./configure --enable-clu --with-sasl=/usr/local --with-svrcore=/usr/local

....
checking whether gcc accepts -pthread... yes
creating ./config.status
.....

# gmake
/usr/bin/ld: unrecognized option '-pthread'
/usr/bin/ld: use the --help option for usage information
gmake[3]: *** [libprldap60.so] Error 1

I've searched but did not find any similiar error. So any helps are very highly appreciated.

Thank you.
 
If I read this correctly: http://www.openldap.org/its/index.cgi/Build?id=5020

it looks like it's libtool related. What version of libtool is it using?

I think it's probably best to edit the 'old' ldapsdk port (update the version numbers etc) and try to use that. If you have that working you can submit a PR with your patch so the port can be updated.
 
SirDice said:

That building requires `pthread` that can be added to `configure` options while current `mozldap` is already set to build with `pthread` but it can't link the libraries.

As said in "porter handbook" I should use "gcc" as a linker but I don't know how to do that (still reading the code and find the right place to do as Handbook said)

it looks like it's libtool related. What version of libtool is it using?

I think it's probably best to edit the 'old' ldapsdk port (update the version numbers etc) and try to use that. If you have that working you can submit a PR with your patch so the port can be updated.

I have (GNU libtool) 1.5.26 on FreeBSD-7.2.

The 'old' ldapsdk build process is very simple and doesn't require any patch. I read the Makefile of `ldasdk port` but couldn't find any useful information for the new one.

If I can build successfully `mozldap` I can submit my result to port database. That's a honour :)
 
Back
Top