This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM57X: Qtwebengine build error

Part Number: PROCESSOR-SDK-AM57X


Tool/software: Linux

Hi,

I'm building processor SDK 05.00.00.15 on Ubuntu 16.04. When baking qtwebengine, It fails in one of linking stages with this message:

ERROR: Task (/home/smart/Projects/arago-project/tisdk/sources/meta-qt5/recipes-qt/qt5/qtwebengine_git.bb:do_compile) failed with exit code '1'

The log shows that it could not find the stdc++ library:

...

[10626/17407] LINK v8_snapshot/mkpeephole
FAILED: v8_snapshot/mkpeephole
/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/hosttools/g++ -pie -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -pthread -m32 -Wl,-rpath-link=v8_snapshot -Wl,--disable-new-dtags -Wl,-O1 -Wl,--gc-sections -o "v8_snapshot/mkpeephole" -Wl,--start-group @"v8_snapshot/mkpeephole.rsp"  -Wl,--end-group  -ldl -lrt
/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/hosttools/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so when searching for -lstdc++
/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/hosttools/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a when searching for -lstdc++
/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/hosttools/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
[10627/17407] AR v8_snapshot/obj/v8/libv8_libplatform.a
[10628/17407] ACTION //v8/src/inspector:protocol_generated_sources(/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/build/src/toolchain:v8_snapshot)
[10629/17407] ACTION //v8:js2c(/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/build/src/toolchain:v8_snapshot)
ninja: build stopped: subcommand failed.
Makefile.gn_run:327: recipe for target 'run_ninja' failed
make[3]: *** [run_ninja] Error 1
make[3]: Leaving directory '/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/build/src/core'
Makefile:80: recipe for target 'sub-gn_run-pro-make_first' failed
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory '/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/build/src/core'
Makefile:78: recipe for target 'sub-core-make_first' failed
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory '/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/build/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2
ERROR: oe_runmake failed
WARNING: /home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/temp/run.do_compile.31633:1 exit 1 from 'exit 1'
ERROR: Function failed: do_compile (log file is located at /home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/temp/log.do_compile.31633)

...

The complete log file (/home/smart/Projects/arago-project/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtwebengine/5.9.6+gitAUTOINC+cc526afe9c_e517527148-r0.arago0/temp/log.do_compile.31633)log.do_compile.31633.txt is attached.

Any help is greatly appreciated.

