checking for closedir... no
checking for opendir... no
checking for readdir... no
checking for strlcat... no
checking for strlcpy... no
checking using system provided libltdl... no, using included libltdl
*** WARNING: using convenience libltdl!
checking whether lt_preloaded_symbols is declared... no
checking build documentation... yes
checking for docbook2pdf... no
checking for docbook2html... no
checking link statically against libosip2... no
checking building with DMALLOC support... no
checking target platform... Linux
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
*** ERROR: pthreads is required!
root@b12a52ab1898:/siproxd# ls $STAGING_DIR/lib/libpthread*
/home/openwrt/staging_dir/toolchain-mips_24kc_gcc-10.3.0_musl/lib/libpthread.a
root@b12a52ab1898:/siproxd# ls $STAGING_DIR/include/pthread*
/home/openwrt/staging_dir/toolchain-mips_24kc_gcc-10.3.0_musl/include/pthread.h
root@b12a52ab1898:/siproxd# CFLAGS="-I${STAGING_DIR}/include -I/usr/include -lpthread" LDFLAGS="-L${STAGING_DIR}/lib" LIBS="-lpthread" ./configure --build=mips-unknown-linux-gnu --host=mips-openwrt-linux-musl
Does anyone know why it keeps complaining about pthread even when it's there?
I'm aware it exists as a prebuilt package, but I'm trying to create my own plugin in siproxd so I need to be able to build it for the target also to test it on the device.
Maybe I'll take a look at the openwrt buildroot makefiles and try to make sense of it. Thanks.
OK. siproxd should install headers and such into the buildroot staging dir. So maybe your plugin can go into its own Makefile. If the plugin source is public let me know, then I'd give it a try.
I haven't written any code yet. Just trying to get a hang of the dev environment first.
My approach is to modify an existing plugin in siproxd source itself (perhaps plugin_shortdial.c) and then try to compile siproxd as whole instead of making a different repo for my plugin with its own Makefile etc. (for the sake of simplicity for now)
Are you calling ./configure from the build system, or manually? The build system sets up the build environment (which includes the fakeroot path to $(STAGING_DIR))
Does the package you're hijacking as a base have +libpthread as a DEPENDS?
You might also need TARGET_LDFLAGS += -lpthread in the Makefile, but I would look at the DEPENDS first.
Edit: After changing the Makefile depends, make sure you RERUN make menuconfig, or it will NOT update the pre-reqs in .config
There are a LOT of things that are set by the build system, including CONFIGURE_VARS and CONFIGURE_ARGS that are called at the invoke.
Check out the ./include directory for the default defines for things like that.
OpenWrt is designed to have the build system do the building, and manually doing it just won't work - Especially if you're cross-compiling.
You can always manually trigger the package build, but that still uses the build system (aka make package/feeds/packages/siproxd/{clean,configure,compile} or whatever package you are trying to build out