Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5 on OpenWRT
Qt 6.12 LTS is out! See what's new in the release blog

Qt5 on OpenWRT

Scheduled Pinned Locked Moved Mobile and Embedded
25 Posts 4 Posters 34.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #15

    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.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by A Former User
      #16

      @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 ?

      1 Reply Last reply
      0
      • jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #17

        Usually makefiles are generated when configure is called.
        Where did you get Qt sources from?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #18

          form here : https://github.com/rferrazz/qwebdomo-openwrt/blob/master/qt5/Makefile

          @jsulm am i missing something ?

          1 Reply Last reply
          0
          • jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #19

            OK, it is a preconfigured Qt for OpenWRT

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #20

              @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 Qt5Xml

              is this a problem of wrong building qt5 ?

              1 Reply Last reply
              0
              • jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #21

                It looks like your Qt installation does not contain following packages:

                • Qt5WebKitWidgets
                • Qt5WebKit
                • Qt5Widgets
                • Qt5DBus

                You should build them first.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by A Former User
                  #22

                  @jsulm yes, and how to build them plz !
                  from where can i get them !

                  1 Reply Last reply
                  0
                  • jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #23

                    You already have Qt sources, right? Then build that modules like you did for QtCore.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #24

                      @jsulm it works now thank you

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by A Former User
                        #25

                        @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:=fa1c4d819b401b267eb246a543a63ea5

                        PKG_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:=+libstdcpp

                        include $(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
                        endef

                        define Package/qt5-core
                        $(call Package/qt5/Default)
                        TITLE+=core
                        endef

                        define Package/qt5-concurrent
                        $(call Package/qt5/Default)
                        TITLE+=concurrent
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-network
                        $(call Package/qt5/Default)
                        TITLE+=network
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-xml
                        $(call Package/qt5/Default)
                        TITLE+=xml
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-xmlpatterns
                        $(call Package/qt5/Default)
                        TITLE+=xmlpatterns
                        DEPENDS+=+qt5-core +qt5-network
                        endef

                        define Package/qt5-webkitwidgets
                        $(call Package/qt5/Default)
                        TITLE+=webkitwidgets
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-webkit
                        $(call Package/qt5/Default)
                        TITLE+=webkit
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-widgets
                        $(call Package/qt5/Default)
                        TITLE+=widgets
                        DEPENDS+=+qt5-core
                        endef

                        define Package/qt5-dbus
                        $(call Package/qt5/Default)
                        TITLE+=dbus
                        DEPENDS+=+qt5-core +qt5-network
                        endef

                        define Package/qt5-gui
                        $(call Package/qt5/Default)
                        TITLE+=gui
                        DEPENDS+=+qt5-core +qt5-network
                        endef

                        define 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
                        )
                        endef

                        define 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
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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/
                        endef

                        define 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))

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt
                        • Unsolved