hi,
I'm struggling to build openobex as a open-wrt package (tp-link 3040 - sdk revision 388888)
i have build the sdk successfully and can build a simple package like this the one mentioned in https://forum.openwrt.org/viewtopic.php?id=43461
i have read the various docs closely:
i do as follow:
Step 1
download openobex tar from https://www.gitorious.org/openobex/pages/Home (i know i can make a makefile that also can download directly but i had problems to get it to extract right - so will focus on the build here)
Step 2
create dir <path to open-wrt>/package/open-obex
Step 3
place the extracted openobex dir here as openobex-mainline
Step 4
set up the make file as follow:
include $(TOPDIR)/rules.mk
PKG_NAME:=open-obex
PKG_VERSION:=1.7
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/open-obex
SECTION:=util
CATEGORY:=Bluetooth
TITLE:=Open Obex implementation
endef
define Package/knode/description
Open Obex implementation
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./openobex-mainline/* $(PKG_BUILD_DIR)/
endef
define Package/knode/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/open-obex $(1)/usr/bin/
endef
$(eval $(call BuildPackage,open-obex))
Step 4b
In the Makelists.txt of open obex I have disabled the documentation building to keep things simple.
...
option ( BUILD_DOCUMENTATION "Build library and application documentation" OFF)
...
Step 5
so fare so good - now doing the building roughly lets compile:
$ make tools/install
$ make toolchain/install
$ package/open-obex/compile V=99
then i got various complain about packages missing
...
WARNING: skipping libssp -- package not selected
WARNING: skipping libstdcpp -- package not selected
WARNING: skipping libpthread -- package not selected
WARNING: skipping libthread-db -- package not selected
WARNING: skipping librt -- package not selected
WARNING: skipping libgfortran -- package not selected
WARNING: skipping ldd -- package not selected
WARNING: skipping ldconfig -- package not selected
...
enable it 'y' through make menuconfig - some are hard to find so i ended up just doing it directly in
<path to open-wrt>/.config and set "=y"
Step 6
clean and compile again $package/open-obex/{clean,compile} V=99
and still got complains about missing bluez / libusb and udev
bluez and libusb was easy ->
the compile and install bluez:
$ make package/feeds/packages/bluez-utils/compile V=99
$ make package/feeds/packages/bluez-utils/compile V=99
enable it in .config
the compile and install bluez:
$ make package/libs/libusb/compile V=99
$ make package/libs/libusb/compile V=99
enable it in .config
$ make package/system/udev/compile V=99
$ make package/system/udev/install V=99
enable it in .config
Step 6
clean and compile again package/open-obex/{clean,compile} V=99
but udev kept being not found:
...
-- checking for module 'bluez'
-- found bluez, version 3.36
-- checking for module 'libusb-1.0'
-- found libusb-1.0, version 1.0.9
-- Looking for libusb_get_device_list in /home/pelle/playground_openwrt/openwrt_trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/libusb-1.0.so
-- Looking for libusb_get_device_list in /home/pelle/playground_openwrt/openwrt_trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/libusb-1.0.so - found
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
CMake Error at /home/pelle/playground_openwrt/openwrt_trunk/staging_dir/host/share/cmake-2.8/Modules/CheckCXXSourceCompiles.cmake:61 (try_compile):
Unknown extension ".cxx" for file
/home/pelle/playground_openwrt/openwrt_trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/open-obex-1.7/CMakeFiles/CMakeTmp/src.cxx
try_compile() works only for enabled languages. Currently these are:
C
See project() command to enable other languages.
Call Stack (most recent call first):
/home/pelle/playground_openwrt/openwrt_trunk/staging_dir/host/share/cmake-2.8/Modules/CheckCXXCompilerFlag.cmake:40 (CHECK_CXX_SOURCE_COMPILES)
CMakeModules/GenerateExportHeader.cmake:211 (check_cxx_compiler_flag)
CMakeModules/GenerateExportHeader.cmake:365 (_test_compiler_hidden_visibility)
lib/CMakeLists.txt:196 (generate_export_header)
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Failed
-- checking for module 'udev'
-- package 'udev' not found
-- Configuring incomplete, errors occurred!
See also "/home/pelle/playground_openwrt/openwrt_trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/open-obex-1.7/CMakeFiles/CMakeOutput.log".
See also "/home/pelle/playground_openwrt/openwrt_trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/open-obex-1.7/CMakeFiles/CMakeError.log".
make[2]: *** [/home/pelle/playground_openwrt/openwrt_trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/open-obex-1.7/.configured_] Error 1
make[2]: Leaving directory `/home/pelle/playground_openwrt/openwrt_trunk/package/open-obex'
make[1]: *** [package/open-obex/compile] Error 2
make[1]: Leaving directory `/home/pelle/playground_openwrt/openwrt_trunk'
make: *** [package/open-obex/compile] Error 2
...
any suggestions / hints are warmly appreciated!
//
pelle
(Last edited by pellekrogholt on 23 Feb 2014, 21:29)