FW: Problem compiling Samba 3.0 (with winbindd) on HP-UX - one m ore thing...

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Tue Mar 5 08:10:53 GMT 2002


Hi Mike,
Here is the diff output for all the stuff I changed to get samba to compile
--with-pam --with-winbind on HP-UX 11.x;
It includes a fix to the latest problem you encountered about the loader
fixup error.
Let me know how it goes.  I also submitted this diff to bugs.samba.org, so
hopefully one of the team
will pick this up.  I'm sure they will have a better solution to some of the
issues than what I 
cobbeled together, but this should get you going until then.

Don

Index: Makefile.in
===================================================================
RCS file: /cvsroot/samba/source/Makefile.in,v
retrieving revision 1.443
diff -i -r1.443 Makefile.in
324c324
< PAM_WINBIND_OBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po
lib/snprintf.o
---
> PAM_WINBIND_OBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po
lib/snprintf.p
o
Index: configure
===================================================================
RCS file: /cvsroot/samba/source/configure,v
retrieving revision 1.271
diff -i -r1.271 configure
8661,8662c8661,8663
<                               #BLDSHARED="true"
<                               LDSHFLAGS="-b -z +h \$@"
---
>                               BLDSHARED="true"
>                               SHLD="/usr/bin/ld"
>                               LDSHFLAGS="-B symbolic -b -z +h \$@"
8780a8782,8786
>       if test $ac_cv_prog_cc_Ae = yes; then
>    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c
&&
>      $SHLD $LDSHFLAGS -o shlib.so shlib.po &&
>      ac_cv_shlib_works=yes
>       else
8783a8790
>       fi
13445c13452
<         *linux*|*solaris*|*irix*)
---
>         *linux*|*solaris*|*irix*|*hpux11*)
Index: configure.in
===================================================================
RCS file: /cvsroot/samba/source/configure.in,v
retrieving revision 1.288
diff -i -r1.288 configure.in
766,767c766,768
<                               #BLDSHARED="true"
<                               LDSHFLAGS="-b -z +h \$@"
---
>                               SHLD="/usr/bin/ld"
>                               BLDSHARED="true"
>                               LDSHFLAGS="-B symbolic -b -z +h \$@"
824a826,831
>       # call ld directly for HP-UX
>       if test $ac_cv_prog_cc_Ae = yes; then
>    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c
&&
>      $LD $LDSHFLAGS -o shlib.so shlib.po &&
>      ac_cv_shlib_works=yes
>       else
827a835
>       fi
Index: nsswitch/pam_winbind.h
===================================================================
RCS file: /cvsroot/samba/source/nsswitch/pam_winbind.h,v
retrieving revision 1.5
diff -i -r1.5 pam_winbind.h
28c28
< #if defined(SUNOS5) || defined(SUNOS4)
---
> #if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX)
Index: nsswitch/winbind_nss_solaris.c
===================================================================
RCS file: /cvsroot/samba/source/nsswitch/winbind_nss_solaris.c,v
retrieving revision 1.3
diff -i -r1.3 winbind_nss_solaris.c
14d13
< #include <sys/syslog.h>
18,19c17
< #ifdef HAVE_NSS_COMMON_H
<
---
> #if defined(HAVE_NSS_COMMON_H) || defined(HPUX)
277c275
< #endif /* SUN_NSS */
---
> #endif /* HAVE_NSS_COMMON_H or HPUX */
-----Original Message-----
From: Mike [mailto:samba at miratek.com]
Sent: Tuesday, March 05, 2002 10:56 AM
To: 'MCCALL,DON (HP-USA,ex1)'
Subject: RE: Problem compiling Samba 3.0 (with winbindd) on HP-UX - one
more thing...



Hi Don,

Thank you for all the info. Maybe we are working with different source
files. I pulled down the latest CVS for HEAD. After running configure
and inspecting config.cache I did not find the line 
ac_cv_shlib_works=${ac_cv_shlib_works=no}

I compared configure file from the HEAD with 2-2-3a and also I found an
e-mail from you advising some one to make changes in the configure file.
The current configure file has the following:

                        # Use special PIC flags for the native HP-UX
compiler.
                        if test $ac_cv_prog_cc_Ae = yes; then
                                #BLDSHARED="true"
                                LDSHFLAGS="-b -z +h \$@"
                                PICFLAG="+z"
                        fi
I changed it to:
                        if test $ac_cv_prog_cc_Ae = yes; then
                                BLDSHARED="true"
                                SHLD="/usr/bin/ld"
                                LDSHFLAGS="-B symbolic -b -z +h \$@"
                                PICFLAG="+z"
                        fi
