Cross compiling issues

Sysprogs forums Forums VisualGDB Cross compiling issues

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #23268
    Brian Beuken
    Participant

    I recently converted a project from on target build on the Raspberry, to local build on the PC to run on the Raspberry. I wanted it to be an example of how to use cross compilation.
    But though I can get the project to build it falls down at the debug giving this error.

    I’m a bit lost, and google isn’t really finding any answer to this. Can you help?

    Process /tmp/PiGauntlet created; pid = 11594
    Listening on port 2000
    Remote debugging from host 192.168.178.46
    /tmp/PiGauntlet: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9′ not found (required by /tmp/PiGauntlet)
    /tmp/PiGauntlet: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21′ not found (required by /tmp/PiGauntlet)

    Child exited with status 1
    GDBserver exiting

     

     

    I’m a bit lost, and google isn’t really finding any answer to this. Can you help?

     

    • This topic was modified 5 years, 4 months ago by Brian Beuken.
    • This topic was modified 5 years, 4 months ago by Brian Beuken.
    • This topic was modified 5 years, 4 months ago by Brian Beuken.
    #23272
    Brian Beuken
    Participant

    hmmm the formatting is very strange, sorry can’t seem to fix it

    the gist of it is

    CXXABI_1.3.9  not found

    GLIBCXX_3.4.21  not found

    This only appears on a large project, a small test project doesn’t give any issues so I assume its looking for a couple of libs, but I don’t know how to set up VisualGDB to point to them?

     

     

     

     

    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    #23277
    support
    Keymaster

    Hi,

    It looks like your support period has expired. Please renew it via this page (note that the 50% renewal discount will add 1 year to the previous expiration date and not to the current date) and we will be happy to help you.

    #23278
    Brian Beuken
    Participant

    Hi

    no my support ends on 16/03/2019 its registered in my university’s name under our purchase mananager, William van Nieuwburg, NHTV

    #23288
    support
    Keymaster

    Hi,

    Thanks for confirming your license status. We have linked your forum account to the license purchased by NHTV.

    The error you are experiencing happens because your program was linked against a version of the glibc library that is incompatible with the actual library installed on the device. Please double-check that you are using a version of the cross-toolchain that is compatible with your SD card image. If you have installed any updated on your target device, please synchronize the toolchain’s sysroot with it (the new VisualGDB 5.4 Beta 2 uses a much faster mechanism for synchronizing the sysroot).

    #23290
    Brian Beuken
    Participant

    thanks for fixing that status mix up,

    I did do a “reccomended” sysroot sync when I set up the project, and also tried a full sysroot sync when I first encountered the issue (indeed I realised it was some kind of mislink), so my sysroot current has a full copy of my image, and still I get the issue.

    Am I missing any other VisualGDB cross compile settings I should have?

     

    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    #23291
    support
    Keymaster

    Hi,

    The issue is not related to any VisualGDB settings – it is 100% between the toolchain and the target. Please let us know which toolchain and what SD card image you are using.

    #23293
    Brian Beuken
    Participant

    Im using the Raspberry Pi toolchain (latest version it seems) and a Jessie (with updates from stretch) image of Raspbian.

     

    #23294
    Brian Beuken
    Participant

    Im also using VisualGDB 5.3R8

    with Raspberry Toolchain GCC 6.3.0: GDB 7.12   6.3.0/7.12/r3

     

     

    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    #23296
    Brian Beuken
    Participant

    I did a new sysroot sync, and noticed this error throwing up a lot

    Cannot create c:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot/usr/lib\node_modules\node-red\node_modules\serialport\node_modules\node-pre-gyp\node_modules\npmlog\node_modules\gauge\node_modules\string-width\node_modules\is-fullwidth-code-point\node_modules\number-is-nan\package.json: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Thats a bit of a problem, I think? Especially since I am unable to edit the sysroot location to a shorter name?

    • This reply was modified 5 years, 4 months ago by Brian Beuken.
    #23298
    support
    Keymaster

    Hi,

    Please try synchronizing the toolchain using VisualGDB 5.4 Beta 2. It includes an optimized file transfer engine that works around known problems with sysroot synchronization.

    #23299
    Brian Beuken
    Participant

    ok I updated to 5.4 and also changed to a clean Raspberry 3B+ with a new version of Stretch, so everything is shiny and new.

    1st issue, I had to install gdbserver onto the pi, it never needed it when I used it as the on target compile but ok.

     

    I did a full resync with the new version of sysroot sync which is much faster, well done on speeding that up

     

    But Im afraid now I can’t build my project as I get this error.

     

    1> c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/libm.so: file not recognized: File truncated
    1>collect2.exe : error : ld returned 1 exit status
    1> make: *** [Debug/PiGauntlet] Error 1

     

    #23303
    support
    Keymaster

    Hi,

    This looks like the c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/libm.so file was not synchronized properly. It could be a VisualGDB bug, or might be caused by something else.

    Please try deleting all subdirectories in the toolchain’s sysroot directory except for etc, then resynchronize it again.

    If the problem persists, please try checking whether libm.so file is a symlink (note the backslash instead of forward slashes):

    dir c:\sysgcc\raspberry\bin\..\arm-linux-gnueabihf\sysroot\usr\lib\arm-linux-gnueabihf\libm.so

    If it is a symlink, please check if the target file pointed by the symlink physically exists and contains a valid ELF signature. Please also check any warnings shown during sysroot synchronization. E.g. insufficient disk space or corrupt file system might prevent some files from being synchronized.

    #23305
    Brian Beuken
    Participant

    I’ll have to leave this for a few days, as I need to focus on the on target builds that are working, but I will let you know how I get on with these steps.

     

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.