Cross compiling and deploying Valgrind



  • I am trying to cross compile Valgrind on my Fedora VM in order to get it to run on a custom embedded Linux device running Yacto with a Kinetis KL2x MCU containing a ARM Cortex M4 CPU. I have my QT IDE properly configured to cross compile and deploy QT projects to the device. I was wondering what the best route to accomplish this is. I tried making a new project (in QT>New Project>Import Project>Import Existing Project) using an existing project (Valgrind source code http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2) and i keep getting this error:

    17:20:46: Running steps for project valgrind...
    17:20:46: Starting: "/usr/bin/make" all
    make: *** No rule to make target `all'.  Stop.
    17:20:46: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project valgrind (kit: ----)
    When executing step "Make"
    17:20:46: Elapsed time: 00:00.
    

    and I am not sure how to address it. Is it possible to compile Valgrind just using the cross compiler itself (arm-poky-linux-gnueabi-g++)? Am better off changing the makefile to use the cross compiler instead of gcc and then use scp to send the file to my device(if so which of the many different makefiles do i use?)? Or is there a better way that I am missing? The system doesn't have any package management tools or compilers of its own. Any help/ input will be GREATLY appreciated.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    From a quick look, poky seems to already provide Valgrind. You should use it to build it.



  • @SGaist thanks for the welcoming and the reply. The Yocto system on my embedded device is already flashed and running and i have no way of getting in contact with the person who built it. Is it possible to use bitbake to cross compile the provided recipe on pokyo (poky-morty-16.0.1/meta/recipes-devtools/valgrind) and transfer to my target embedded device? All the information I can find only describes how to install it while building your Yocto image.


  • Lifetime Qt Champion

    I haven't played with that system recently but AFAIR, you should be able to build the sysroot for your system on your desktop machine. Then you could use scp to copy the bits you need over to your device.

    Doesn't your system provide a possibility to start from another device like a SD card or even a nfs ?



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.