Anyone manage to build bin/libsmbclient.sl on HP-UX 11.x for 3.0.28?

Albert Chin samba-technical at mlists.thewrittenword.com
Wed Feb 20 11:01:40 GMT 2008


I've tried building 3.0.28 with --with-libsmbclient on HP-UX 11.23/PA
but bin/libsmbclient.sl won't build:
  $ gtar zxf /opt/src/latest/fs/samba-3.0.28/src/samba-3.0.28.tar.gz
  $ cd samba-3.0.28/source
  $ ./configure --without-ldap --with-libsmbclient
  ...
  $ gmake
  ...
  Linking libsmbclient shared library bin/libsmbclient.sl
  /usr/ccs/bin/ld: Invalid loader fixup in text space needed in output file for symbol "wkssvc_authservice_strings" in input file "librpc/gen_ndr/ndr_wkssvc.o"
  gmake: *** [bin/libsmbclient.sl] Error 1

Here's how librpc/gen_ndr/ndr_wkssvc.o is compiled:
  cc -I. -I/opt/build/china/samba-3.0.28/source  -O -D_SAMBA_BUILD_=3 -AC99 -D_MACHINE_SYS_GETPPDP_INCLUDED -AC99 -I/opt/build/china/samba-3.0.28/source/popt -I/opt/build/china/samba-3.0.28/source/iniparser/src -Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H  -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL    -I/opt/build/china/samba-3.0.28/source/lib -D_SAMBA_BUILD_=3 +z -c librpc/gen_ndr/ndr_wkssvc.c -o librpc/gen_ndr/ndr_wkssvc.o >/dev/null 2>&1

>From cc(1):
      +Olit=level    Controls which data items are placed in the read-only
                     data section.  The defined values for level are:

                          all  All string literals and all const-qualified
                               variables that do not require load-time or
                               run-time initialization will be placed in the
                               read-only data section.  +Olit=all is
                               equivalent to the +ESlit option.

                          const
                               All string literals appearing in a context
                               where const char * is legal, and all const-
                               qualified variables that do not require
                               load-time or run-time initialization will be
                               placed in the read-only data section.
                               +Olit=const is equivalent to the +ESconstlit
                               option.

                          none No constants are placed in the read-only data
                               section.  +Olit=none is equivalent to the
                               +ESnolit option.

                     The default is +Olit=const

Building librpc/gen_ndr/ndr_wkssvc.o with +Olit=none solves the
problem.

>From http://www.docs.hp.com/en/B2355-90654/ch04s07.html:
  Using the +ESlit Option to cc

  Normally, the C compiler places constant data in the data space. If
  such data is used in a shared library, each process will get its own
  copy of the data, in spite of the fact that the data is constant and
  should not change. This can result in some performance degradation.

  To get around this, use the C compiler's +ESlit option, which places
  constant data in the $LIT$ text space instead of the data space. This
  results in one copy of the constant data being shared among all
  processes that use the library.
	
    NOTE: This option requires that programs not write into
    constant strings and data. In addition, structures with embedded
    initialized pointers won't work because the pointers cannot be
    relocated since they are in read-only $TEXT$ space. In this case, the
    linker outputs the error message "Invalid loader fixup needed".

-- 
albert chin (china at thewrittenword.com)


More information about the samba-technical mailing list