I also did not fine the line "# include <syslog/syslog.h>" in
nsswitch/winbind_nss_solaris.c, instead I found " include
<sys/syslog.h>" so I removed it.

After running configure I found the line 
   ac_cv_shlib_works=${ac_cv_shlib_works=no}
and I changed it to yes and ran configure again.

When I ran make I got the following error:
.
.
.

cc: "nsswitch/pam_winbind.c", line 591: warning 563: Argument #3 is not
the cor.
Compiling nsswitch/wb_common.c with +z
Linking nsswitch/pam_winbind.so
/usr/bin/ld: (Warning) Ignoring -O option.  -b will override -O 
/usr/bin/ld: Invalid loader fixup in text space needed in output file
for symbo"
*** Error exit code 1

Stop.

I will try to continue working on it this afternoon. If you have an idea
what might be causing this error please let me know.

Mike

-----Original Message-----
From: MCCALL,DON (HP-USA,ex1) [mailto:don_mccall at hp.com]
Sent: Monday, March 04, 2002 5:08 PM
To: MCCALL,DON (HP-USA,ex1); 'samba at miratek.com'
Cc: 'samba-technical at lists.samba.org'
Subject: RE: Problem compiling Samba 3.0 (with winbindd) on HP-UX - one
more thing...


Mike,
ONE MORE THING (sorry) - you will also need to edit 
winbind_nss_solaris.c

to change 
#ifdef HAVE_NSS_COMMON_H
to:
#if defined(HAVE_NSS_COMMON_H) || defined(HPUX)

Hope this helps,
Don

-----Original Message-----
From: MCCALL,DON (HP-USA,ex1) 
Sent: Monday, March 04, 2002 4:53 PM
To: 'samba at miratek.com'; MCCALL,DON (HP-USA,ex1)
Cc: 'samba-technical at lists.samba.org'
Subject: RE: Problem compiling Samba 3.0 (with winbindd) on HP-UX


Hi Mike,
Problem is that at 3.0, the team added a 'real' test to verify that a
shared
library can be built on the target os, and if not, then the Makefile is
created without the appropriate stuff to build nsswitch/libnss_winbind,
etc....
Problem is that this test assumes that the you can build a shared
library by
going THRU the cc compiler, giving the appropriate loader flags to be
passed
on into the ld program.  On HP-UX's ansi c compiler, thats a bad
assumption,
so the test fails, because configure doesn't call the 'ld' program
directly
with the shared library flags.
I'm looking into how we could change configure and configure.in to take
this
into account for HP-UX, but in the meantime, you can work around this by
editing your config.cache and changing the line:
from
ac_cv_shlib_works=${ac_cv_shlib_works=no}
to
ac_cv_shlib_works=${ac_cv_shlib_works=yes}
and rerunning configure.

You will know it worked by checking your Makefile for the following
lines:

WINBIND_PAM_PROGS = nsswitch/pam_winbind.so
WINBIND_LPROGS = nsswitch/libnss_winbind.so

I found a couple of other problems that we resolved at 2.2.3a that
haven't
apparently made it to head yet:

in nsswitch/winbind_nss_solaris.c
REMOVE the following line:
#include <syslog/syslog.h>

in nsswitch/pam_winbind.h
change the following line from:
#if defined(SUNOS5) || defined(SUNOS4) 
to:
#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX)

I haven't actually verified head and winbind on HPUX 11 yet, but this
should
get you past the configure/make issues....

Good luck,
Don

-----Original Message-----
From: Mike [mailto:samba at miratek.com]
Sent: Sunday, March 03, 2002 1:37 AM
To: 'MCCALL,DON (HP-USA,ex1)'
Subject: RE: Problem compiling Samba 3.0 on HP-UX



Hi Don,

This seemed to stop the make error. Something is still missing or not
working with winbbindd on HPUX ARE in the latest SAMBA 3.0 cvs. Did it
work for you?

I ran configure using the custom script you sent me long time ago, then
ran make and then make install. It seems that all the binaries were
created and I was able to execute them. The only think that looks that
is missing is the "pam_winbind.so" and "libnss_winbind.so". The two
files were not in the source/nsswitch directory or any where else.

I am attaching the configure script and the logs from configure and
make. Please let me know if you know what is the problem or the fix.

Thanks,

Mike 

-----Original Message-----
From: MCCALL,DON (HP-USA,ex1) [mailto:don_mccall at hp.com]
Sent: Thursday, February 28, 2002 5:54 PM
To: 'samba at miratek.com'; MCCALL,DON (HP-USA,ex1)
Subject: RE: Problem compiling Samba 3.0 on HP-UX