Thank you.

  • Hello,

    Could you please share your build steps? On the following TI page, you will find instructions on building the SDK. I was successfully able to bitbake "qtwebengine" on my Linux PC without any errors.  

    Regards,

    Krunal

  • Hi Krunal,

    Thank you for your support.

    When I was working with the processor sdk v04.03, there was no problem regarding rebuilding the SDK. When the newer version was released, I updated my git repo (from git://arago-project.org/git/projects/oe-layersetup.git) to have the latest version (acd2142a2672eda8b2fcf1320f42f1e03cde9b09). Now I've checked out this revision.

    First of all, I removed the previous tmp directory (arago-tmp-external-linaro-toolchain) completely. Then I followed the TI page you mentioned. So I used the new recommended cross-compiler (gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz). Then as the input configuration file to the oe-layertool-setup.sh script, I used processor-sdk-05.00.00.15-config.txt. After that, according to the guide, I exported the  TOOLCHAIN_PATH_ARMV7 environment variable to where I extracted the cross-toolchain. 

    Before running MACHINE=am57xx-evm bitbake arago-base-tisdk-image, I added the following line to my conf/local.conf file: INHERIT += "rm_work". Note that the download folder DL_DIR was set to the same directory as used with the previous version of the processor SDK.
    Running MACHINE=am57xx-evm bitbake arago-base-tisdk-image completed successfully without any error.

    Then I tried to build the more complex arago-core-tisdk-image with -k option. There were some errors which I could resolve all but Qtwebengine error. I think the other problems were related to adding INHERIT += "rm_work" into my conf/local.conf file as I described here thoroughly. (Not sure though!)

    For Qtwebengine, following the same workaround here (removing INHERIT += "rm_work" and rebuilding Qtwebengine after invoking MACHINE=am57xx-evm bitbake -c cleansstate qtwebengine) did not resolve the error and I got the same error message.

    May be doing a clean rebuild of the SDK without INHERIT += "rm_work" could solve my problem but I do not have enough space on my HDD to do so.

     

    N.B. As far as I know, adding INHERIT += "rm_work" should only remove the extracted sources after the build and so should not affect the resulting installed files however.

    Kind Regards,

    Nasser

     

  • Hi Nasser,

    In my local.conf file, I uncommented "INHERIT += "rm_work" (located on the bottom of the file) and I was able to run the command "MACHINE=am57xx-evm bitbake -c cleansstate qtwebengine" without any errors. My Linux box is running Ubuntu 14.04 and I am having no build errors. Have you made any other changes besides the one you had mentioned earlier in the post?

    Also, if possible could you please have a clean directory before downloading the gitrepo. It seems like you are building on top of PSDK4 and I am not sure if that is causing any issues.

    Regards,
    Krunal
  • Thank you for your reply Krunal.

    Krunal Bhargav34 said:
    Hi Nasser,

    In my local.conf file, I uncommented "INHERIT += "rm_work" (located on the bottom of the file) and I was able to run the command "MACHINE=am57xx-evm bitbake -c cleansstate qtwebengine" without any errors. My Linux box is running Ubuntu 14.04 and I am having no build errors. Have you made any other changes besides the one you had mentioned earlier in the post?

    The problem is not running "MACHINE=am57xx-evm bitbake -c cleansstate qtwebengine" but it's when I want to build it: "MACHINE=am57xx-evm bitbake qtwebengine". Also note that I have built the other parts of the SDK when "INHERIT += "rm_work" was uncommented. So any other required files have been removed already.

    Krunal Bhargav34 said:
    Hi Nasser,
    Also, if possible could you please have a clean directory before downloading the gitrepo. It seems like you are building on top of PSDK4 and I am not sure if that is causing any issues.

    Regards,
    Krunal

    OK, I'll try it.

  • Dear Krunal,

    I tried with a completely clean directory. The result was the same. After cloning the repo and setting up the layers, I jumped to the qtwebengine package. The command sequence was as follows:

    $ wget "https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz">releases.linaro.org/.../gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
    $ tar -Jxvf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME/x-tools
    $ mkdir processorsdk
    $ cd processorsdk
    $ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
    $ cd tisdk
    $ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-05.00.00.15-config.txt
    $ cd build
    $ . conf/setenv
    $ export TOOLCHAIN_PATH_ARMV7=$HOME/x-tools/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf
    $ MACHINE=am57xx-evm bitbake qtwebengine


    This time I did not touch anything in the conf/local.conf file and INHERIT += "rm_work" remained commented as the default settings suggest. But again exactly the same error is seen: ld: cannot find -lstdc++
    I'm using Ubuntu 16.04 as the host machine.

    Any idea to solve this issue.

  • Hi Nasser,

    I just wanted to confirm that you have the following packages installed on your host machine:

    $ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386

    Regards,

    Krunal

  • Hi Krunal,

    Thank you for your support. I've already installed those packages. As you can see in the following results:

    $ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386
    [sudo] password for smart: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Note, selecting 'zlib1g:i386' instead of 'libz1:i386'
    build-essential is already the newest version (12.1ubuntu2).
    diffstat is already the newest version (1.61-1).
    doxygen is already the newest version (1.8.11-1).
    gawk is already the newest version (1:4.1.3+dfsg-0.1).
    unzip is already the newest version (6.0-20ubuntu1).
    libncurses5:i386 is already the newest version (6.0+20160213-1ubuntu1).
    chrpath is already the newest version (0.16-1).
    dos2unix is already the newest version (6.0.4-1).
    socat is already the newest version (1.7.3.1-1).
    texinfo is already the newest version (6.1.0.dfsg.1-5).
    python is already the newest version (2.7.12-1~16.04).
    wget is already the newest version (1.17.1-1ubuntu1.4).
    libc6:i386 is already the newest version (2.23-0ubuntu10).
    libstdc++6:i386 is already the newest version (5.4.0-6ubuntu1~16.04.10).
    zlib1g:i386 is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
    git is already the newest version (1:2.15.0-1~ppa0~ubuntu14.04.1).
    The following packages were automatically installed and are no longer required:
      enblend enfuse gir1.2-rb-3.0 gir1.2-secret-1 gir1.2-totem-1.0 gir1.2-totem-plparser-1.0 grilo-plugins-0.2-base hugin hugin-data hugin-tools kipi-plugins-common libasan2-armel-cross
      libatomic1-armel-cross libclutter-gst-3.0-0 libgcc-5-dev-armel-cross libgom-1.0-0 libgom-1.0-common libgrilo-0.2-1 libkcalcore4 libkdcraw-data libkdcraw23 libkipi-data libkipi11
      libkqoauth0 libksane-data libksane0 libkvkontakte1 libllvm5.0 libllvm5.0:i386 libmediawiki1 libpano13-3 libpano13-bin libqjson0 libqtglib-2.0-0 libqtgstreamer-1.0-0
      libqtgstreamerutils-1.0-0 librhythmbox-core9 libstdc++-5-dev-armel-cross libtotem0 libubsan0-armel-cross libvigraimpex5v5 linux-headers-4.4.0-134 linux-headers-4.4.0-134-generic
      linux-image-4.4.0-134-generic linux-image-extra-4.4.0-134-generic minidlna pidgin-data unity-control-center-faces
    Use 'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

    I should note that there are a series of QA warnings when I execute "bitbake arago-core-tisdk-image -k". Some of them are in this form:

    ...
    ...
    external-linaro-sdk-toolchain: /binutils-cross-canadian-arm/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ranlib is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination
    external-linaro-sdk-toolchain: /binutils-cross-canadian-arm/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ld.gold is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination
    external-linaro-sdk-toolchain: /binutils-cross-canadian-arm/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-strings is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

    Also there are warnings as bellow:

    external-linaro-sdk-toolchain-1.0: gcc-cross-canadian-arm: found library in wrong location: /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/arm-linux-gnueabihf/lib/libstdc++.so
    gcc-cross-canadian-arm: found library in wrong location: /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/arm-linux-gnueabihf/lib/libgcc_s.so.1
    gcc-cross-canadian-arm: found library in wrong location: /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/arm-linux-gnueabihf/lib/libstdc++.so.6
    gcc-cross-canadian-arm: found library in wrong location: /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/x86_64-arago-linux/usr/arm-linux-gnueabihf/lib/libstdc++.so.6.0.24 [libdir]

    The attached is my "build/arago-tmp-external-linaro-toolchain/qa.log" file.

    qa.log

    Does it help to resolve the issue?

    None of the above warnings I could see in the previous versions of the PSDK.

    Regards,

    Nasser

  • Hi Nasser,

    I am not able to replicate you issues on Ubuntu 14.04. Currently, I trying the same setup on Ubuntu16.04 but it will take some time because I am running on a Virtual box. Also, I have reached out to the Yocto experts and I will keep you posted on any updates.

    Regards,
    Krunal
  • Hi Krunal,

    As it may help, the following is my setting feedback:

    $ bitbake arago-core-tisdk-image
    Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00
    Loaded 4043 entries from dependency cache.
    Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:07
    Parsing of 3137 .bb files complete (3134 cached, 3 parsed). 4046 targets, 439 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
      /home/smart/Projects/arago-project/tisdk/sources/meta-arago/meta-arago-distro/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bbappend
      /home/smart/Projects/arago-project/tisdk/sources/meta-processor-sdk/recipes-devtools/python/python3-native_3.5.2.bbappend
      /home/smart/Projects/arago-project/tisdk/sources/meta-processor-sdk/recipes-graphics/wayland/weston_1.11.0.bbappend
    NOTE: Resolving any missing task queue dependencies
    NOTE: Multiple providers are available for runtime python-bson (python-bson, python-pymongo)
    Consider defining a PREFERRED_RPROVIDER entry to match python-bson
    
    Build Configuration:
    BB_VERSION           = "1.36.0"
    BUILD_SYS            = "x86_64-linux"
    NATIVELSBSTRING      = "ubuntu-16.04"
    TARGET_SYS           = "arm-linux-gnueabi"
    MACHINE              = "am57xx-evm"
    DISTRO               = "arago"
    DISTRO_VERSION       = "2018.04"
    TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
    TARGET_FPU           = "hard"
    meta-processor-sdk   = "HEAD:264dc66c689e0e4212c43358382986ee470619d4"
    meta-ros             = "HEAD:e2566402ab108a19634354a934788109422cf409"
    meta-arago-distro    
    meta-arago-extras    = "HEAD:d54e9d6c1d461dbf3189e691088d328bf4c4fb19"
    meta-browser         = "HEAD:26d50665e2f7223c5f4ad7481a8d2431e7cb55fb"
    meta-qt5             = "HEAD:682ad61c071a9710e9f9d8a32ab1b5f3c14953d1"
    meta-networking      
    meta-python          
    meta-oe              
    meta-gnome           
    meta-multimedia      = "HEAD:352531015014d1957d6444d114f4451e241c4d23"
    meta-ti              = "HEAD:8555084679dc5c668e5fb60a16425ca32b10ff21"
    meta-linaro-toolchain 
    meta-optee           = "HEAD:75dfb67bbb14a70cd47afda9726e2e1c76731885"
    meta                 = "HEAD:931a52e8698f684ccbb26ddec18764ad9d9a3e8f"

    Kind Regards,

    Nasser

  • Hi Denys,

    Thank you. Your help completely solved my problem.

    Would you please tell me how could you find the problem? Was it clear from the logs?

    Regards,

    Nasser

  • Hi Nasser,

    I found the following stack overflow link very helpful. I will be closing the ticket and if you are still experiencing issues, feel free to open the ticket in the future. 

    Regards,

    Krunal