Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. --sysroot get's overwritten with weir old sysroot
QtWS25 Last Chance

--sysroot get's overwritten with weir old sysroot

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qtcreator 4.9.1sysroot
4 Posts 3 Posters 517 Views
  • 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.
  • C Offline
    C Offline
    comarius
    wrote on last edited by comarius
    #1

    I have a cross-compiler set up.
    I have 2 kits set up, one for beagle - bone one for R-PI
    I configured BBB first @ Tools->Kits sysroot pointing to /path/TOOLS/beaglebone/rootfs
    then R-PI @ Tools->Kits sysroot at /path/TOOLS/raspberrypi/rootfs

    I had a very old kit which was deleted with a sysroot at /path/OLD_LOCATION/rootfs

    I cleaned all in the working folder and all build* folders
    I also added in the pro file:

    BOARD = beaglebone

    BOARD = raspberrypi

    QMAKE_LFLAGS += "--sysroot=$${TUL_PATH}/TOOLS/$${BOARD}"
    LIBS += --sysroot=$${TUL_PATH}/TOOLS/$${BOARD}/
    

    Checking all project setting in all folders and subfolders

    $ grep -rF "sysroot"
    src/myproject.pro:QMAKE_LFLAGS += "--sysroot=$${TUL_PATH}/TOOLS/$${BOARD}"
    src/myproject.pro:    LIBS += --sysroot=$${TUL_PATH}/TOOLS/$${BOARD}/
    
    

    qmake . && make works fine, BUT QTCREATOR IDE -Main Menu->Buld->run qmake generates a Make file with an ancient --syspath '--sysroot=/home/OLD_PATH/debfs'

    grep -rF "sysroot" |grep deb
    build-Debug/Makefile:CFLAGS        = -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/OLD_PATH/debfs -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
    
    

    Where the heck is this coming from ? Is nowhere in any settings tools kits compiler.

    I also checked /home/.config/Qtproject

    $ grep -rF sysroot
    QtCreator.ini:FindCompletions\1\Text=sysroot
    QtCreator.ini:FindCompletions\2\Text=--sysroot
    Binary file qtcreator/helpcollection.qhc matches
    qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_Beaglebo_bd13586c\qbs\sysroot=/home/myname/HOMEBOARDS/FLOATING/ROOTFS
    qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_Qt_5_9_5_2b2aa98d\qbs\sysroot=/home/myname/CPP/rembix/src/TOOLS/raspberrypi
    qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_bbblinux_973d4103\qbs\sysroot=/home/myname/HOMEBOARDS/FLOATING/ROOTFS
    qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_bbblinux_bd13586c\qbs\sysroot=/home/TOOLS/TOOLS/beaglebone
    qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_raspberr_a5f9fc27\qbs\sysroot=/home/TOOLS/TOOLS/raspberrypi
    qtcreator/qbs/1.12.2/qbs.conf:qt-project\qbs\profiles\qtc_ST_MICRO_5d9e316f\qbs\sysroot=/usr/bin
    qtcreator/qbs/1.12.2/qbs.conf:qt-project\qbs\profiles\qtc_stmicro_5d9e316f\qbs\sysroot=/usr/bin
    
    

    Thank you.

    raven-worxR 1 Reply Last reply
    0
    • C comarius

      I have a cross-compiler set up.
      I have 2 kits set up, one for beagle - bone one for R-PI
      I configured BBB first @ Tools->Kits sysroot pointing to /path/TOOLS/beaglebone/rootfs
      then R-PI @ Tools->Kits sysroot at /path/TOOLS/raspberrypi/rootfs

      I had a very old kit which was deleted with a sysroot at /path/OLD_LOCATION/rootfs

      I cleaned all in the working folder and all build* folders
      I also added in the pro file:

      BOARD = beaglebone

      BOARD = raspberrypi

      QMAKE_LFLAGS += "--sysroot=$${TUL_PATH}/TOOLS/$${BOARD}"
      LIBS += --sysroot=$${TUL_PATH}/TOOLS/$${BOARD}/
      

      Checking all project setting in all folders and subfolders

      $ grep -rF "sysroot"
      src/myproject.pro:QMAKE_LFLAGS += "--sysroot=$${TUL_PATH}/TOOLS/$${BOARD}"
      src/myproject.pro:    LIBS += --sysroot=$${TUL_PATH}/TOOLS/$${BOARD}/
      
      

      qmake . && make works fine, BUT QTCREATOR IDE -Main Menu->Buld->run qmake generates a Make file with an ancient --syspath '--sysroot=/home/OLD_PATH/debfs'

      grep -rF "sysroot" |grep deb
      build-Debug/Makefile:CFLAGS        = -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/OLD_PATH/debfs -g -Wall -W -D_REENTRANT -fPIC $(DEFINES)
      
      

      Where the heck is this coming from ? Is nowhere in any settings tools kits compiler.

      I also checked /home/.config/Qtproject

      $ grep -rF sysroot
      QtCreator.ini:FindCompletions\1\Text=sysroot
      QtCreator.ini:FindCompletions\2\Text=--sysroot
      Binary file qtcreator/helpcollection.qhc matches
      qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_Beaglebo_bd13586c\qbs\sysroot=/home/myname/HOMEBOARDS/FLOATING/ROOTFS
      qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_Qt_5_9_5_2b2aa98d\qbs\sysroot=/home/myname/CPP/rembix/src/TOOLS/raspberrypi
      qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_bbblinux_973d4103\qbs\sysroot=/home/myname/HOMEBOARDS/FLOATING/ROOTFS
      qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_bbblinux_bd13586c\qbs\sysroot=/home/TOOLS/TOOLS/beaglebone
      qtcreator/qbs/1.13.1/qbs.conf:qt-project\qbs\profiles\qtc_raspberr_a5f9fc27\qbs\sysroot=/home/TOOLS/TOOLS/raspberrypi
      qtcreator/qbs/1.12.2/qbs.conf:qt-project\qbs\profiles\qtc_ST_MICRO_5d9e316f\qbs\sysroot=/usr/bin
      qtcreator/qbs/1.12.2/qbs.conf:qt-project\qbs\profiles\qtc_stmicro_5d9e316f\qbs\sysroot=/usr/bin
      
      

      Thank you.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @comarius
      you can try to delete the .pro.user* file and reconfigure the project in QtCreator.
      also you can check (with qmake in your .pro file) what the contents of the QT_SYSROOT variable is

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • C Offline
        C Offline
        comarius
        wrote on last edited by
        #3

        I found it.

        When I build the qt5 for arm, Iong ago I used in ./configure

        git clean -dfx
        
        export ROOT_FS=$BBB_SDK/ROOTFS
        export PATH=${BBB_SDK}/TC741/bin/:$PATH:$ROOT_FS/lib/arm-linux-gnueabihf
        export LD_LIBRARY_PATH=$ROOT_FS/usr/lib/arm-linux-gnueabihf:$ROOT_FS/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH:
        export LDFLAGS='-L$ROOT_FS/usr/lib/arm-linux-gnueabihf -L$ROOT_FS/lib/arm-linux-gnueabihf'
        export CFLAGS='-L$ROOT_FS/usr/lib/arm-linux-gnueabihf -L$ROOT_FS/lib/arm-linux-gnueabihf'
        export BBB_TC=arm-linux-gnueabihf-
        echo $PATH
        
        #./configure -platform linux-g++ -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=$BBB_TC -sysroot $ROOT_FS -opensource -confirm-license -make libs -prefix $ROOT_FS -extprefix $ROOT_FS -hostprefix $ROOT_FS -v -no-gbm --enable-static --enable-shared
        
        ./configure -platform linux-g++ --enable-shared --enable-static -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=$BBB_TC -sysroot $ROOT_FS -opensource -confirm-license -make libs -prefix $ROOT_FS -extprefix $ROOT_FS -hostprefix $ROOT_FS -v -no-gbm -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin -recheck-all -no-qml-debug -nomake examples -nomake tests -no-pulseaudio -no-alsa
        

        so all the make files in buld folder had imprint for --sysroot=$ROOT_FS
        somehow mkspecs is picking from there the sys root.

        The workaround was to recreate that path, and in pro file
        ill make a symbolic link to right sysroot as:

        BOARD=raspberrypi
        #...
        system('rm /home/myname/OLD_SYSROOT/debfs')
        system('ln -s /NEW_SYSROOT/$${BOARD} /home/myname/OLD_SYSROOT/debfs ')
        
        
        Pablo J. RoginaP 1 Reply Last reply
        1
        • C comarius

          I found it.

          When I build the qt5 for arm, Iong ago I used in ./configure

          git clean -dfx
          
          export ROOT_FS=$BBB_SDK/ROOTFS
          export PATH=${BBB_SDK}/TC741/bin/:$PATH:$ROOT_FS/lib/arm-linux-gnueabihf
          export LD_LIBRARY_PATH=$ROOT_FS/usr/lib/arm-linux-gnueabihf:$ROOT_FS/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH:
          export LDFLAGS='-L$ROOT_FS/usr/lib/arm-linux-gnueabihf -L$ROOT_FS/lib/arm-linux-gnueabihf'
          export CFLAGS='-L$ROOT_FS/usr/lib/arm-linux-gnueabihf -L$ROOT_FS/lib/arm-linux-gnueabihf'
          export BBB_TC=arm-linux-gnueabihf-
          echo $PATH
          
          #./configure -platform linux-g++ -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=$BBB_TC -sysroot $ROOT_FS -opensource -confirm-license -make libs -prefix $ROOT_FS -extprefix $ROOT_FS -hostprefix $ROOT_FS -v -no-gbm --enable-static --enable-shared
          
          ./configure -platform linux-g++ --enable-shared --enable-static -opengl es2 -device linux-beagleboard-g++ -device-option CROSS_COMPILE=$BBB_TC -sysroot $ROOT_FS -opensource -confirm-license -make libs -prefix $ROOT_FS -extprefix $ROOT_FS -hostprefix $ROOT_FS -v -no-gbm -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin -recheck-all -no-qml-debug -nomake examples -nomake tests -no-pulseaudio -no-alsa
          

          so all the make files in buld folder had imprint for --sysroot=$ROOT_FS
          somehow mkspecs is picking from there the sys root.

          The workaround was to recreate that path, and in pro file
          ill make a symbolic link to right sysroot as:

          BOARD=raspberrypi
          #...
          system('rm /home/myname/OLD_SYSROOT/debfs')
          system('ln -s /NEW_SYSROOT/$${BOARD} /home/myname/OLD_SYSROOT/debfs ')
          
          
          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @comarius glad you found a solution, and thanks for sharing it.
          Please don't forget to mark your post as solved!

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          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