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.

ld-linux.so in host side tools qmake2 and arm-linux-gnueabihf-gdb hardwired at install time?

I'm using ti-sdk-am335x-evm-06.00.00.00.  I installed into /home/brun/SIU.  I configured the kernel, RFS, etc. then tarred up the whole directory to pass on to other developers.

Now when I untar into another host machine to /home/brunO/SIU, I can't run qmake2 or ti-sdk-am335x-evm-06.00.00.00.  It says exe does not exist, but it does, ldd shows the ld-linux.so as a file that doesn't exist.  I believe this is because the "elf interpreter" in these executables is somehow hardwired to the original install location that does not exist:

> readelf -l qmake2

Elf file type is EXEC (Executable file)
Entry point 0x804b654
There are 7 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
  INTERP         0x000114 0x08048114 0x08048114 0x01000 0x01000 RW  0x1
      [Requesting program interpreter: /home/brun/SIU/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/lib/ld-linux.so.2]
  LOAD           0x000000 0x08048000 0x08048000 0x26e424 0x26edcc RWE 0x1000

...


This seems to have been done for all the QT tools  and arm-linux-gnueabihf-gdb.


Why is this done?  How is this done?  Is there a way I can make it a relative path?  ldconfig links it to /lib/ld-linux.so.2 on Ubuntu 12.04LTS machine anyway.

  • Using Nix patchelf to set elf interpreter to /lib/ld-linux.so.2 allows qmake2 to execute.  Is this the correct thing to do?

    [linux-devkit]:/develop/work/brun/working/SIU_1_02/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin> ./qmake2
    -bash: ./qmake2: No such file or directory

    [linux-devkit]:/develop/work/brun/working/SIU_1_02/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin> ~/patchelf-0.8/src/patchelf --set-interpreter /lib/ld-linux.so.2 qmake2

    [linux-devkit]:/develop/work/brun/working/SIU_1_02/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin> ./qmake2
    Usage: ./qmake2 [mode] [options] [files]

    QMake has two modes, one mode for generating project files based on
    ...

  • Hi Bruno,

    The SDK is intended to be used after it has been installed from the provided installer. Your workaround should work, but I would recommend installing the SDK from the official installer and then applying the changes you need using a git patch. You can then pass just the git patch to the other developers.

    Best regards,
    Miroslav

  • Can you answer why this is done, why the QT and gdb executables are modified at install time?

  • Bruno, I'm sorry I can't give you a straight answer, but I suppose this is done in order to ensure that the correct program interpreter is used without the need to add files or soft links to your system's library path, which may cause compatibility issues with other applications.

    Best regards,
    Miroslav