Hello everyone,

I have a problem with the package creation using the SDK.
I am using the SDK "OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2".

The makefile of my package is:

include $(TOPDIR)/rules.mk

PKG_NAME:=testrest
PKG_RELEASE:=9

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/testrest
    SECTION:=utils
    CATEGORY:=Utilities
    DEPENDS:=libcurl jansson libmicroht*tpd libc libpthread
    TITLE:=testrest
endef

define Package/testrest/description
    A Test tool.
endef

define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Package/testrest/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/testrest $(1)/bin/
endef

$(eval $(call BuildPackage,testrest))

The makefile in the source directory has the following content:

OBJECTS = main.o orcania.o ulfius.o u_map.o u_response.o yder.o u_request.o u_send_request.o
LIBS = -lcurl -ljansson -lmicroht*tpd -lc -lpthread
NAME = testrest

testrest: $(OBJECTS)
    $(CC) -o $(NAME) $(OBJECTS) $(LIBS)

%.o: %.c
    $(CC) -c $(CFLAGS) $<

clean:
    rm *.o $(NAME)

The make command in the root folder of the SDK is running without errors.
I can install the ipk file "testrest_9_ar71xx.ipk" without an error on my router.
The router is a TP-Link Archer C7 AC1750 running Bleeding Edge, 50015.

But when I start the application on my Router I get the following error:

Error relocating /usr/lib/libmicroht*tpd.so.12: pthread_setname_np: symbol not found

I am including the microht*tpd.h header file in my code and installed the libpthread library via opkg on the router.

What can I do to solve this problem?

Best regards,
Aqua

I inserted an asterisk in ht*tp because of the forum software.