Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to compile kmap2qmap

How to compile kmap2qmap

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
kmap2qmap
17 Posts 4 Posters 5.3k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    What error are you getting ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • VincentBV Offline
      VincentBV Offline
      VincentB
      wrote on last edited by
      #3

      Hi @SGaist ,

      This is the output from qtcreator when I try to compile kmap2qmap project :

      10:45:51: Exécution des étapes pour le projet kmap2qmap...
      10:45:51: Configuration inchangée, étape qmake sautée.
      10:45:51: Débute : "/usr/bin/make" 
      g++ -c -pipe -g -std=c++1y -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../kmap2qmap -I. -I/home/vincent/Qt5.7.0/5.7/gcc_64/include -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtPlatformSupport -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtPlatformSupport/5.7.0 -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtPlatformSupport/5.7.0/QtPlatformSupport -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtGui/5.7.0 -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtGui/5.7.0/QtGui -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtCore/5.7.0 -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtCore/5.7.0/QtCore -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtGui -I/home/vincent/Qt5.7.0/5.7/gcc_64/include/QtCore -I.moc -isystem /usr/include/libdrm -I/home/vincent/Qt5.7.0/5.7/gcc_64/mkspecs/linux-g++ -o .obj/main.o ../kmap2qmap/main.cpp
      g++ -Wl,--gc-sections -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/home/vincent/Qt5.7.0/5.7/gcc_64/lib -o /bin/kmap2qmap .obj/main.o   -L/usr/lib64 -L/home/vincent/Qt5.7.0/5.7/gcc_64/lib -lQt5PlatformSupport -lfontconfig -lfreetype -lQt5DBus -ldl -lgthread-2.0 -pthread -lrt -lglib-2.0 -lXrender -lXext -lX11 -lm -lEGL -lQt5Gui -lQt5Core -lGL -lpthread 
      /usr/bin/ld: cannot open output file /bin/kmap2qmap: Permission denied
      collect2: error: ld returned 1 exit status
      make: *** [/bin/kmap2qmap] Error 1
      10:45:52: Le processus "/usr/bin/make" s'est terminé avec le code 2.
      Erreur lors de la compilation/déploiement du projet kmap2qmap (kit : Desktop Qt 5.7.0 GCC 64bit)
      When executing step "Make"
      10:45:52: Temps écoulé : 00:01.
      

      When I open the projetct, this message appears :Error while parsing file /home/vincent/Téléchargements/qt-everywhere-opensource-src-5.7.1/qttools/src/kmap2qmap/kmap2qmap.pro. Giving up.

      Thanks

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        You are trying to store the build result in /bin which you don't have access to (which is normal).

        You shouldn't do that, what version of Qt are you using to build that utility ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • VincentBV Offline
          VincentBV Offline
          VincentB
          wrote on last edited by
          #5

          I'm using Qt 5.7. How to change the output directory ?

          jsulmJ 1 Reply Last reply
          0
          • VincentBV VincentB

            I'm using Qt 5.7. How to change the output directory ?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @VincentB Can you post the *.pro file of that project?

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

            1 Reply Last reply
            0
            • VincentBV Offline
              VincentBV Offline
              VincentB
              wrote on last edited by
              #7

              Sure :

              QT = core platformsupport-private
              CONFIG += console
              
              SOURCES += main.cpp
              
              load(qt_app)
              

              This is the .pro file contains in qt sources (qttools/src/kmap2qmap)

              1 Reply Last reply
              0
              • VincentBV Offline
                VincentBV Offline
                VincentB
                wrote on last edited by VincentB
                #8

                When I copy/pastethe commands found in the output compilation sheet in QtCreator in console and modify -o /bin/kmap2qmap to -o ../../bin/kmap2qmap it works.

                But the output of executing kmap2qmap is :

                ./kmap2qmap: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./kmap2qmap)
                ./kmap2qmap: relocation error: ./kmap2qmap: symbol _ZN7QString13toUtf8_helperERKS_, version Qt_5 not defined in file libQt5Core.so.5 with link time reference
                
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  Are you sure you are not mixing your distribution Qt with the one you installed from the official installer ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • VincentBV Offline
                    VincentBV Offline
                    VincentB
                    wrote on last edited by VincentB
                    #10

                    I hope not...

                    How I can check this point ?

                    EDIT : Ouch.. I'm a little bit confused : On QtCreator in help menu --> based on Qt 5.7.0
                    When I type in a console

                    qmake -v
                    

                    It's output :

                    QMake version 3.0
                    Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
                    

                    So I guess there is a conflict there...

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      If you're on the command line, just calling qmake will call your system's qmake. Use the full path.

                      If using Qt Creator, check the Kit you are using.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • VincentBV Offline
                        VincentBV Offline
                        VincentB
                        wrote on last edited by
                        #12

                        Kit is using Qt5.7.
                        Even try with full path to qmake in Qt5.7 directory, still have the same issue :

                        ./kmap2qmap: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./kmap2qmap)
                        
                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          Additional note: the Qt version used to build Qt Creator doesn't matter in regard to the version you use to build your application. You can use Qt Creator with several version of Qt for several different architectures, device etc.

                          You can try with LD_LIBRARY_PATH=/path/to/your/Qt/5.7/lib/path ./kmap2qmap

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • VincentBV Offline
                            VincentBV Offline
                            VincentB
                            wrote on last edited by
                            #14

                            Hi @SGaist ,

                            Thanks for the tip, it works. But now, I have to clean my qt installations ...

                            1 Reply Last reply
                            0
                            • michaelLM Offline
                              michaelLM Offline
                              michaelL
                              wrote on last edited by
                              #15

                              Hi @VincentB
                              can you explain how you did it?
                              i gave myselv priviledges on /bin so that on QTCreator buld kmap2qmap without any errors.
                              Now i am facing a problem with this example:

                              kmap2qmap i386/qwertz/de-latin1-nodeadkeys.kmap include/compose.latin1.inc de-latin1-nodeadkeys.qmap

                              It gives me this error:

                              /bin/kmap2qmap: error while loading shared libraries: libGAL.so: cannot open shared object file: No such file or directory

                              1 Reply Last reply
                              0
                              • michaelLM Offline
                                michaelLM Offline
                                michaelL
                                wrote on last edited by
                                #16

                                Hi,

                                i made it work with the tool kmap2qmap and loaded like this on main:

                                QEglFSFunctions myKeyboard_Layout;
                                myKeyboard_Layout.loadKeymap("/home/root/de-latin1-nodeadkeys.qmap");
                                

                                The keymaps on my embedded OS where all with .gz zipped. To make it work with the tool i had to "gunzip" all the files from
                                /usr/share/keymaps/i386/qwertz and /usr/share/keymaps/i386/include
                                and
                                /usr/share/keymaps/i386/qwertz and /usr/share/keymaps/i386/qwertz

                                Than do:
                                kmap2qmap /usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.kmap de-latin1-nodeadkeys.qmap

                                After that you have your .qmap file. Copy it to the directory where your application runs at and add the function in main to set the right keymap fo the keyboard.

                                1 Reply Last reply
                                1
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #17

                                  Thanks for sharing your solution !

                                  Happy hacking :)

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  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 Extensions
                                  • Unsolved