Re: Compiling SAMBA 2.0
On Fri, Dec 04, 1998 at 04:49:47PM +1100, Michael Anthon wrote:
> I tried to compile Samba 2.0.0beta1 the other day and ran into a little
> problem. Compilation failed in printing/printing.c with an error as
> follows...
>
> Compiling printing/printing.c
> printing/printing.c: In function `parse_lpq_bsd':
> printing/printing.c:266: `__ERROR__XX__NEVER_USE_STRCAT___' undeclared
> (first use this function)
> printing/printing.c:266: (Each undeclared identifier is reported only
> once
> printing/printing.c:266: for each function it appears in.)
> printing/printing.c:266: parse error before `;'
> printing/printing.c:267: parse error before `;'
> printing/printing.c: In function `parse_lpq_lprng':
> printing/printing.c:381: `__ERROR__XX__NEVER_USE_STRCAT___' undeclared
> (first use this function)
> printing/printing.c:381: parse error before `;'
> printing/printing.c:382: parse error before `;'
> make: *** [printing/printing.o] Error 1
>
> The line that causes this error is...
> strncat(buf->file," ",bufsize);
>
> What I did was to remove the following define from the include/include.h
> file ins the samba source tree.
>
> #ifdef strcat
> #undef strcat
> #endif /* strcat */
> #define strcat(dest,src) __ERROR__XX__NEVER_USE_STRCAT___;
>
> So, after all that, have I done the right thing?
glibc2.1 which we are using on Sparc defines optimized macros for several
string functions. Probably strncat is a macro which uses strcat internally
which breaks compilation of Samba.
So yes, you did the right thing.
Greetings,
Christian
PS.: Alternatively compilation with -D__NO_STRING_INLINES should work too.
--
Christian Meder, email: meder@isr.uni-stuttgart.de
What's the railroad to me ?
I never go to see
Where it ends.
It fills a few hollows,
And makes banks for the swallows,
It sets the sand a-blowing,
And the blackberries a-growing.
(Henry David Thoreau)
Reply to: