Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Building static AIX client

    8 answers - 5606 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    I have successfully built a subversion server and client for AIX 5.3.
    I recently discovered that I need to build a statically linked version
    of the client so that the dependencies do not need to be installed on
    every AIX box I need the client installed on.
    I have been running into problems though. Here are the steps I've
    taken, followed by the error I'm receiving.
    1) Install the following RPMs (as root), which can be downloaded from
    gcc-4.0.0-1.aix5.3.ppc.rpm
    libgcc-4.0.0-1.aix5.3.ppc.rpm
    make-3.80-1.aix5.1.ppc.rpm
    readline-4.3-2.aix5.1.ppc.rpm
    zlib-1.2.2-4.aix5.1.ppc.rpm
    2) Download the following files and store them in a new directory
    called /svn/downloads.
    openldap-2.3.24.tar.gz
    openssl-0.9.8b.tar.gz
    subversion-1.3.2.tar.gz
    3) Run the attached bld-svn-client-static.sh script to build the
    Subversion client.
    When I run this, everything is fine up to this point. I try to
    include enough text to give context as to where in the process we are.
    The error is at the end.
    Libraries have been installed in:
    /svn/client-install/lib
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `LIBPATH' environment variable
    during execution
    - use the `-Wl,
    ' linker flag
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    / -c -d
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    / -c -m
    644 /
    /
    cd subversion/clients/cmdline && /bin/sh
    /
    gcc -I/svn/client-install/include
    -L/svn/client-install/lib -all-static -I/svn/client-install/include
    -pthread
    -D_LARGEFILE64_SURCE -DNE_LFS -L/svn/client-install/lib
    -Wl,-brtl
    -rpath
    /svn/client-install/lib -o svn add-cmd.o blame-cmd.o cat-cmd.o
    checkout-cmd.o cleanup-cmd.o commit-cmd.o copy-cmd.o delete-cmd.o
    diff-cmd.o export-cmd.o help-cmd.o import-cmd.o info-cmd.o lock-cmd.o
    log-cmd.o ls-cmd.o main.o merge-cmd.o mkdir-cmd.o move-cmd.o notify.o
    prompt.o propdel-cmd.o propedit-cmd.o propget-cmd.o proplist-cmd.o
    props.o propset-cmd.o resolved-cmd.o revert-cmd.o status-cmd.o
    status.o switch-cmd.o unlock-cmd.o update-cmd.o util.o
    /
    /
    -liconv / -lm -lnsl
    -lpthread /
    ld: 0711-317 ERRR: Undefined symbol: t_open
    ld: 0711-317 ERRR: Undefined symbol: t_close
    ld: 0711-317 ERRR: Undefined symbol: t_getstate
    ld: 0711-317 ERRR: Undefined symbol: t_unbind
    ld: 0711-317 ERRR: Undefined symbol: t_sync
    ld: 0711-317 ERRR: Undefined symbol: t_bind
    ld: 0711-317 ERRR: Undefined symbol: t_getinfo
    ld: 0711-317 ERRR: Undefined symbol: t_free
    ld: 0711-317 ERRR: Undefined symbol: _terrno
    ld: 0711-317 ERRR: Undefined symbol: t_sndudata
    ld: 0711-317 ERRR: Undefined symbol: t_rcvudata
    ld: 0711-317 ERRR: Undefined symbol: t_rcvuderr
    ld: 0711-317 ERRR: Undefined symbol: t_alloc
    ld: 0711-317 ERRR: Undefined symbol: t_optmgmt
    ld: 0711-317 ERRR: Undefined symbol: t_connect
    ld: 0711-317 ERRR: Undefined symbol: t_rcvconnect
    ld: 0711-317 ERRR: Undefined symbol: t_rcv
    ld: 0711-317 ERRR: Undefined symbol: t_look
    ld: 0711-317 ERRR: Undefined symbol: t_rcvrel
    ld: 0711-317 ERRR: Undefined symbol: t_sndrel
    ld: 0711-317 ERRR: Undefined symbol: t_rcvdis
    ld: 0711-317 ERRR: Undefined symbol: t_snddis
    ld: 0711-317 ERRR: Undefined symbol: t_snd
    ld: 0711-317 ERRR: Undefined symbol: t_errlist
    ld: 0711-317 ERRR: Undefined symbol: t_nerr
    ld: 0711-317 ERRR: Undefined symbol: t_listen
    ld: 0711-317 ERRR: Undefined symbol: t_accept
    ld: 0711-317 ERRR: Undefined symbol: crypt_r
    ld: 0711-317 ERRR: Undefined symbol: max_history_size
    ld: 0711-317 ERRR: Undefined symbol: encrypted_pw_passlen
    ld: 0711-317 ERRR: Undefined symbol: getpass_auto
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    make: 1254-004 The error code from the last command is 1.
    Stop.
    svnadm /svn>
    Does anyone have any idea how to fix this? I found this post
    () which seems
    similar. Their suggestion is to rebuild gcc
    specified, but I don't quite understand how to verify if my situation
    is similar, and would prefer to not have to build gcc.
    Thanks,
    Justin
    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.1 | | 1157 bytes | |

    more time. It looks like my bld script was blocked by virus
    scanning. I'll paste it here.

    #!/bin/ksh93

    ## Define variables
    base_dir=/svn/client-install
    src_dir=/svn/downloads
    build_dir=/svn/client-build

    ## Create initial directories
    mkdir -p $build_dir

    ## Build openssl
    cd $build_dir
    #gunzip $src_dir/openssl-0.9.8b.tar.gz
    tar xvf $src_dir/openssl-0.9.8b.tar
    cd $build_dir/openssl-0.9.8b
    /config no-shared $base_dir
    make
    make install

    ## Build Subversion
    cd $build_dir
    #gunzip $
    tar xvf $src_dir/subversion-1.3.2.tar
    cd $build_dir/subversion-1.3.2
    # Have to export these vars to openssl and libxml or expat can be found.
    export CC="gcc -I$base_dir/include -L$base_dir/lib"
    export CFLAGS="-I$base_dir/include -I$base_dir/usr/local/include"
    export LDFLAGS="-L$base_dir/lib -L$base_dir/usr/local/lib"
    /configure $base_dir
    $base_dir/lib $base_dir/include

    make
    make install

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.2 | | 596 bytes | |

    7/14/06, Garrett Rooney <rooneg (AT) electricjellyfish (DOT) netwrote:

    [snip]

    If I had to guess I'd say that you are failing to link in some sort of
    magical AIX libc library, but honestly, we're deep in the AIX voodoo
    that I don't even pretend to understand

    I tried adding -L/lib to LDFLAGS, CFLAGS,and CPPFLAGS, since that is
    where I say libC.a. I still get the same error.

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.3 | | 981 bytes | |

    7/14/06, Justin Johnson <justinjohnson (AT) gmail (DOT) comwrote:
    7/14/06, Garrett Rooney <rooneg (AT) electricjellyfish (DOT) netwrote:

    [snip]

    If I had to guess I'd say that you are failing to link in some sort of
    magical AIX libc library, but honestly, we're deep in the AIX voodoo
    that I don't even pretend to understand

    I tried adding -L/lib to LDFLAGS, CFLAGS,and CPPFLAGS, since that is
    where I say libC.a. I still get the same error.

    Well, adding -L/lib will tell it to look there, but you still need to
    tell it to actually link it in. Perhaps adding -lC will help?
    course, that assumes that libC.a is the C library, it could very well
    be a c++ runtime library or something, like I said, I'm not an AIX
    person.
    -garrett

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.4 | | 7018 bytes | |

    I'm a little further now. I passed gcc the option -Xlinker -bnoquiet
    and got the following results. Not sure what it means though.

    (ld): halt 4
    (ld): setopt r/o->w
    (ld): setopt nodelcsect
    (ld): setopt noautoimp
    (ld): setopt rtl
    (ld): setopt rtllib
    (ld): setopt symbolic:1
    (ld): setfflag 4
    (ld): savename svn
    (ld): filelist 64 2
    (ld): i /lib/crt0_r.o
    (ld): i /tmp//BqY.o
    (ld): i add-cmd.o
    (ld): i blame-cmd.o
    (ld): i cat-cmd.o
    (ld): i checkout-cmd.o
    (ld): i cleanup-cmd.o
    (ld): i commit-cmd.o
    (ld): i copy-cmd.o
    (ld): i delete-cmd.o
    (ld): i diff-cmd.o
    (ld): i export-cmd.o
    (ld): i help-cmd.o
    (ld): i import-cmd.o
    (ld): i info-cmd.o
    (ld): i lock-cmd.o
    (ld): i log-cmd.o
    (ld): i ls-cmd.o
    (ld): i main.o
    (ld): i merge-cmd.o
    (ld): i mkdir-cmd.o
    (ld): i move-cmd.o
    (ld): i notify.o
    (ld): i prompt.o
    (ld): i propdel-cmd.o
    (ld): i propedit-cmd.o
    (ld): i propget-cmd.o
    (ld): i proplist-cmd.o
    (ld): i props.o
    (ld): i propset-cmd.o
    (ld): i resolved-cmd.o
    (ld): i revert-cmd.o
    (ld): i status-cmd.o
    (ld): i status.o
    (ld): i switch-cmd.o
    (ld): i unlock-cmd.o
    (ld): i update-cmd.o
    (ld): i util.o
    (ld): i
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): lib /lib/libiconv.a
    (ld): i /
    (ld): lib /lib/libm.a
    (ld): lib /lib/libnsl.a
    (ld): lib /lib/libpthread.a
    (ld): i /
    (ld): lib /
    (ld): lib /
    (ld): i /
    (ld): i /
    (ld): i /
    (ld): lib /lib/libc.a
    (ld): lib /lib/librtl.a
    FILELIST: Number of previously inserted files processed: 64
    (ld): imports /lib/syscalls.exp
    IMPRTS: Symbols imported from import file /lib/syscalls.exp: 500
    (ld): initfini _GLBAL__FI_svn _GLBAL__FD_svn
    (ld): resolve
    RESLVE: 18333 of 65073 symbols were kept.
    (ld): addgl /usr/lib/glink.o
    ADDGL: Glink code added for 6 symbols.
    (ld): er full
    ld: 0711-318 ERRR: Undefined symbols were found.
    The following symbols are in error:
    Symbol Inpndx TY CL Source-File(File) R
    Import-File{Shared-object}
    RLD: Address Section Rld-type Referencing Symbol

    ld: 0711-317 ERRR: Undefined symbol: t_open
    t_open [28] ER DS (/lib/libnsl.a[shr.o])
    0000fc54 .data R_PS [630] <t_open>
    ld: 0711-317 ERRR: Undefined symbol: t_close
    t_close [18] ER DS (/lib/libnsl.a[shr.o])
    0000fc58 .data R_PS [632] <t_close>
    ld: 0711-317 ERRR: Undefined symbol: t_getstate
    t_getstate [24] ER DS (/lib/libnsl.a[shr.o])
    0000fc3c .data R_PS [618]
    <t_getstate>
    ld: 0711-317 ERRR: Undefined symbol: t_unbind
    t_unbind [52] ER DS (/lib/libnsl.a[shr.o])
    0000fca8 .data R_PS [672] <t_unbind>
    ld: 0711-317 ERRR: Undefined symbol: t_sync
    t_sync [10] ER DS (/lib/libnsl.a[shr.o])
    0000fcb8 .data R_PS [680] <t_sync>
    ld: 0711-317 ERRR: Undefined symbol: t_bind
    t_bind [16] ER DS (/lib/libnsl.a[shr.o])
    0000fcd4 .data R_PS [694] <t_bind>
    ld: 0711-317 ERRR: Undefined symbol: t_getinfo
    t_getinfo [22] ER DS (/lib/libnsl.a[shr.o])
    0000fb98 .data R_PS [536]
    <t_getinfo>
    ld: 0711-317 ERRR: Undefined symbol: t_free
    t_free [14] ER DS (/lib/libnsl.a[shr.o])
    0000fce8 .data R_PS [704] <t_free>
    ld: 0711-317 ERRR: Undefined symbol: _terrno
    _terrno [4] ER DS (/lib/libnsl.a[shr.o])
    0000fc40 .data R_PS [620] <_terrno>
    ld: 0711-317 ERRR: Undefined symbol: t_sndudata
    t_sndudata [50] ER DS (/lib/libnsl.a[shr.o])
    0000fd08 .data R_PS [720]
    <t_sndudata>
    ld: 0711-317 ERRR: Undefined symbol: t_rcvudata
    t_rcvudata [40] ER DS (/lib/libnsl.a[shr.o])
    0000fd14 .data R_PS [726]
    <t_rcvudata>
    ld: 0711-317 ERRR: Undefined symbol: t_rcvuderr
    t_rcvuderr [42] ER DS (/lib/libnsl.a[shr.o])
    0000fd18 .data R_PS [728]
    <t_rcvuderr>
    ld: 0711-317 ERRR: Undefined symbol: t_alloc
    t_alloc [12] ER DS (/lib/libnsl.a[shr.o])
    0000fc44 .data R_PS [622] <t_alloc>
    ld: 0711-317 ERRR: Undefined symbol: t_optmgmt
    t_optmgmt [30] ER DS (/lib/libnsl.a[shr.o])
    0000fd70 .data R_PS [772]
    <t_optmgmt>
    ld: 0711-317 ERRR: Undefined symbol: t_connect
    t_connect [20] ER DS (/lib/libnsl.a[shr.o])
    0000fdb4 .data R_PS [806]
    <t_connect>
    ld: 0711-317 ERRR: Undefined symbol: t_rcvconnect
    t_rcvconnect [34] ER DS (/lib/libnsl.a[shr.o])
    0000fdb8 .data R_PS [808]
    <t_rcvconnect>
    ld: 0711-317 ERRR: Undefined symbol: t_rcv
    t_rcv [32] ER DS (/lib/libnsl.a[shr.o])
    0000fdbc .data R_PS [810] <t_rcv>
    ld: 0711-317 ERRR: Undefined symbol: t_look
    t_look [8] ER DS (/lib/libnsl.a[shr.o])
    0000fdc0 .data R_PS [812] <t_look>
    ld: 0711-317 ERRR: Undefined symbol: t_rcvrel
    t_rcvrel [38] ER DS (/lib/libnsl.a[shr.o])
    0000fdc4 .data R_PS [814] <t_rcvrel>
    ld: 0711-317 ERRR: Undefined symbol: t_sndrel
    t_sndrel [48] ER DS (/lib/libnsl.a[shr.o])
    0000fdc8 .data R_PS [816] <t_sndrel>
    ld: 0711-317 ERRR: Undefined symbol: t_rcvdis
    t_rcvdis [36] ER DS (/lib/libnsl.a[shr.o])
    0000fdcc .data R_PS [818] <t_rcvdis>
    ld: 0711-317 ERRR: Undefined symbol: t_snddis
    t_snddis [46] ER DS (/lib/libnsl.a[shr.o])
    0000fdd0 .data R_PS [820] <t_snddis>
    ld: 0711-317 ERRR: Undefined symbol: t_snd
    t_snd [44] ER DS (/lib/libnsl.a[shr.o])
    0000fdd4 .data R_PS [822] <t_snd>
    ld: 0711-317 ERRR: Undefined symbol: t_errlist
    t_errlist [2] ER RW (/lib/libnsl.a[shr.o])
    0000ff40 .data R_PS [1004]
    <t_errlist>
    ld: 0711-317 ERRR: Undefined symbol: t_nerr
    t_nerr [0] ER RW (/lib/libnsl.a[shr.o])
    0000ff48 .data R_PS [1008] <t_nerr>
    ld: 0711-317 ERRR: Undefined symbol: t_listen
    t_listen [26] ER DS (/lib/libnsl.a[shr.o])
    00010050 .data R_PS [1140] <t_listen>
    ld: 0711-317 ERRR: Undefined symbol: t_accept
    t_accept [6] ER DS (/lib/libnsl.a[shr.o])
    00010060 .data R_PS [1148] <t_accept>
    ld: 0711-317 ERRR: Undefined symbol: crypt_r
    crypt_r [926] ER DS (/lib/libc.a[shr.o])
    00051290 .data R_PS [3004] <crypt_r>
    ld: 0711-317 ERRR: Undefined symbol: max_history_size
    max_history_size [932] ER DS (/lib/libc.a[shr.o])
    00051274 .data R_PS [2990]
    <max_history_size>
    ld: 0711-317 ERRR: Undefined symbol: encrypted_pw_passlen
    encrypted_pw_passlen [930] ER DS (/lib/libc.a[shr.o])
    000512dc .data R_PS [3042]
    <encrypted_pw_passlen>
    ld: 0711-317 ERRR: Undefined symbol: getpass_auto
    getpass_auto [936] ER DS (/lib/libc.a[shr.o])
    00051320 .data R_PS [3076]
    <getpass_auto>
    ER: The return code is 8.
    collect2: ld returned 8 exit status

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.5 | | 885 bytes | |

    >
    I tried adding -L/lib to LDFLAGS, CFLAGS,and CPPFLAGS, since that is
    where I say libC.a. I still get the same error.

    Well, adding -L/lib will tell it to look there, but you still need to
    tell it to actually link it in. Perhaps adding -lC will help?
    course, that assumes that libC.a is the C library, it could very well
    be a c++ runtime library or something, like I said, I'm not an AIX
    person.

    I found the symbols in /lib/libnsl.a. I also verified that I'm
    passing -L/lib and -lnsl to gcc.

    The error message says I should pass the -bloadmap or -bnoquiet option
    to obtain more information, but I'm not sure how to pass options to ld
    through gcc.

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.6 | | 655 bytes | |

    Justin Johnson wrote:
    >3) Run the attached bld-svn-client-static.sh script to build the
    >Subversion client.


    Here's the bld script attachment.

    I'm pretty sure David Edelsohn either got subversion to build statically
    on AIX, or determined it was impossible.

    of the two.

    David?

    (This guy is trying to build SVN with , and it doesn't
    work, I think I remember you tried to do the same thing).

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.7 | | 1032 bytes | |

    Daniel Berlin writes:

    DanJustin Johnson wrote:
    3) Run the attached bld-svn-client-static.sh script to build the
    Subversion client.

    DanI'm pretty sure David Edelsohn either got subversion to build statically
    Danon AIX, or determined it was impossible.

    Danof the two.

    DanDavid?

    Dan(This guy is trying to build SVN with , and it doesn't
    Danwork, I think I remember you tried to do the same thing).

    SVN on AIX definitely needs shared libraries disabled. I have
    been able to build all SVN releases so far with configure options:

    Berkeley DB was causing problems and I do not need to run an SVN server,
    so I just disabled that part.

    Also, it is very important to use Bash, not the default AIX shell,
    to run configure, if you want it to complete in your lifetime.

    David

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org
  • No.8 | | 1876 bytes | |

    7/14/06, David Edelsohn <dje (AT) watson (DOT) ibm.comwrote:
    Daniel Berlin writes:

    DanJustin Johnson wrote:
    3) Run the attached bld-svn-client-static.sh script to build the
    Subversion client.

    DanI'm pretty sure David Edelsohn either got subversion to build statically
    Danon AIX, or determined it was impossible.

    Danof the two.

    DanDavid?

    Dan(This guy is trying to build SVN with , and it doesn't
    Danwork, I think I remember you tried to do the same thing).

    SVN on AIX definitely needs shared libraries disabled. I have
    been able to build all SVN releases so far with configure options:

    Berkeley DB was causing problems and I do not need to run an SVN server,
    so I just disabled that part.

    Also, it is very important to use Bash, not the default AIX shell,
    to run configure, if you want it to complete in your lifetime.

    Just for the record, here is how I successfully compiled a static
    version of the AIX Subversion client.

    #!/bin/ksh93

    ## Define variables
    src_dir=/svn/downloads
    build_dir=/svn/build
    prefix=/opt/svn/svn-1.3.2

    ## Create initial directories
    mkdir -p $build_dir

    cat <<EF /tmp/crypt.exp
    #!
    __crypt_r
    __setkey_r
    __encrypt_r
    EF

    ## Build Subversion
    cd $build_dir
    rm -rf $build_dir/subversion-1.3.2
    gunzip $
    tar xvf $src_dir/subversion-1.3.2.tar
    cd $build_dir/subversion-1.3.2

    CNFIG_SHELL="/usr/local/bin/bash"
    LDFLAGS="-lc -lcrypt -ltli -Wl,-brtl,-bI:/tmp/crypt.exp,-bI:/lib/pse.exp"
    export LDFLAGS CNFIG_SHELL

    /configure $prefix

    make
    make install

    strip $prefix/bin/svn*

    To unsubscribe, e-mail: users-unsubscribe (AT) subversion (DOT) tigris.org
    For additional commands, e-mail: users-help (AT) subversion (DOT) tigris.org

Re: Building static AIX client


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 0 =
QUESTION ON "Development"

EMSDN.COM