Received: (qmail 7063 invoked by uid 2012); 11 Dec 1997 23:50:14 -0000 Message-Id: <19971211235014.7062.qmail@hyperreal.org> Date: 11 Dec 1997 23:50:14 -0000 From: Jeffrey McNany Reply-To: jmcnany@cc.state.az.us To: apbugs@hyperreal.org Subject: syntax error, line 158, compiling http_main.c X-Send-Pr-Version: 3.2 >Number: 1546 >Category: os-sequent >Synopsis: syntax error, line 158, compiling http_main.c >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: support >Submitter-Id: apache >Arrival-Date: Thu Dec 11 16:00:01 PST 1997 >Last-Modified: Mon Sep 7 05:50:20 PDT 1998 >Originator: jmcnany@cc.state.az.us >Organization: >Release: 1.2.4 >Environment: Sequent Dynix/ptx v2.1.6. UNAME -A returns "starpas starpas 3.2.0 V2.1.6 i386"; using cc to compile Apache 1.2.4 >Description: This is a configuration problem, and YES, I know the web page said not to submit them through here, but I sent an email and Brian Behlendorf asked me to submit this as a bug. I am trying to compile for a Sequent system, and modified the Configure script and conf.h according to the PORTING guidelines. Unfortunately, every time I run "make" I get the following errors: $ make cc -c -Iregex -O2 -D_SEQUENT_ alloc.c cc -c -Iregex -O2 -D_SEQUENT_ http_main.c " "http_main.c", line 158: syntax error, probably missing ",", ";" or "=" " "http_main.c", line 158: cannot recover from previous errors * *** Error code 1 M Make: . Stop. $ $ >How-To-Repeat: >Fix: I have looked through all your bug and error databases. I found two relevant PR #'s: In PR#195 you told the submitter that Apache has been ported successfully to Sequent, but in PR#962 you reverse yourself and tell the submitter that you had not ported to Sequent, but were willing to do so if the submitter (who worked for Sequent) was willing to provide you access to a Sequent machine. If you have since completed the port, please provide the necessary changes to the Configure and/or conf.h files. %0 >Audit-Trail: Category-Changed-From-To: other-os-sequent Category-Changed-By: coar Category-Changed-When: Thu Dec 11 17:10:45 PST 1997 State-Changed-From-To: open-feedback State-Changed-By: dgaudet State-Changed-When: Sat Dec 13 17:23:57 PST 1997 State-Changed-Why: We've successfully built it on a dynix/ptx system once, way back some time. But I guess it doesn't work anymore. Looks like you need to provide a definition for JMP_BUF in conf.h... have you created a _SEQUENT_ section in conf.h yet? Dean P.S. sequent never did provide us with access to a machine to do the port. From: Jeffrey McNany To: dgaudet@hyperreal.org Cc: apbugs@Apache.Org Subject: Re: os-sequent/1546: syntax error, line 158, compiling http_main.c Date: Tue, 16 Dec 1997 15:41:57 -0700 Adding the JMP_BUF into conf.h got me a lot further, but I'm still not quite there yet. Here are the changes I've made. In the Configure script, I added the following lines between the *-isc4*) definition and the *-sco3*) definition: *-*-starpas*) OS='Sequent Dynix/ptx' CFLAGS="$CFLAGS -D_SEQUENT_" DEF_WANTHSREGEX=yes ;; In conf.h, I added the following lines right after the "typedef" line at the end of the PARAGON definition: #elif defined(SEQUENT) || defined(_SEQUENT_) #define NO_KILLPG #define NEED_STRCASECMP #define NEED_STRNCASECMP #define HAVE_MMAP #define HAVE_SHMGET #define HAVE_SYS_SELECT_H #define HAVE_SHMGET #define HAVE_SYS_SELECT_H #define JMP_BUF sigjmp_buf When I do the 'Configure' and 'make', I get the following results: $ Configure Using config file: Configuration Using Makefile template file: Makefile.tmpl ./helpers/GuessOS: hostinfo: not found + configured for Sequent Dynix/ptx platform + setting C compiler to cc + setting C compiler optimization-level to -O2 $ make cc -c -Iregex -O2 -D_SEQUENT_ alloc.c cc -c -Iregex -O2 -D_SEQUENT_ http_main.c cc -c -Iregex -O2 -D_SEQUENT_ http_core.c cc -c -Iregex -O2 -D_SEQUENT_ http_config.c "http_config.c", line 680: warning: \a is ANSI C "alert" character cc -c -Iregex -O2 -D_SEQUENT_ http_request.c cc -c -Iregex -O2 -D_SEQUENT_ http_log.c cc -c -Iregex -O2 -D_SEQUENT_ http_protocol.c cc -c -Iregex -O2 -D_SEQUENT_ rfc1413.c cc -c -Iregex -O2 -D_SEQUENT_ util.c "util.c", line 1175: warning: argument is incompatible with prototype: arg #1 cc -c -Iregex -O2 -D_SEQUENT_ util_script.c cc -c -Iregex -O2 -D_SEQUENT_ modules.c cc -c -Iregex -O2 -D_SEQUENT_ buff.c cc -c -Iregex -O2 -D_SEQUENT_ md5c.c cc -c -Iregex -O2 -D_SEQUENT_ util_md5.c cc -c -Iregex -O2 -D_SEQUENT_ explain.c cc -c -Iregex -O2 -D_SEQUENT_ http_bprintf.c cc -c -Iregex -O2 -D_SEQUENT_ util_date.c cc -c -Iregex -O2 -D_SEQUENT_ util_snprintf.c cc -c -Iregex -O2 -D_SEQUENT_ mod_env.c cc -c -Iregex -O2 -D_SEQUENT_ mod_log_config.c cc -c -Iregex -O2 -D_SEQUENT_ mod_mime.c cc -c -Iregex -O2 -D_SEQUENT_ mod_negotiation.c "mod_negotiation.c", line 1576: warning: initializer does not fit: 4294967295 cc -c -Iregex -O2 -D_SEQUENT_ mod_include.c "mod_include.c", line 1174: warning: end-of-loop code not reached "mod_include.c", line 1281: warning: end-of-loop code not reached cc -c -Iregex -O2 -D_SEQUENT_ mod_dir.c cc -c -Iregex -O2 -D_SEQUENT_ mod_cgi.c cc -c -Iregex -O2 -D_SEQUENT_ mod_asis.c cc -c -Iregex -O2 -D_SEQUENT_ mod_imap.c cc -c -Iregex -O2 -D_SEQUENT_ mod_actions.c cc -c -Iregex -O2 -D_SEQUENT_ mod_userdir.c cc -c -Iregex -O2 -D_SEQUENT_ mod_alias.c cc -c -Iregex -O2 -D_SEQUENT_ mod_access.c cc -c -Iregex -O2 -D_SEQUENT_ mod_auth.c cc -c -Iregex -O2 -D_SEQUENT_ mod_browser.c cc -o httpd alloc.o http_main.o http_core.o http_config.o http_request.o http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o md5c.o util_md5.o explain.o http_bprintf.o util_date.o util_snprintf.o mod_env.o mod_log_config.o mod_mime.o mod_negotiation.o mod_include.o mod_dir.o mod_cgi.o mod_asis.o mod_imap.o mod_actions.o mod_userdir.o mod_alias.o mod_access.o mod_auth.o mod_browser.o regex/libregex.a undefined first referenced symbol in file shutdown http_main.o select http_main.o htonl http_main.o gethostbyname http_main.o gethostbyaddr http_main.o inet_ntoa http_main.o accept http_main.o getsockname http_main.o setsockopt http_main.o ntohs http_main.o socket http_main.o bind http_main.o listen http_main.o htons http_main.o getpeername http_main.o initgroups http_main.o inet_addr http_config.o connect rfc1413.o gethostname util.o writev buff.o ld fatal: Symbol referencing errors. No output written to httpd *** Error code 13 Make: . Stop. As you can see, I'm almost there. Got some more ideas? From: Dean Gaudet To: Jeffrey McNany Cc: apbugs@apache.org Subject: Re: os-sequent/1546: syntax error, line 158, compiling http_main.c Date: Tue, 16 Dec 1997 14:53:56 -0800 (PST) On 16 Dec 1997, Jeffrey McNany wrote: > undefined first referenced > symbol in file > shutdown http_main.o > select http_main.o > htonl http_main.o > gethostbyname http_main.o > gethostbyaddr http_main.o > inet_ntoa http_main.o > accept http_main.o > getsockname http_main.o > setsockopt http_main.o > ntohs http_main.o > socket http_main.o > bind http_main.o > listen http_main.o > htons http_main.o > getpeername http_main.o > initgroups http_main.o > inet_addr http_config.o > connect rfc1413.o > gethostname util.o > writev buff.o Add -lsocket, read the man page for "gethostbyname" and "getpeername" to find out what if any other library they require. initgroups -- you may need to define NEED_INITGROUPS writev -- you may need to define NO_WRITEV, but do a "man writev" first, since it could be hidden off in some library you need to link in Generally just go through the man pages for each of those functions until you find all the libraries you can. Dean From: Jeffrey McNany To: dgaudet@arctic.org Cc: apbugs@apache.org Subject: Re: os-sequent/1546: syntax error, line 158, compiling http_main.c -Reply Date: Fri, 19 Dec 1997 09:47:46 -0700 Dean, Just wanted you to know that I am making progress. Studying the man pages and adding the libraries as includes in the conf.h file have cleared up all the original errors, but now I have some new ones. I appreciate how fast you replied to my message the other day. Unfortunately, things are getting hectic here with the year-end. I'll keep you posted. Jeff >>> Dean Gaudet 12/16/97 03:53pm >>> On 16 Dec 1997, Jeffrey McNany wrote: > undefined first referenced > symbol in file > shutdown http_main.o > select http_main.o > htonl http_main.o > gethostbyname http_main.o > gethostbyaddr http_main.o > inet_ntoa http_main.o > accept http_main.o > getsockname http_main.o > setsockopt http_main.o > ntohs http_main.o > socket http_main.o > bind http_main.o > listen http_main.o > htons http_main.o > getpeername http_main.o > initgroups http_main.o > inet_addr http_config.o > connect rfc1413.o > gethostname util.o > writev buff.o Add -lsocket, read the man page for "gethostbyname" and "getpeername" to find out what if any other library they require. initgroups -- you may need to define NEED_INITGROUPS writev -- you may need to define NO_WRITEV, but do a "man writev" first, since it could be hidden off in some library you need to link in Generally just go through the man pages for each of those functions until you find all the libraries you can. Dean From: Dean Gaudet To: Jeffrey McNany Cc: apbugs@apache.org Subject: os-sequent/1546: syntax error, line 158, compiling http_main.c Date: Tue, 23 Dec 1997 15:24:48 -0800 (PST) Ok you should probably start trying to disable the setsockopt() calls in http_main.c and see if any of those are hurting things. Actually before trying that, try using -DUSE_FCNTL_SERIALIZED_ACCEPT, if that don't work try USE_FLOCK_SERIALIZED_ACCEPT, or maybe even USE_SYSVSEM_SERIALIZED_ACCEPT. If none of these works, try running "./httpd -X" to get a single child version, maybe something is wrong across the fork. -X isn't good for a production system, but it'll give good hints. Then start disabling the setsockopt() calls if you haven't had any luck so far. At some point you may need to find out what the httpd parent and children are doing... the command for this is called strace, or truss, or ktrace, or par... it varies. See . You only need one of HAVE_MMAP or HAVE_SHMGET -- I forget which one overrides the other. You may want to try USE_MMAP_FILES when you get other things working. Which version of Dynix/ptx are you using? My mud used to run on version 3.2 I think it was... but I can't seem to find any special cases in my code for ptx. Dean On Tue, 23 Dec 1997, Jeffrey McNany wrote: > Dean, > > I have successfully compile the server on my Sequent, and have a > running server. In order to get it to compile, I added the following lines to > the Configure script: (note: "starpas" is the machine's internal name) > > *-*-starpas*) > OS='Sequent Dynix/ptx' > CFLAGS="$CFLAGS -D_SEQUENT_" > LIBS="$LIBS -lsocket -linet -lnsl -lseq" > DEF_WANTHSREGEX=yes > ;; > > and these lines to the conf.h file: > > #elif defined(SEQUENT) || defined(_SEQUENT_) > #include > #include > #include > #include > #define NO_KILLPG > #define NEED_STRCASECMP > #define NEED_STRNCASECMP > #define HAVE_MMAP > #define HAVE_SHMGET > #define HAVE_SYS_SELECT_H > #define JMP_BUF sigjmp_buf > > Now I have one last problem. When I attempt to access the server > through my Netscape browser I get a message the the connection was > refused by the server, and that the "server may not be accepting > connections or may be busy". I have worked for two days on various > combinations in the httpd.conf and access.conf files. I think the problem > lies in my system's etc/services and-or etc/protocol files. Are there any > docs on the Apache Web Page that outline modifying those files? If there > are, I can't find them. > > Jeff > Comment-Added-By: brian Comment-Added-When: Wed May 20 19:09:52 PDT 1998 Comment-Added: Is everything OK for 1.2.x on Sequent now? How about 1.3? Comment-Added-By: coar Comment-Added-When: Tue Aug 4 19:17:37 PDT 1998 Comment-Added: [This is a standard response.] This Apache problem report has not been updated recently. Please reply to this message if you have any additional information about this issue, or if you have answers to any questions that have been posed to you. If there are no outstanding questions, please consider this a request to try to reproduce the problem with the latest software release, if one has been made since last contact. If we don't hear from you, this report will be closed. State-Changed-From-To: feedback-closed State-Changed-By: coar State-Changed-When: Mon Sep 7 05:50:20 PDT 1998 State-Changed-Why: [This is a standard response.] No response from submitter, assuming issue has been resolved. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]