Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3384

wrong runtime path linked into binaries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.12.5
    • Fix Version/s: None
    • Labels:
      None
    • Platform:
      AIX
    • Found in version (details):
      3.12.5
    • Complexity:
      M

      Description

      OS: AIX

      Compiler: gcc

      libtool is coding wrong runtime library paths into binaries which result in various ugly errors.

      also the LT_SYS_LIBRARY_PATH variable is not honoured.

       

      build script:

      export CONFIG_SHELL=/usr/bin/ksh
      export CONFIG_ENV_ARGS=/usr/bin/ksh

      export OBJECT_MODE=64
      export AR="/usr/bin/ar -X64"
      export RANLIB="/usr/bin/ranlib -X64"
      export NM="/usr/bin/nm -X64"
      export YACC ="/opt/freeware/bin/yacc_64"

      export LT_SYS_LIBRARY_PATH="/var/cfengine/lib:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"

      export CC="gcc -maix64"
      export CXX="g++ -maix64"
      export CFLAGS="-DSYSV -D_AIX -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
      export CXXFLAGS=$CFLAGS
      export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/var/cfengine/lib:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"

      ./configure \

      --prefix=/var/cfengine \
      --sbindir=/var/cfengine/bin \
      --localstatedir=/var/cfengine \
      --with-workdir=/var/cfengine \
      --without-postgresql \
      --without-mysql \
      --with-lmdb=/opt/freeware \
      --with-openssl \
      --with-pcre=/opt/freeware \
      --with-libcurl=/opt/freeware \
      --with-libyaml=/opt/freeware \
      --with-libxml2=/opt/freeware

       

      result:

      packagebuilder@aixbuildhostng: /home/packagebuilder/test/cfengine-3.12.5/cf-agent/.libs # dump -X64 -TH cf-agent

      cf-agent:

      **Loader Section**
      Loader Header Information
      VERSION# #SYMtableENT #RELOCent LENidSTR
      0x00000001 0x0000023d 0x000003ba 0x0000013a

      #IMPfilID OFFidSTR LENstrTBL OFFstrTBL
      0x0000000b 0x00007190 0x000026e7 0x000072ca

      **Import File Strings**
      INDEX PATH BASE MEMBER
      0 /lib:/var/cfengine/lib:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib
      1 libc.a shr_64.o
      2 libpthreads.a shr_xpg5_64.o
      3 libpromises.a libpromises.so.3
      4 libxml2.a libxml2.so.2
      5 libpcre.a libpcre.so.1
      6 libpam.a shr_64.o
      7 libpq.a libpq.so.5
      8 liblmdb.a liblmdb.so
      9 libyaml.a libyaml-0.so.2
      10 libcurl.a libcurl.so.4

       

      this can be fixed by modifying the libtool script after configure and empty out the

      follwing variable, but is just ugly hacking.

       

      change

      hardcode_libdir_flag_spec="\$wl-blibpath:\$libdir:/var/cfengine/lib:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"

       

      to

      hardcode_libdir_flag_spec=""

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              grumpycat Christian Tremel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel