How do I compile 64 bit Samba on Solaris 8?

2002-07-30 Thread John Emmert

I haven't found any docs on how to do this. Can someone point me in the right 
direction? I've got Forte compiler 6.2 and the sun linker and assembler in my path, 
but not gcc. Is it an option I give to configure? Do I have to use gcc?

-
Protect yourself from spam, use http://sneakemail.com




RE: How do I compile 64 bit Samba on Solaris 8?

2002-07-30 Thread Dennis, David M.

Regarding compiling on solaris:

1) make sure the environment variable CC is set to the proper compiler.  If
gcc then $CC needs 'gcc' and if Forte on Sun then $CC=cc .

2) ensure the proper paths, the Sun Companion CD puts gcc in
/opt/sfw/bin/gcc .  

3) LD_LIBRARY_PATH must include non-standard Solaris libs, /usr/local/lib is
NOT standard on Solaris.

4) If you have Forte your PATH should be something like /opt/SUNWspro/bin
ahead of everything, and /opt/sfw/bin or /usr/local/bin last .
LD_LIBRARY_PATH should likewise have /opt/SUNWspro/lib ahead of everything
else.

There was also just recently a patch posted for smbwrapper for samba, if
your compile is failing with that email me and I'll send it along.

Hope that helps, anyone feel free to add corrections to the above, I am
still learning these myself!

-Dave


+--
+ David M. Dennis
+ Network Administrator, IT
+ Seattle University
+ 206-296-5543, x5543
+--


-Original Message-
From: John Emmert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: How do I compile 64 bit Samba on Solaris 8?


I haven't found any docs on how to do this. Can someone point me in the
right direction? I've got Forte compiler 6.2 and the sun linker and
assembler in my path, but not gcc. Is it an option I give to configure? Do I
have to use gcc?

-
Protect yourself from spam, use http://sneakemail.com




Re: How do I compile 64 bit Samba on Solaris 8?

2002-07-30 Thread Eric Boehm

On Tue, Jul 30, 2002 at 03:38:59PM -0700, Dennis, David M. wrote:
 Dave == Dennis, David M [EMAIL PROTECTED] writes:

Dave Regarding compiling on solaris: 1) make sure the environment
Dave variable CC is set to the proper compiler.  If gcc then $CC
Dave needs 'gcc' and if Forte on Sun then $CC=cc .

Dave 2) ensure the proper paths, the Sun Companion CD puts gcc in
Dave /opt/sfw/bin/gcc .

Dave 3) LD_LIBRARY_PATH must include non-standard Solaris libs,
Dave /usr/local/lib is NOT standard on Solaris.

Might be best to unset LD_LIBRARY_PATH

Dave 4) If you have Forte your PATH should be something like
Dave /opt/SUNWspro/bin ahead of everything, and /opt/sfw/bin or
Dave /usr/local/bin last .  LD_LIBRARY_PATH should likewise have
Dave /opt/SUNWspro/lib ahead of everything else.

Dave There was also just recently a patch posted for smbwrapper
Dave for samba, if your compile is failing with that email me and
Dave I'll send it along.

Dave Hope that helps, anyone feel free to add corrections to the
Dave above, I am still learning these myself!

John I haven't found any docs on how to do this. Can someone
John point me in the right direction? I've got Forte compiler 6.2
John and the sun linker and assembler in my path, but not gcc. Is
John it an option I give to configure? Do I have to use gcc?

I believe I've posted instructions on this several times in the past.

Assuming that you have cc in your PATH and the CC=cc

A. For Bourne/Korn Shells

   1. For Sun's Forte compiler
  
  CC=cc  CPPFLAGS='-D__EXTENSIONS__' CFLAGS='-xarch=v9a'  \
./configure args-to-configure

   2. For gcc 3.x or better

  CC=gcc CPPFLAGS='-D__EXTENSIONS__' CFLAGS='-m64' \
./configure args-to-configure

B. For Csh and derivatives

   1. For Sun's Forte compiler
  
  setenv CC   cc \
  setenv CPPFLAGS '-D__EXTENSIONS__' \
  setenv CFLAGS   '-xarch=v9a'   \
./configure args-to-configure

   2. For gcc 3.x or better

  setenv CC   gcc\
  setenv CPPFLAGS '-D__EXTENSIONS__' \
  setenv CFLAGS   '-m64' \
./configure args-to-configure

The CPPFLAGS='-D__EXTENSIONS__' is necessary because configure doesn't
(yet) include crypt.h and crypt gets the wrong prototype in a 64-bit
application, leading to a SIGSEGV in swat

If you experience difficulties linking some shared objects, it's
because the definition of SHLD doesn't include CFLAGS. The workaround
is

make SHLD='${CC} ${CFLAGS}' 

when building Samba

You could also use '-xarch=v9' or 'xarch=v9b' for UltraSparc III or
'-xarch=native64' instead of '-xarch=v9a'

-- 
Eric M. Boehm  /\  ASCII Ribbon Campaign
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail