[Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
de/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -c pool.c gcc -DHAVE_CONFIG_H -I. -I. -I. -fomit-frame-pointer -g -O2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -Wp,-MD,.deps/pool.pp -c pool.c -fPIC -DPIC -o .libs/pool.o pool.c: In function `manage_stop_children': pool.c:369: syntax error before `int' pool.c:372: `stillSomeAlive' undeclared (first use in this function) pool.c:372: (Each undeclared identifier is reported only once pool.c:372: for each function it appears in.) pool.c:372: `cnt' undeclared (first use in this function) pool.c:376: `i' undeclared (first use in this function) pool.c:377: `chpid' undeclared (first use in this function) gmake[2]: *** [pool.lo] Error 1 gmake[2]: Leaving directory `/home/nix/projects/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/home/nix/projects/dbmail' gmake: *** [all-recursive-am] Error 2
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
I don't get it. Why doesn't freebsd like this code? void manage_stop_children() { /* * * cleanup all remaining forked processes * */ trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing children.. ", __FILE__,__func__); int stillSomeAlive = 1; int i, cnt = 0; pid_t chpid; while (stillSomeAlive && cnt < 10) { stillSomeAlive = 0; cnt++; It appears gcc on freebsd doesn't like 'int var=0' type declarations inside functions. Or am I missing something else here. Someone with access to freebsd please help me out here. Ilja? Igor Olemskoi wrote: de/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -c pool.c gcc -DHAVE_CONFIG_H -I. -I. -I. -fomit-frame-pointer -g -O2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -Wstrict-prototypes -Wp,-MD,.deps/pool.pp -c pool.c -fPIC -DPIC -o .libs/pool.o pool.c: In function `manage_stop_children': pool.c:369: syntax error before `int' pool.c:372: `stillSomeAlive' undeclared (first use in this function) pool.c:372: (Each undeclared identifier is reported only once pool.c:372: for each function it appears in.) pool.c:372: `cnt' undeclared (first use in this function) pool.c:376: `i' undeclared (first use in this function) pool.c:377: `chpid' undeclared (first use in this function) gmake[2]: *** [pool.lo] Error 1 gmake[2]: Leaving directory `/home/nix/projects/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/home/nix/projects/dbmail' gmake: *** [all-recursive-am] Error 2 ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev -- Paul Stevens [EMAIL PROTECTED] NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands___www.nfg.nl
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
On Tue, 14 Sep 2004 16:03:36 +0200, Paul J Stevens <[EMAIL PROTECTED]> wrote: > I don't get it. Why doesn't freebsd like this code? > > > void manage_stop_children() > { > /* > * > * cleanup all remaining forked processes > * > */ > trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing > children.. ", > __FILE__,__func__); > int stillSomeAlive = 1; > int i, cnt = 0; > pid_t chpid; > while (stillSomeAlive && cnt < 10) { > stillSomeAlive = 0; > cnt++; > > > It appears gcc on freebsd doesn't like 'int var=0' type declarations inside > functions. Or am I missing something else here. > > Someone with access to freebsd please help me out here. Ilja? I think it doesn't like the fact that the trace() call comes before the variable declarations. If I compile with the '-pedantic' options, I get the following message: pool.c: In function `manage_stop_children': pool.c:369: warning: ISO C89 forbids mixed declarations and code If that's the problem, then the solution would be to put the trace() call after all variable declarations. BTW, I don't have a FreeBSD machine here, so I can't test it. Ilja
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
But then, building with -pedantic triggers loads of warnings :-( Ilja Booij wrote: On Tue, 14 Sep 2004 16:03:36 +0200, Paul J Stevens <[EMAIL PROTECTED]> wrote: I don't get it. Why doesn't freebsd like this code? void manage_stop_children() { /* * * cleanup all remaining forked processes * */ trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing children.. ", __FILE__,__func__); int stillSomeAlive = 1; int i, cnt = 0; pid_t chpid; while (stillSomeAlive && cnt < 10) { stillSomeAlive = 0; cnt++; It appears gcc on freebsd doesn't like 'int var=0' type declarations inside functions. Or am I missing something else here. Someone with access to freebsd please help me out here. Ilja? I think it doesn't like the fact that the trace() call comes before the variable declarations. If I compile with the '-pedantic' options, I get the following message: pool.c: In function `manage_stop_children': pool.c:369: warning: ISO C89 forbids mixed declarations and code If that's the problem, then the solution would be to put the trace() call after all variable declarations. BTW, I don't have a FreeBSD machine here, so I can't test it. Ilja ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev -- Paul Stevens [EMAIL PROTECTED] NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands___www.nfg.nl
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
Hi Paul, > I don't get it. Why doesn't freebsd like this code? > > > void manage_stop_children() > { > /* > * > * cleanup all remaining forked processes > * > */ > trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing > children.. ", > __FILE__,__func__); > int stillSomeAlive = 1; > It appears gcc on freebsd doesn't like 'int var=0' type declarations inside > functions. Or am I missing something else here. That's not allowed in C, all declarations have to be first. C++ allows declarations everywhere. Nevertheless 'declarations first' is a good idea for better readability ... Thomas -- http://www.tmueller.com for pgp key (95702B3B)
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
I'll switch to building the debian packages with -pedantic -std=c99 I've also committed the change suggested by Ilja. What's the score on freebsd? Anyone care to test, please? Paul J Stevens wrote: But then, building with -pedantic triggers loads of warnings :-( Ilja Booij wrote: On Tue, 14 Sep 2004 16:03:36 +0200, Paul J Stevens <[EMAIL PROTECTED]> wrote: I don't get it. Why doesn't freebsd like this code? void manage_stop_children() { /* * * cleanup all remaining forked processes * */ trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing children.. ", __FILE__,__func__); int stillSomeAlive = 1; int i, cnt = 0; pid_t chpid; while (stillSomeAlive && cnt < 10) { stillSomeAlive = 0; cnt++; It appears gcc on freebsd doesn't like 'int var=0' type declarations inside functions. Or am I missing something else here. Someone with access to freebsd please help me out here. Ilja? I think it doesn't like the fact that the trace() call comes before the variable declarations. If I compile with the '-pedantic' options, I get the following message: pool.c: In function `manage_stop_children': pool.c:369: warning: ISO C89 forbids mixed declarations and code If that's the problem, then the solution would be to put the trace() call after all variable declarations. BTW, I don't have a FreeBSD machine here, so I can't test it. Ilja ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev -- Paul Stevens [EMAIL PROTECTED] NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands___www.nfg.nl
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
Thomas Mueller wrote: Hi Paul, I don't get it. Why doesn't freebsd like this code? void manage_stop_children() { /* * * cleanup all remaining forked processes * */ trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing children.. ", __FILE__,__func__); int stillSomeAlive = 1; It appears gcc on freebsd doesn't like 'int var=0' type declarations inside functions. Or am I missing something else here. That's not allowed in C, all declarations have to be first. I'll keep that one in mind. C++ allows declarations everywhere. Nevertheless 'declarations first' is a good idea for better readability ... Not that I agree with the readability argument though... thinking about some very long functions in imapcommands.c with some pretty obscure variables neatly declared at the beginning, but unused until a few hundred lines below... When I'm in refactoring mode, extracting to new functions, I move all declarations to where they are first used, and then move the codeblock to a seperate function. I guess doing so a lot lately on the imap code, I got into this habit of keeping declarations neatly together with the code that uses them. Anyway, hope this fixes it for the freebsd users. -- Paul Stevens [EMAIL PROTECTED] NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands___www.nfg.nl
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
On Tue, 14 Sep 2004 16:52:08 +0200, Paul J Stevens <[EMAIL PROTECTED]> wrote: > > > Thomas Mueller wrote: > > Hi Paul, > > > > > >>I don't get it. Why doesn't freebsd like this code? > >> > > > >>It appears gcc on freebsd doesn't like 'int var=0' type declarations inside > >>functions. Or am I missing something else here. > > > > > > That's not allowed in C, all declarations have to be first. > > I'll keep that one in mind. > > > C++ allows > > declarations everywhere. Nevertheless 'declarations first' is a good > > idea for better readability ... > > Not that I agree with the readability argument though... thinking about some > very long functions in imapcommands.c with some pretty obscure variables > neatly > declared at the beginning, but unused until a few hundred lines below... > > When I'm in refactoring mode, extracting to new functions, I move all > declarations to where they are first used, and then move the codeblock to a > seperate function. I guess doing so a lot lately on the imap code, I got into > this habit of keeping declarations neatly together with the code that uses > them. > > Anyway, hope this fixes it for the freebsd users. You're correct on the readability part. In very long functions, having all declarations in the beginning makes things unreadable. Making functions shorter is the way to fix this :). There are some very long and ugly functions in some parts of DBMail that need splitting up. Ilja
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
Latest: Using two diferent versions of GLIB. Same syntax error message for pop3d.c and imapd.c gcc -DHAVE_CONFIG_H -I. -I. -I.-fomit-frame-pointer -g -O2 -I/usr/local/ incl ude/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -W stri ct-prototypes -c pop3d.c pop3d.c: In function `main': pop3d.c:113: syntax error before `<' gmake[2]: *** [pop3d.o] Error 1 gmake[2]: Leaving directory `/usr/install/new/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/install/new/dbmail' gmake: *** [all-recursive-am] Error 2 gcc -DHAVE_CONFIG_H -I. -I. -I.-fomit-frame-pointer -g -O2 -I/usr/local/ incl ude/glib-2.0 -I/usr/local/lib/glib-2.0/include -W -Wall -Wpointer-arith -W stri ct-prototypes -c imapd.c imapd.c: In function `main': imapd.c:105: error: syntax error before '<<' token gmake[2]: *** [imapd.o] Error 1 gmake[2]: Leaving directory `/usr/install/new/dbmail' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/install/new/dbmail' gmake: *** [all-recursive-am] Error 2 - Original Message - From: "Paul J Stevens" <[EMAIL PROTECTED]> To: "DBMAIL Developers Mailinglist" Sent: Tuesday, September 14, 2004 10:52 AM Subject: Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1 > > Thomas Mueller wrote: > > Hi Paul, > > > > > >>I don't get it. Why doesn't freebsd like this code? > >> > >> > >>void manage_stop_children() > >>{ > >>/* > >> * > >> * cleanup all remaining forked processes > >> * > >> */ > >>trace(TRACE_MESSAGE, "%s,%s: General stop requested. Killing > >>children.. ", > >>__FILE__,__func__); > >>int stillSomeAlive = 1; > > > > > >>It appears gcc on freebsd doesn't like 'int var=0' type declarations inside > >>functions. Or am I missing something else here. > > > > > > That's not allowed in C, all declarations have to be first. > > I'll keep that one in mind. > > > C++ allows > > declarations everywhere. Nevertheless 'declarations first' is a good > > idea for better readability ... > > Not that I agree with the readability argument though... thinking about some > very long functions in imapcommands.c with some pretty obscure variables neatly > declared at the beginning, but unused until a few hundred lines below... > > When I'm in refactoring mode, extracting to new functions, I move all > declarations to where they are first used, and then move the codeblock to a > seperate function. I guess doing so a lot lately on the imap code, I got into > this habit of keeping declarations neatly together with the code that uses them. > > Anyway, hope this fixes it for the freebsd users. > > -- > >Paul Stevens [EMAIL PROTECTED] >NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 >The Netherlands___www.nfg.nl > ___ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev >
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
Ilja Booij <[EMAIL PROTECTED]> said: >> >> Someone with access to freebsd please help me out here. Ilja? > > BTW, I don't have a FreeBSD machine here, so I can't test it. Does someone have a FreeBSD machine that they can provide accounts on? I could set one up at home, but it would be on a DSL line with a slow uplink rate. Aaron --
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
what do you need? Mike - Original Message - From: "Aaron Stone" <[EMAIL PROTECTED]> To: "DBMAIL Developers Mailinglist" Sent: Tuesday, September 14, 2004 8:57 PM Subject: Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1 > Ilja Booij <[EMAIL PROTECTED]> said: > > >> > >> Someone with access to freebsd please help me out here. Ilja? > > > > BTW, I don't have a FreeBSD machine here, so I can't test it. > > Does someone have a FreeBSD machine that they can provide accounts on? I > could set one up at home, but it would be on a DSL line with a slow uplink > rate. > > Aaron > > -- > > > > ___ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev >
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
M. J. [Mike] O'Brien <[EMAIL PROTECTED]> said: > what do you need? It sounds like Ilja and Paul are hitting some FreeBSD issues, I guess mostly with the default options that FreeBSD's GCC uses. >> Ilja Booij <[EMAIL PROTECTED]> said: >> >> >> >> >> Someone with access to freebsd please help me out here. Ilja? >> > >> > BTW, I don't have a FreeBSD machine here, so I can't test it. >> >> Does someone have a FreeBSD machine that they can provide accounts on? I >> could set one up at home, but it would be on a DSL line with a slow uplink >> rate. >> >> Aaron --
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1
What about sourceforge's compile farm? > Does someone have a FreeBSD machine that they can provide accounts on? I > could set one up at home, but it would be on a DSL line with a slow uplink > rate. > > Aaron -- Jesse Norell [EMAIL PROTECTED] is not my email address; change "administrator" to my first name. --
Re: [Dbmail-dev] current cvs head doesn't compiles under freebsd 5.2.1 - FreeBSD users Note that issue is FIXED
>Does someone have a FreeBSD machine that they can provide accounts on? >I could set one up at home, but it would be on a DSL line with a slow >uplink rate. >Aaron >-- > M. J. [Mike] O'Brien <[EMAIL PROTECTED]> said: > what do you need? > It sounds like Ilja and Paul are hitting some FreeBSD issues, I guess mostly with the default options that FreeBSD's GCC uses. > > > Ilja Booij <[EMAIL PROTECTED]> said: > > Someone with access to freebsd please help me out here. Ilja? > BTW, I don't have a FreeBSD machine here, so I can't test it. I think Paul now has the kinks wrung out perfectly. One key issue had to do with strict C declaration rules adherence in the newer GCC versions on the dev branch of FreeBSD and Release 4.10. (There also have been some issues surrounding expat-1.95.8 in the more recent releases of FreeBSD.) Paul did a hero fix on pool.c etc. and it all pulled together. Running well, I have the current CVS with Paul's, Ilja's, Lief's and yours (Aaron's) changes running on a FreeBSD 5.2.1 dev machine for about 9 hours stable under light but constant load. (I haven't tested all features but expect no difference to a Linux build) Paul's changes inevitably fixed the build issues with the new preforking functions. After another 24 hours and some heavier stress testing I will build the CVS on a FreeBSD 4.10 production blade. So far preforking is working like a charm on 5.2.1 and I will further document the GLIB and GCC versions which worked favourably on this 'non-production' grade (5.2.1) variant of FreeBSD. The period of time in which DbMail CVS would not build on FreeBSD would have been a couple of days. The current CVS will fix this problem. (Update your CVS, 'gmake clean' and rebuild.) In the course of trying to build the 13/14 September CVS prior to Paul's fix I updated a number of build tools and I think I initially created some incompatabilities which first produced inexplicable results on the updated DbMail CVS. I showed Paul earlier. Nevertheless, the following is the combination that worked after stabilizing and integrating GCC/GLIB needs on FBSD5.2.1. GLIB 2.4.6, expat-1.95.8, gettext-0.13.1_1, gmake-3.80_2, libtool-1.5.8, perl-5.8.5, pkgconfig-0.15.0_1 libiconv-1.9.1_3 and gcc version 3.3.3. This represents a somewhat upgraded package from the original native-to-5.2.1 packages. It may not be necesary inasmuch as I have also built (USE GMAKE) this hours' CVS DbMail on FreeBSD 4.9 using native GCC 2.95.4 and appropriate native libraries and dependencies without a hitch. I anticipate no problems on 4.10 I strongly feel that FreeBSD users can be confident upgrading to the current CVS with preforking, server-side sort etc. and a new dbmail.conf on any recent FreeBSD 'Release' variants having at least GLIB2.0 and current stable MySQL (i.e.: 4.0.16Max) / PostgreSQL (i.e.: 7.3.4-7.4.5). In fact, the combination of Postfix, MySQL 4.0.18Max or PostgreSQL 7.4.5, postfix-2.2-20040829 (watch out for config variances in the bleeding edge Postfix versions) and FreeBSD 4.10 makes for a world-beater DbMail system. I compare DbMail on Sunos5.9 and Linux RH9. Well, they are all good. best... Mike > > > > ___ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev >