How do I compile 64 bit Samba on Solaris 8?
Eric Boehm
boehm at nortelnetworks.com
Tue Jul 30 17:22:02 GMT 2002
On Tue, Jul 30, 2002 at 03:38:59PM -0700, Dennis, David M. wrote:
>>>>> "Dave" == Dennis, David M <dmd at seattleu.edu> 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
boehm at nortelnetworks.com \ / No HTML or RTF in mail
X No proprietary word-processing
Respect Open Standards / \ files in mail
More information about the samba-technical
mailing list