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.

Where is /etc/ld.so.conf

I am replacing the TI's Qt libraries with Qt comercial version. The new Qt libraries are supposed to be copied to /usr/local/Trolltech/QtEmbedded-4.8.2-am/ on target instead of /user/lib where TI's old Qt libraries are put.

The I try to edit  /etc/ld.so.conf that ldconfig loads. However, this /etc/ld.so.conf does not exist. May I know which file is loaded by ldconfig in the file system provided by TI?

  • Hello,

    If you add the file /etc/ld.so.conf, then it should be used by ldconfig at boot up.

    There is a startup script file:  /etc/init.d/bootmisc.sh  that handles calling ldconfig.

  • I looked at /etc/init.d/bootmisc.sh, and I did not find out where it is calling ldconfig. Could you point out?

  • Which version of SDK do you have? What platform are you using?

    In the latest version (LINUXEZSDK-05.05.00.00), I'm copying the bottom portion of the file /etc/init.d/bootmisc.sh

    ------------

    Top part of file cut out

    .

    .

    .

    #
    # Update /etc/motd.
    #
    if test "$EDITMOTD" != no
    then
    uname -a > /etc/motd.tmp
    sed 1d /etc/motd >> /etc/motd.tmp
    mv /etc/motd.tmp /etc/motd
    fi

    #
    # This is as good a place as any for a sanity check
    # /tmp should be a symlink to /var/tmp to cut down on the number
    # of mounted ramdisks.
    if test ! -L /tmp && test -d /var/tmp
    then
    rm -rf /tmp
    ln -sf /var/tmp /tmp

    #
    # Update dynamic library cache, but only if ld.so.conf is present
    #
    if [ -e /etc/ld.so.conf ] ; then
    /sbin/ldconfig
    fi

    # Set the system clock from hardware clock
    # If the timestamp is 1 day or more recent than the current time,
    # use the timestamp instead.
    test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
    if test -e /etc/timestamp
    then
    SYSTEMDATE=`date "+%Y%m%d"`
    TIMESTAMP=`cat /etc/timestamp | awk '{ print substr($0,9,4) substr($0,1,4);}'`
    NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE \)`
    if [ $NEEDUPDATE -eq 1 ]; then
    date `cat /etc/timestamp`
    /etc/init.d/hwclock.sh stop
    fi
    fi
    : exit 0

  • I am using a TI AM335x evm.

    Since /etc/ld.so.conf does not exist, /sbin/ldconfig is not actually run. It is not the place to set lib path.

    If I add /etc/ld.so.conf, I am afraid it will overwrite the current lib path.

    I want to find the way to modify the current lib path.

    Thank you

  • Since there is no /etc/ld.so.conf in the SDK, the only paths searched are the defaults:  /usr/lib and /lib.  If you want addtional library paths to search, you can use ldconfig and /etc/ld.so.conf.

    I tried a quick experiement, I moved all the QT libs to a new directory: /usr/lib/test

    I ran a QT app and it failed because it could not find the QT libs.

    Next I added the /etc/ld.so.conf with the new path name only:

    /usr/lib/test

    I rebooted and now the QT applications work again, and other applications which use libraries in /usr/lib and /lib also work.