Compile problem on Solaris --with-smbwrapper
samba-technical at thewrittenword.com
samba-technical at thewrittenword.com
Tue Oct 16 08:12:57 GMT 2001
On Tue, Oct 16, 2001 at 09:15:41AM -0400, David Collier-Brown wrote:
> The command is
> ld -shared -o bin/smbwrapper.so
> the message is
> ld: fatal: option -h and building a dynamic executable are
> incompatible
> This is from the -shared, which is gcc-specific, but I'm using cc,
> so it fails with puzzling error messages
> When I change -sharedwhich smbsh to -G, all I get is
> ---
> ld.so.1: smbsh: fatal: relocation error: file
> /usr/local/samba/bin/smbwrapper.so: symbol charset_initialize:
> referenced symbol not found
How's this patch?
--
albert chin (china at thewrittenword.com)
-- snip snip
--- source/smbwrapper/smbw.c.orig Tue Oct 16 09:15:51 2001
+++ source/smbwrapper/smbw.c Tue Oct 16 09:15:57 2001
@@ -73,7 +73,7 @@
exit(1);
}
- charset_initialize();
+ charset_initialise();
in_client = True;
@@ -85,7 +85,7 @@
lp_load(servicesf,True,False,False);
- charset_initialize();
+ charset_initialise();
get_myname(global_myname);
--- source/configure.in.orig Tue Oct 16 09:05:35 2001
+++ source/configure.in Tue Oct 16 09:09:06 2001
@@ -746,7 +746,10 @@
PICFLAG="-fPIC"
;;
*solaris*) AC_DEFINE(SUNOS5)
- ;;
+
+ # Solaris linker uses -G for shared libraries
+ test "$GCC" != yes && LDSHFLAGS="-G"
+ ;;
*sunos*) AC_DEFINE(SUNOS4)
;;
*bsd*) LDSHFLAGS="-shared -Bshareable"
@@ -769,11 +772,16 @@
PICFLAG="+z"
fi
;;
- *qnx*) AC_DEFINE(QNX);;
- *osf*) AC_DEFINE(OSF1);;
- *sco*) AC_DEFINE(SCO);;
- *next2*) AC_DEFINE(NEXT2);;
- *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);;
+ *qnx*) AC_DEFINE(QNX)
+ ;;
+ *osf*) AC_DEFINE(OSF1)
+ ;;
+ *sco*) AC_DEFINE(SCO)
+ ;;
+ *next2*) AC_DEFINE(NEXT2)
+ ;;
+ *dgux*) AC_CHECK_PROG(ROFF, groff, [groff -etpsR -Tascii -man])
+ ;;
*sysv4*)
case "$host" in
*-univel-*) if [ test "$GCC" != yes ]; then
@@ -783,13 +791,11 @@
;;
*mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX);;
esac
- ;;
+ ;;
*sysv5*)
- if [ test "$GCC" != yes ]; then
- AC_DEFINE(HAVE_MEMSET)
- fi
+ test "$GCC" != yes && AC_DEFINE(HAVE_MEMSET)
LDSHFLAGS="-G"
- ;;
+ ;;
esac
# try to work out how to produce pic code with this compiler
More information about the samba-technical
mailing list