Hi Mike,
problem appears to be that Makefile is using the environment variable AR
to
tell where the (ar) command is, and the AR variable is not set;
Until I figure out why, you can workaround this by doing the following
before running make:

export AR=/usr/bin/ar


Let me know how it comes out,
Don
-----Original Message-----
From: Mike [mailto:samba at miratek.com]
Sent: Thursday, February 28, 2002 11:20 AM
To: 'MCCALL,DON (HP-USA,ex1)'
Subject: Problem compiling Samba 3.0 on HP-UX


Hi Don,

I am trying to compile Samba Version 3.0-alpha15 on HP-UX 11 since I was
told that the latest HEAD have 'winbind use default domain' feature.
Which will allow users to login without specifying domain name.

The configuration step was fine, when I ran make I got the following
error. I appreciate it if you can help me with error and did the changes
that put in samba-2.3 to make winbind and PAM work with Hp-UX 11 are in
3.0? I just want to make sure that Samba 3.0 and winbind will work with
HP-UX 11.

Thanks,

Mike,


The error:
.
.
.
Compiling ubiqx/debugparse.c with +z
cpp: "/usr/include/sys/xti.h", line 488: warning 2001: Redefinition of
macro TCP
_NODELAY.
cpp: "/usr/include/sys/xti.h", line 489: warning 2001: Redefinition of
macro TCP
_MAXSEG.
Linking libsmbclient non-shared library bin/libsmbclient.a
         -rc bin/libsmbclient.a libsmb/libsmbclient.po lib/charcnv.po
lib/debug.
po lib/fault.po  lib/getsmbpass.po lib/interface.po lib/md4.po
lib/interfaces.p
o lib/pidfile.po lib/replace.po  lib/signal.po lib/system.po lib/time.po
lib/uf
c.po lib/genrand.po lib/username.po  lib/util_getent.po lib/util_pw.po
lib/acces
s.po lib/smbrun.po  lib/bitmap.po lib/crc32.po lib/snprintf.po
lib/dprintf.po  l
ib/xfile.po lib/wins_srv.po  lib/util_str.po lib/util_sid.po
lib/util_unistr.po
 lib/util_file.po  lib/util.po lib/util_sock.po lib/util_sec.po
smbd/ssl.po  lib
/talloc.po lib/hash.po lib/substitute.po lib/fsusage.po
lib/ms_fnmatch.po lib/s
elect.po lib/error.po lib/messages.po  lib/tallocmsg.po
lib/dmallocmsg.po  lib/m
d5.po lib/hmacmd5.po lib/iconv.po lib/smbpasswd.po
nsswitch/wb_client.po nsswit
ch/wb_common.po  lib/pam_errors.po intl/lang_tdb.po lib/account_pol.po
tdb/tdb.
po tdb/spinlock.po tdb/tdbutil.po   libsmb/clientgen.po
libsmb/cliconnect.po lib
smb/clifile.po  libsmb/clikrb5.po libsmb/clispnego.po libsmb/asn1.po
libsmb/cli
rap.po libsmb/clierror.po libsmb/climessage.po  libsmb/clireadwrite.po
libsmb/cl
ilist.po libsmb/cliprint.po  libsmb/clitrans.po libsmb/clisecdesc.po
libsmb/clid
gram.po  libsmb/namequery.po libsmb/nmblib.po libsmb/clistr.po
libsmb/nterr.po 
libsmb/smbdes.po libsmb/smbencrypt.po  libsmb/smberr.po
libsmb/credentials.po li
bsmb/pwd_cache.po  libsmb/clioplock.po libsmb/errormap.po
libsmb/clirap2.po  lib
smb/passchange.po libsmb/unexpected.po rpc_parse/parse_prs.po
rpc_parse/parse_se
c.po  rpc_parse/parse_misc.po  libads/ldap.po libads/ldap_printer.po
libads/sasl
.po  libads/krb5_setpw.po libads/kerberos.po  libads/ads_struct.po
libads/ads_st
atus.po passdb/secrets.po  libads/util.po param/loadparm.po
param/params.po dync
onfig.po ubiqx/ubi_BinTree.po ubiqx/ubi_Cache.po ubiqx/ubi_SplayTree.po
ubiqx/u
bi_dLinkList.po ubiqx/ubi_sLinkList.po ubiqx/debugparse.po 
Make: Cannot load -rc.  Stop.
*** Error exit code 1 (ignored)





More information about the samba-technical mailing list