OpenWrt Forum Archive

Topic: missing libraries in cross compiling toolchain

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am trying to compile the bluetooth library tinyb for openwrt using the cross compiling toolchain. The library needs glib2 and so when compiling the build system I first went to the make menuconfig and made sure glib2 was selected under libraries. After the make is finished there are no shared libraries for glib2 under "staging_dir/toolchain/lib" but there is a .ipk package for glib2 under "/bin/ar71xx/packages/packages".
     What am i missing here , I need the shared libraries libgobject, libgio and libglib-2 in the build system so i can cross compile

ok if anyone has this issue I found the shared libraries that i needed in the build_dir/target/<lib you want>/ipkg-install.
I dont know why these are not automatically coppied over into the toolchain

I tried to find the package you're referring to, but could not find anything even remotely resembling this name in either the core packages or in any of the feeds (I grepped for tinyb and for bluetooth).

As a result, I can only give you generic help.

The problem is that the Makefile for the package in question does not have a Build/InstallDev section to copy the libraries to the staging folders.

You need a section that looks something like the following in the Makefile. You'll need to edit the Makefile yourself.


define Build/InstallDev
    $(INSTALL_DIR) $(STAGING_DIR)/usr/include
    $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
    $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(STAGING_DIR)/usr/include/
    $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.a $(STAGING_DIR)/usr/lib/
    $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib/
    # make any smybolic links to the shared libraries as well
endef

The discussion might have continued from here.