Qt5 on OpenWRT
-
"x86-64" - you built for x86 not Mips!
How did you call configure script? -
How exactly did you call configure script? What are those other x86_64?
-
@jsulm
admin@ubuntu:/home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-install/usr/bin$ ls
lconvert lupdate qdoc qmake rcc xmlpatterns
lrelease moc qlalr qtpaths syncqt.pl xmlpatternsvalidatorfile xmlpatterns
xmlpatterns: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), not strippedfile xmlpatternsvalidator
xmlpatternsvalidator: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), not strippedfile lconvert
lconvert: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=2d77aa51a7361591e0dbfa170b36748a2f2a400f, not strippedfile moc
moc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=f9cbf1c4ff95dd8f3d9e53834cd4e15ae777e048, not stripped....
and i didn't call configure script apart
-
lconvert and moc are used on the host (during build and UI translation) not on the target, that's why they are X86_64. So, everything is fine.
-
Actually you should not be able to build without calling configure before.
How else did you define MIPS as platform to build for?
Are you sure you did not?
Call it -h parameter to see how to use it. -
@jsulm i didn't call it, i think it's defined in the Makefile of qt5
a message that appear when i run make :
Qt now detects the target and host architectures based on compiler
output. Qt will be built using mips for the target architecture
and x86_64 for the host architecture (note that these two
will be the same unless you are cross-compiling).how can i check if it's built correctly or not ?
-
Usually makefiles are generated when configure is called.
Where did you get Qt sources from? -
OK, it is a preconfigured Qt for OpenWRT
-
@jsulm sorry for bothering you but i really need your help
i'm in fact trying to compile some package that depends on qt5 but when building i got this :
-- Found Qt5 core, checking for further dependencies...
CMake Error at cmake/modules/QtVersionAbstraction.cmake:25 (find_package):
Could not find module FindQt5WebKitWidgets.cmake or a configuration file
for package Qt5WebKitWidgets.Adjust CMAKE_MODULE_PATH to find FindQt5WebKitWidgets.cmake or set
Qt5WebKitWidgets_DIR to the directory containing a CMake configuration file
for Qt5WebKitWidgets. The file will have one of the following names:Qt5WebKitWidgetsConfig.cmake qt5webkitwidgets-config.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:8 (include)CMake Error at cmake/modules/QtVersionAbstraction.cmake:26 (find_package):
Could not find module FindQt5WebKit.cmake or a configuration file for
package Qt5WebKit.Adjust CMAKE_MODULE_PATH to find FindQt5WebKit.cmake or set Qt5WebKit_DIR
to the directory containing a CMake configuration file for Qt5WebKit. The
file will have one of the following names:Qt5WebKitConfig.cmake qt5webkit-config.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:8 (include)CMake Error at cmake/modules/QtVersionAbstraction.cmake:27 (find_package):
Could not find module FindQt5Widgets.cmake or a configuration file for
package Qt5Widgets.Adjust CMAKE_MODULE_PATH to find FindQt5Widgets.cmake or set Qt5Widgets_DIR
to the directory containing a CMake configuration file for Qt5Widgets. The
file will have one of the following names:Qt5WidgetsConfig.cmake qt5widgets-config.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:8 (include)-- Using Qt 5!
CMake Error at cmake/modules/QtVersionAbstraction.cmake:47 (find_package):
Could not find module FindQt5DBus.cmake or a configuration file for package
Qt5DBus.Adjust CMAKE_MODULE_PATH to find FindQt5DBus.cmake or set Qt5DBus_DIR to
the directory containing a CMake configuration file for Qt5DBus. The file
will have one of the following names:Qt5DBusConfig.cmake qt5dbus-config.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:8 (include)CMake Error at /home/ubuntu/openwrt/staging_dir/host/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Qt5Keychain (missing: QTKEYCHAIN_LIBRARY
QTKEYCHAIN_INCLUDE_DIR)
Call Stack (most recent call first):
/home/ubuntu/openwrt/staging_dir/host/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindQt5Keychain.cmake:35 (find_package_handle_standard_args)
src/CMakeLists.txt:28 (find_package)in this directory i have only these :
ubuntu@ubuntu:~/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-install/usr/lib/cmake$ ls
Qt5 Qt5Concurrent Qt5LinguistTools Qt5Nfc Qt5Script Qt5SerialPort Qt5Test Qt5WebSockets Qt5XmlPatterns
Qt5Bluetooth Qt5Core Qt5Network Qt5Positioning Qt5Sensors Qt5Sql Qt5WebChannel Qt5Xmlis this a problem of wrong building qt5 ?
-
It looks like your Qt installation does not contain following packages:
- Qt5WebKitWidgets
- Qt5WebKit
- Qt5Widgets
- Qt5DBus
You should build them first.
-
You already have Qt sources, right? Then build that modules like you did for QtCore.
-
@jsulm i now figure out that it's okey for Qt5Widgets and Qt5DBus but not for both of Qt5WebKitWidgets and Qt5WebKit
i have this when compiling qt5 :
make[2]: Entering directory
/home/ubuntu/openwrt/package/qt5' mkdir -p /home/ubuntu/openwrt/bin/ramips/packages /home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-ramips/qt5-webkitwidgets/CONTROL install -d -m0755 /home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-ramips/qt5-webkitwidgets/usr/lib/ cp -fpR /home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-install/usr/lib/libQt5WebKitWidgets.so* /home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-ramips/qt5-webkitwidgets/usr/lib/ cp: cannot stat '/home/ubuntu/openwrt/build_dir/target-mipsel_r2_uClibc-0.9.32/qt-everywhere-opensource-src-5.4.2/ipkg-install/usr/lib/libQt5WebKitWidgets.so*': No such file or directory make[2]: *** [/home/ubuntu/openwrt/bin/ramips/packages/qt5-webkitwidgets_5.4.2-1_ramips.ipk] Error 1 make[2]: Leaving directory
/home/ubuntu/openwrt/package/qt5'and here is my makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=qt5
PKG_VERSION:=5.4.2
PKG_RELEASE:=1
PKG_MD5SUM:=fa1c4d819b401b267eb246a543a63ea5PKG_SOURCE:=qt-everywhere-opensource-src-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://download.qt-project.org/official_releases/qt/5.4/$(PKG_VERSION)/single
PKG_BUILD_DIR=$(BUILD_DIR)/qt-everywhere-opensource-src-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=+libstdcppinclude $(INCLUDE_DIR)/package.mk
-include $(if $(DUMP),,./files/qmake.mk)define Package/qt5/Default
SECTION:=libraries
CATEGORY:=Libraries
TITLE:=qt5
URL:=http://qt-project.org
DEPENDS:=+librt +zlib +libstdcpp +libpthread @!LINUX_2_6
endefdefine Package/qt5-core
$(call Package/qt5/Default)
TITLE+=core
endefdefine Package/qt5-concurrent
$(call Package/qt5/Default)
TITLE+=concurrent
DEPENDS+=+qt5-core
endefdefine Package/qt5-network
$(call Package/qt5/Default)
TITLE+=network
DEPENDS+=+qt5-core
endefdefine Package/qt5-xml
$(call Package/qt5/Default)
TITLE+=xml
DEPENDS+=+qt5-core
endefdefine Package/qt5-xmlpatterns
$(call Package/qt5/Default)
TITLE+=xmlpatterns
DEPENDS+=+qt5-core +qt5-network
endefdefine Package/qt5-webkitwidgets
$(call Package/qt5/Default)
TITLE+=webkitwidgets
DEPENDS+=+qt5-core
endefdefine Package/qt5-webkit
$(call Package/qt5/Default)
TITLE+=webkit
DEPENDS+=+qt5-core
endefdefine Package/qt5-widgets
$(call Package/qt5/Default)
TITLE+=widgets
DEPENDS+=+qt5-core
endefdefine Package/qt5-dbus
$(call Package/qt5/Default)
TITLE+=dbus
DEPENDS+=+qt5-core +qt5-network
endefdefine Package/qt5-gui
$(call Package/qt5/Default)
TITLE+=gui
DEPENDS+=+qt5-core +qt5-network
endefdefine Build/Configure
mkdir -p $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++
$(CP) ./files/$(FILEPFX)qmake.conf $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++/qmake.conf
$(CP) ./files/$(FILEPFX)qplatformdefs.h $(PKG_BUILD_DIR)/qtbase/mkspecs/linux-openwrt-g++/qplatformdefs.h
( cd $(PKG_BUILD_DIR) ;
TARGET_CC="$(TARGET_CROSS)gcc"
TARGET_CXX="$(TARGET_CROSS)g++"
TARGET_AR="$(TARGET_CROSS)ar cqs"
TARGET_OBJCOPY="$(TARGET_CROSS)objcopy"
TARGET_RANLIB="$(TARGET_CROSS)ranlib"
TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -lpthread -lrt"
TARGET_INCDIRS="$(TARGET_INCDIRS)"
TARGET_LIBDIRS="$(TARGET_LIBDIRS) $(STAGING_DIR)/usr/lib/"
CFLAGS=
CXXFLAGS=
LDFLAGS=
./configure
-arch mipsel
-no-c++11
-prefix $(CONFIGURE_PREFIX)
-bindir $(CONFIGURE_PREFIX)/bin
-libdir $(CONFIGURE_PREFIX)/lib
-datadir $(CONFIGURE_PREFIX)/share/Qt
-plugindir $(CONFIGURE_PREFIX)/lib/Qt/plugins
-xplatform linux-openwrt-g++
-opensource
-confirm-license
-no-sql-db2
-no-sql-ibase
-no-sql-mysql
-no-sql-oci
-no-sql-odbc
-no-sql-psql
-no-sql-sqlite
-no-sql-sqlite2
-no-sql-tds
-no-qml-debug
-no-gif
-no-libpng
-no-libjpeg
-no-xcb
-no-strip
-openssl
-no-nis
-no-cups
-no-eglfs
-no-directfb
-no-linuxfb
-no-kms
-no-opengl
-make libs
-nomake examples
-nomake tests
-skip qtdeclarative
-skip qtmultimedia
-skip activeqt
-skip qtimageformats
-skip qtgraphicaleffects
-skip qtdoc
-v
-continue
)
endefdefine Build/Compile
TARGET_CC="$(TARGET_CROSS)gcc"
TARGET_CXX="$(TARGET_CROSS)g++"
TARGET_AR="$(TARGET_CROSS)ar cqs"
TARGET_OBJCOPY="$(TARGET_CROSS)objcopy"
TARGET_RANLIB="$(TARGET_CROSS)ranlib"
TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -ldl -lpthread -lrt"
TARGET_INCDIRS="$(TARGET_INCDIRS)"
TARGET_LIBDIRS="$(TARGET_LIBDIRS) $(STAGING_DIR)/usr/lib/"
STAGING_DIR="$(STAGING_DIR)"
STAGING_DIR_HOST="$(STAGING_DIR)/../host"
PKG_CONFIG_SYSROOT="$(STAGING_DIR)"
$(MAKE) -C $(PKG_BUILD_DIR)
INSTALL_ROOT=$(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) install
endefdefine Build/InstallDev
$(INSTALL_DIR) $(2)/bin
$(INSTALL_DIR) $(1)/bin
$(INSTALL_DIR) $(1)/usr/mkspecs
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/lib/cmake$(INSTALL_DIR) $(STAGING_DIR)/mk/ $(INSTALL_DATA) ./files/qmake.mk $(STAGING_DIR)/mk/ $(CP) \ $(PKG_INSTALL_DIR)/usr/bin/* \ $(2)/bin/ $(CP) \ $(PKG_INSTALL_DIR)/usr/bin/* \ $(2)/bin/ $(CP) \ $(PKG_INSTALL_DIR)/usr/mkspecs/* \ $(1)/usr/mkspecs/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ $(1)/usr/lib/pkgconfig/ $(CP) \ $(PKG_INSTALL_DIR)/usr/include/* \ $(1)/usr/include/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/*.so* \ $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/*.prl* \ $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/*.la* \ $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/cmake/* \ $(1)/usr/lib/cmake/
endef
define Package/qt5-core/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Core.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Core.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Core.la
$(1)/usr/lib/
endefdefine Package/qt5-concurrent/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Concurrent.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Concurrent.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Concurrent.la
$(1)/usr/lib/
endefdefine Package/qt5-network/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Network.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Network.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Network.la
$(1)/usr/lib/
endefdefine Package/qt5-xml/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Xml.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Xml.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Xml.la
$(1)/usr/lib/
endefdefine Package/qt5-xmlpatterns/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5XmlPatterns.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5XmlPatterns.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5XmlPatterns.la
$(1)/usr/lib/
endefdefine Package/qt5-webkitwidgets/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5WebKitWidgets.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5WebKitWidgets.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5WebKitWidgets.la
$(1)/usr/lib/
endefdefine Package/qt5-webkit/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Webkit.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Webkit.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Webkit.la
$(1)/usr/lib/
endefdefine Package/qt5-widgets/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Widgets.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Widgets.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Widgets.la
$(1)/usr/lib/
endefdefine Package/qt5-dbus/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5DBus.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5DBus.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5DBus.la
$(1)/usr/lib/
endefdefine Package/qt5-gui/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Gui.so*
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Gui.prl
$(1)/usr/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libQt5Gui.la
$(1)/usr/lib/
endef$(eval $(call BuildPackage,qt5-core))
$(eval $(call BuildPackage,qt5-concurrent))
$(eval $(call BuildPackage,qt5-network))
$(eval $(call BuildPackage,qt5-xml))
$(eval $(call BuildPackage,qt5-xmlpatterns))
$(eval $(call BuildPackage,qt5-webkitwidgets))
$(eval $(call BuildPackage,qt5-webkit))
$(eval $(call BuildPackage,qt5-widgets))
$(eval $(call BuildPackage,qt5-dbus))
$(eval $(call BuildPackage,qt5-gui))