Help: shared library must be position independent .... - HP UX

This is a discussion on Help: shared library must be position independent .... - HP UX ; Hello everyone: I need help getting rid of this problem, please. I have trying to compile and install this without success. Is there any solution to this. When I run make this is what I get: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvv gcc -c ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Help: shared library must be position independent ....

  1. Help: shared library must be position independent ....

    Hello everyone: I need help getting rid of this problem, please. I
    have trying to compile and install this without success. Is there any
    solution to this. When I run make this is what I get:

    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvv
    gcc -c -I/usr/local/include/openssl -D_HPUX_SOURCE -mpa-risc-2-0 -
    fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/
    include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -O -
    DVERSION=\"0.57\" -DXS_VERSION=\"0.57\" -fPIC "-I/opt/perl5/lib/5.8.8/
    PA-RISC2.0-11.11-NTM-ODBD/CORE" SSLeay.c
    Running Mkbootstrap for Crypt::SSLeay ()
    chmod 644 SSLeay.bs
    rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.sl
    /usr/bin/ld -b -L/usr/local/lib SSLeay.o -o blib/arch/auto/
    Crypt/SSLeay/SSLeay.sl \
    -L/usr/local/lib -lssl -lcrypto -lgcc \

    /usr/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /usr/
    local/lib/libssl.a(s2_clnt.o) - shared library must be position
    independent. Use +z or +Z to recompile.
    *** Error exit code 1

    Stop.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    My box info:
    HP-UX hostname B.11.11 U 9000/800

    gcc:
    Thread model: posix
    gcc version 4.2.3
    ----------------------------------------------------------------------------
    Any help will be appreciated

    Uzoma.

  2. Re: Help: shared library must be position independent ....

    whatifyouwereme@gmail.com wrote:
    > /usr/bin/ld -b -L/usr/local/lib SSLeay.o -o blib/arch/auto/
    > Crypt/SSLeay/SSLeay.sl \
    > -L/usr/local/lib -lssl -lcrypto -lgcc \
    >
    > /usr/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /usr/
    > local/lib/libssl.a(s2_clnt.o) - shared library must be position
    > independent. Use +z or +Z to recompile.
    > *** Error exit code 1


    ld is generating a shared library "SSLeay.sl", hence it cannot use
    archive libssl.a (mostly non-PIC) as input. Try ...

    1> finding libssl.sl/so and provide proper path to ld.
    or
    2> building libssl.sl & step 1
    or
    3> building libssl.a with PIC flag (+z,+Z option HP-C compiler)

    --vishwas

  3. Re: Help: shared library must be position independent ....

    whatifyouwereme@gmail.com wrote:
    > Is there any solution to this.
    > ld -b SSLeay.o -lssl -lcrypto -lgcc
    > /usr/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file
    > libssl.a(s2_clnt.o) - shared library must be position
    > independent. Use +z or +Z to recompile.


    The only way to fix this is to remove -lssl from your link line. And
    link libssl into your executables.
    Or create a shared version of libssl.

    Vishwas Pai wrote:
    > ld is generating a shared library "SSLeay.sl", hence it cannot use
    > archive libssl.a
    > 1> finding libssl.sl/so and provide proper path to ld.
    > 2> building libssl.sl & step 1
    > 3> building libssl.a with PIC flag (+z,+Z option HP-C compiler)


    Right.

+ Reply to Thread