#1216 configure failing to enable threaded resolver on android


Following the "Method using a configure cross-compile (tested with Android NDK r7c, r8)" build instructions, configure always outputs:

resolver: default

because the check for pthread_create tries to use -lpthread on the link line, and arm-linux-androideabi-gcc is unable to find any pthread file.

Currently I'm working around this by patching the configure script because I don't know enough about automake to make the proper fix.


  • Daniel Stenberg

    Daniel Stenberg - 2013-04-11

    The threaded resolver requires pthreads on Linux. If you don't have the pthread library available in the Android NDK then the configure script is acting exactly as intended, it reverts back to the default choice.

    What are you suggesting it should do when it can't find the pthreads lib?

  • Duncan

    Duncan - 2013-04-11

    I should have been clearer. The library file is not available in the NDK, but the header is, and it seems that the android tools just know that pthread is available at runtime. So there is no need to specify -lpthread on the link line and doing so causes the error.

    Also, we are only using the library, not the executable. I guess it's possible that libpthread.a or .so would be required for an executable build (although if our .so build succeeds without it then guess it isn't necessary), but I just need the library with --enable-threaded-resolver working.

  • Daniel Stenberg

    Daniel Stenberg - 2013-04-11

    Ok I understand. Try the attached patch then and see how that works. If it fails, please attach the part of the config.log that shows the test being tested.

    You need to apply the patch to configure.ac and then run autoconf

  • Duncan

    Duncan - 2013-04-12

    Seems to work fine with that patch. Both the lib and executable built for me. Thanks.

  • Daniel Stenberg

    Daniel Stenberg - 2013-04-12
    • status: open --> closed-fixed
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-12

    Thanks for verifying, this fix has now been merged as commit edddf394b86340. Case closed!


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks