Thread View: news.software.nn
4 messages
4 total messages
Started by Craig Dewick
Wed, 11 Sep 1996 00:00
nn 6.5.1 build error in 'db.c' with CACHE_PURPOSE is defined
Author: Craig Dewick
Date: Wed, 11 Sep 1996 00:00
Date: Wed, 11 Sep 1996 00:00
45 lines
2036 bytes
2036 bytes
When attempting to build nn-6.5.1 on this machine, a Sun 4/380 running
SunOS 4.1.4 with gcc-2.6.3, I encountered a problem with 'db.c'.
Here is the output from the build session if I try to build nn right now:
make -f ymakefile all
make[1]: Entering directory `/mnt/azwan/nn-6.5.1'
cc -Iconf -O -c db.c
"db.c", line 1233: syntax error at or near variable name "const"
"db.c", line 1237: const undefined
make[1]: *** [db.o] Error 1
make[1]: Leaving directory `/mnt/azwan/nn-6.5.1'
make: *** [all] Error 2
Here's the code fragment from 'db.c'
#ifdef CACHE_PURPOSE
static int
purpcmp(p0, p1)
const void *p0, *p1; <---- this is line 1233
{
return strcmp( ((struct purp_list *)p0)->group_name,
((struct purp_list *)p1)->group_name );
}
Note that this section of code is only being built because I have defined
CACHE_PURPOSE in the config file as a result of using NOV to access the
overview database maintained by Inn. Something is obviously wrong, but I'm
not a C guru so I'm kind of up against the preverbial brick wall.
If you can suggest a solution (even if it's extrememly simple - I'm still
kind of naive about some aspects of C), please post it here so everyone
can benefit.
Regards,
Craig.
--
Craig Dewick. Send email to 'cdewick@jedi.apana.org.au'
Point a web browser at 'http://jedi.apana.org.au/~cdewick' to
access my collection of Sun information and links to other places.
Re: nn 6.5.1 build error in 'db.c' with CACHE_PURPOSE is defined
Author: Matthew England
Date: Wed, 11 Sep 1996 00:00
Date: Wed, 11 Sep 1996 00:00
68 lines
2967 bytes
2967 bytes
cdewick@jedi.apana.org.au (Craig Dewick) writes:
>When attempting to build nn-6.5.1 on this machine, a Sun 4/380 running
>SunOS 4.1.4 with gcc-2.6.3, I encountered a problem with 'db.c'.
>make -f ymakefile all
>make[1]: Entering directory `/mnt/azwan/nn-6.5.1'
>cc -Iconf -O -c db.c
>"db.c", line 1233: syntax error at or near variable name "const"
>"db.c", line 1237: const undefined
>make[1]: *** [db.o] Error 1
>make[1]: Leaving directory `/mnt/azwan/nn-6.5.1'
>make: *** [all] Error 2
(fyi, many folks name their GNU C executable "gcc" so that they can
still access their "native" compiler if need be.)
>Here's the code fragment from 'db.c'
>#ifdef CACHE_PURPOSE
>static int
>purpcmp(p0, p1)
>const void *p0, *p1; <---- this is line 1233
>{
> return strcmp( ((struct purp_list *)p0)->group_name,
> ((struct purp_list *)p1)->group_name );
>}
fyi, the 'const' keyword is new to ANSI C compared to the language
specified in the original book written by Kernigan & Ritchie, which is
commonly referred to as K&R C. Or so Kernigan & Ritchie Second Edition
says.
Have you tried running gcc with the -ansi switch (it doesn't appear
that it's used above)? eg, here is the makefile header that I used for
my 6.5.1 build over the weekend on a Solaris2 (SunOS 5.4 in this case;
SunOS 4.1.x, for the most part, is commonly referred to as Solaris1)
machine:
--
CC = /usr/local/bin/gcc -ansi
#CPP = /opt/gnu/lib/gcc-lib/sparc-sun-solaris2/2.5.6/cpp
CPP = $(CC) -E
#CFLAGS = -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK
CFLAGS = -O
#-Wall -Wcomment \
#-Wtraditional -Wshadow \
#-Wpointer-arith -Wcast-qual -Wcast-align -Wconversion \
#-Waggregate-return -Wmissing-prototypes -Wnested-externs
#LDFLAGS = -s # -lmalloc # /usr/local/lib/malloc-debug/libmalloc.a
MAKE = /usr/local/bin/gmake
--
Notice the first line.
I haven't tried building on a Solaris1 machine (we've got a couple of
them that can run gcc) yet. Let me know if you're have problems after
using '-ansi' and I'll try it on my system.
Matt
--
Matthew England
Systems Engineer | voice: (630) 325-4151
National Peripherals Inc. (NPI), an MTI Company | fax: (630) 325-4230
1111 Pasquinelli Drive, Westmont, IL, 60559, USA | mengland@npi.com
Re: nn 6.5.1 build error in 'db.c' with CACHE_PURPOSE is defined
Author: Craig Dewick
Date: Sat, 14 Sep 1996 00:00
Date: Sat, 14 Sep 1996 00:00
28 lines
1489 bytes
1489 bytes
In <5141e4$fls@jedi.apana.org.au> cdewick@jedi.apana.org.au (Craig Dewick) writes:
>When attempting to build nn-6.5.1 on this machine, a Sun 4/380 running
>SunOS 4.1.4 with gcc-2.6.3, I encountered a problem with 'db.c'.
Ok, I tried commenting out 'CACHE_PURPOSE' and 'db.c' compiled without any
errors.
However, now I've found another one which I think might be
platform-specific....
In libnov.c, on line 403, there is a reference to 'memmove', but SunOS
does not support memmove. How should I work around this?
Everything else builds fine, except for 'nn' failing to link properly
because of the memmove problem I've just described.
Regards,
Craig.
--
Craig Dewick. Send email to 'cdewick@jedi.apana.org.au'
Point a web browser at 'http://jedi.apana.org.au/~cdewick' to
access my collection of Sun information and links to other places.
Re: nn 6.5.1 build error in 'db.c' with CACHE_PURPOSE is defined
Author: R. Stewart Ellis
Date: Sun, 15 Sep 1996 00:00
Date: Sun, 15 Sep 1996 00:00
47 lines
2417 bytes
2417 bytes
cdewick@jedi.apana.org.au (Craig Dewick) writes: >In <5141e4$fls@jedi.apana.org.au> cdewick@jedi.apana.org.au (Craig Dewick) writes: >>When attempting to build nn-6.5.1 on this machine, a Sun 4/380 running >>SunOS 4.1.4 with gcc-2.6.3, I encountered a problem with 'db.c'. >Ok, I tried commenting out 'CACHE_PURPOSE' and 'db.c' compiled without any >errors. >However, now I've found another one which I think might be >platform-specific.... >In libnov.c, on line 403, there is a reference to 'memmove', but SunOS >does not support memmove. How should I work around this? I no longer have SunOS running on anything. This has been discussed. I think there is a config statement that is supposed to conditionalize memmove. Also, I posted or mailed the maintainer that memmove is included in SunOS IF you use /usr/5bin/cc in preference to /usr/bin/cc. I can no longer check this, but I believe it is true. >Everything else builds fine, except for 'nn' failing to link properly >because of the memmove problem I've just described. I believe you should be able to get this to work without my hack above. You did properly define the s- and m- files in config.h? >Regards, >Craig. >-- > Craig Dewick. Send email to 'cdewick@jedi.apana.org.au' > Point a web browser at 'http://jedi.apana.org.au/~cdewick' to > access my collection of Sun information and links to other places. -- R.Stewart(Stew) Ellis, Assoc.Prof., (Off)810-762-9765 ___________________ Humanities & Social Science, GMI Eng.& Mgmt.Inst. () / _____ ______ Flint, MI 48504 Free speech and free software! /\ / / / / / / Web admin: http://www.gmi.edu/ ellis@gmi.edu /________/ / / / /
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads