# [OmniOS-discuss] package build help

Doug Hughes doug at will.to
Tue Jan 27 00:15:14 UTC 2015

- Previous message: [OmniOS-discuss] package build help
- Next message: [OmniOS-discuss] Mildly confusing ZFS iostat output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On 1/26/2015 6:57 PM, Michael Rasmussen wrote:
    > On Tue, 27 Jan 2015 00:22:49 +0100
    > Michael Rasmussen <mir at miras.org> wrote:
    >
    >> On Mon, 26 Jan 2015 18:14:12 -0500
    >> Doug Hughes <doug at will.to> wrote:
    >>
    >>> Agh! ick. please don't use LD_LIBRARY_PATH. If at all possible, rebuild your binary with -R /opt/pgsql/lib passed to the linker
    >>>
    >> build.sh already contains:
    >> LDFLAGS64="$LDFLAGS64 -L/opt/pgsqL/lib/amd64 -R/opt/pgsql/lib/amd64"
    >> But does not help. Package I am build is a python package.
    >>
    > setup.py constructs this:
    > gcc -m64 -shared -Wl,-Bsymbolic
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/psycopgmodule.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/pqpath.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/typecast.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/microprotocols.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/microprotocols_proto.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/connection_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/connection_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/cursor_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/cursor_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/lobject_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/lobject_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_qstring.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pboolean.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_binary.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_asis.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_list.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_datetime.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pfloat.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pdecimal.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/utils.o -L/usr/lib/amd64
    > -L/opt/pgsql/lib/amd64 -lpython2.6 -lpq -o
    > build/lib.solaris-2.11-i86pc-2.6/psycopg2/64/_psycopg.so
    > [mir at pkg:psycopg2-2.0.14]$ ldd
    > build/lib.solaris-2.11-i86pc-2.6/psycopg2/64/_psycopg.so
    > libpython2.6.so.1.0 =>	 /usr/lib/64/libpython2.6.so.1.0
    > libpq.so.5 =>	 (file not found) libgcc_s.so.1
    > =>	 /usr/lib/64/libgcc_s.so.1 libc.so.1
    > =>	 /lib/64/libc.so.1 libsocket.so.1
    > =>	 /lib/64/libsocket.so.1 libnsl.so.1
    > =>	 /lib/64/libnsl.so.1 libm.so.2 =>	 /lib/64/libm.so.2
    > libmp.so.2 =>	 /lib/64/libmp.so.2 libmd.so.1
    > =>	 /lib/64/libmd.so.1
    >
    > if I change the above to contain -R/opt/pgsql/lib/amd64 it works:
    > gcc -m64 -shared -Wl,-Bsymbolic
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/psycopgmodule.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/pqpath.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/typecast.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/microprotocols.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/microprotocols_proto.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/connection_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/connection_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/cursor_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/cursor_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/lobject_type.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/lobject_int.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_qstring.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pboolean.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_binary.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_asis.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_list.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_datetime.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pfloat.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/adapter_pdecimal.o
    > build/temp.solaris-2.11-i86pc-2.6/psycopg/utils.o -L/usr/lib/amd64
    > -L/opt/pgsql/lib/amd64 -R/opt/pgsql/lib/amd64 -lpython2.6 -lpq -o
    > build/lib.solaris-2.11-i86pc-2.6/psycopg2/64/_psycopg.so
    > [mir at pkg:psycopg2-2.0.14]$ ldd
    > build/lib.solaris-2.11-i86pc-2.6/psycopg2/64/_psycopg.so
    > libpython2.6.so.1.0 =>	 /usr/lib/64/libpython2.6.so.1.0
    > libpq.so.5 =>	 /opt/pgsql/lib/amd64/libpq.so.5 libgcc_s.so.1
    > =>	 /usr/lib/64/libgcc_s.so.1 libc.so.1
    > =>	 /lib/64/libc.so.1 libsocket.so.1
    > =>	 /lib/64/libsocket.so.1 libnsl.so.1
    > =>	 /lib/64/libnsl.so.1 libm.so.2 =>	 /lib/64/libm.so.2
    > libssl.so.1.0.0 =>	 /lib/64/libssl.so.1.0.0 libcrypto.so.1.0.0
    > =>	 /lib/64/libcrypto.so.1.0.0 libpthread.so.1
    > =>	 /lib/64/libpthread.so.1 libmp.so.2
    > =>	 /lib/64/libmp.so.2 libmd.so.1 =>	 /lib/64/libmd.so.1
    > libz.so =>	 /usr/lib/64/libz.so

    ldd -s should show you the search path that your built object is
    actually using

- Previous message: [OmniOS-discuss] package build help
- Next message: [OmniOS-discuss] Mildly confusing ZFS iostat output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the OmniOS-discuss mailing list