[Derek, I'm cc'ing the Samba list so that others can chime in.]
Derek Winkler <derek@aim-systems.on.ca> wrote:>
> Having a couple problems with Samba:
>
> First Samba 1.9.18p6 doesn't compile under SCO Unix 3.2v4.2:
>
> Linking smbd
> undefined first referenced
> symbol in file
> getpagesize slprintf.o
> mprotect slprintf.o
> memalign slprintf.o
> ld fatal: Symbol referencing errors. No output written to smbd
> *** Error code 13
>
> Stop.
> #
Yes, unfortunately SCO 3.2v4.2 doesn't have these functions. I
created dummy implementations so that I could link.
The vslprintf() function is not very portable as it's now written.
Does anyone recognize memalign()? I couldn't find ANY in-house *nix
system with this function. Checked SCO 3.2v4.2, SCO OSR 5.0.4, RedHat
Linux 4.2, AIX 4.2.1, and Digital Unix 4.0A. And mprotect() should
be conditional within USE_MMAP.
> Also I keep getting errors when linking that it can't find .o files in
the
> subdirectories, when compiling them it creates for instance ubi_dLinkList.o
in
> the parent directory but when linking expects it to be in the subdirectory
> ubiqx. I've been getting around this by copying the .o's into the
> subdirectories.
>
> Please email directly with solutions.
>
> Thanks in advance.
I seem to recall that others have solved this problem on various
platforms by patching the Makefile. Try searching the Samba list
archives for a solution. Or try CC=gcc (if you have gcc).
Here are my patches to build Samba 1.9.18p6 on SCO ODT 3.0. I used
the Makefile entry for TCB passwords and CC=gcc. Please note that,
thus far, I've only compiled and linked the code. I haven't tested
it yet!
*** Makefile.orig Mon May 11 04:37:44 1998
--- Makefile Mon May 11 17:35:18 1998
***************
*** 74,76 ****
# might have to create a separate guest account that can print.
! GUESTACCOUNT = nobody
--- 74,77 ----
# might have to create a separate guest account that can print.
! # GUESTACCOUNT = nobody
! GUESTACCOUNT = nouser
***************
*** 496,500 ****
# Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
! # CC = cc
! # FLAGSM = -DSCO -DSecureWare
! # LIBSM = -lprot_s -lcrypt -lsocket -lm -lc_s
--- 497,501 ----
# Tested on "Open enterprise 3.0". Contributed by lance@fox.com.
! CC = gcc
! FLAGSM = -DSCO -DSecureWare -DALLOW_CHANGE_PASSWORD
! LIBSM = -lprot_s -lcrypt -lsocket -lintl -lm -lc_s
*** includes.h.orig Mon May 11 04:37:45 1998
--- includes.h Mon May 11 17:36:13 1998
***************
*** 769,771 ****
#define ftruncate(f,l) syscall(0x0a28,f,l)
! #define USE_IFREQ
#define NO_INITGROUPS
--- 769,771 ----
#define ftruncate(f,l) syscall(0x0a28,f,l)
! /* #define USE_IFREQ */ /* tjp */
#define NO_INITGROUPS
***************
*** 777,778 ****
--- 777,779 ----
#define NO_GETRLIMIT
+ extern int strcasecmp(char *,char *); /* tjp */
#endif /* SCO */
*** slprintf.c.orig Mon May 11 03:02:04 1998
--- slprintf.c Mon May 11 17:47:47 1998
***************
*** 25,26 ****
--- 25,43 ----
+ #ifdef SCO /* tjp */
+ int getpagesize(void)
+ {
+ return(4096);
+ }
+
+ void *memalign(int pagesize,int size)
+ {
+ return(malloc(size));
+ }
+
+ int mprotect(char *buf,int pagesize,int flags)
+ {
+ return(0);
+ }
+ #endif /* SCO */
+
int vslprintf(char *str, int n, char *format, va_list ap)
-- end of patches --
--
Thomas J. Pinkl 738 Louis Drive
Unix Systems Programmer Warminster, Pa 18974
Health Business Systems, Inc. (215) 442-9300 x9260