Umh... this is an historic issue with FBSD, resolved a few 
years ago in 5.x series and through 5.4pre-release and 
6.0-CURRENT
The legacy 4.x series never did have native getopt.
As one advances the 4.x system with software builds and 
updates, dependency makes try and do
getopt-1.1.3_1 (/usr/local/include) a ports contrib dating 
back to 1997
getopt-1.1.3 (/usr/include) from FBSD 
/usr/src/usr.bin/getopt


freebsd.org RECOMMENDS new builds of 5.x NOT 4.x.
Hence I quite wonder if there is any point in trying to 
solve the legacy FBSD 4.x getopt problem.
Frodo Looijaard http://www.pk.edu.pl/cgi-bin/man-cgi?get did 
that in 1997 with getopt-1.1.3_1, a GNU-like getopt for 
FreeBSD and it stuck. Everyone uses it for everything on 
FBSD. That BTW is what Anne has installed in /usr/local/

Aaron's getopt fix works fine on FBSD 5.x. I believe it 
would work on a bare 4.x system without too many software 
installs trying to drop getopt workarounds all over the 
environment.

SUGGESTION:
1) I don't think you can solve the getopt problem for legacy 
4.x FreeBSD unless dm_getopt is changed. What about using 
Frodo's  (http://www.frodol.dds.nl/getopt.html) getopt 
instead of Benjamin Sittler's dm_getopt?

2) Could the DBMail configure.in point, if OS FBSD 4.x, to 
native getopt?

It would seem after all that the solution I used for legacy 
FBSD in the Bug Report (177) as Anne has used it still 
stands as the only way to build for Legacy FreeBSD.

[snip]
TO FIX THIS ...
For FBSD 4.x Versions only: I link 
/usr/local/include/getopt.h to
../dm_getopt.h to build dm_getopt.o after installing 
getopt-1.1.3_1 from
/usr/ports/misc/getopt. (I tried forcing with configure.in 
to use contrib
getopt in /usr/local but no luck.)
so, to dbmail install directory after installing 
getopt-1.1.3_1
mv dm_getopt.h dm_getopt.h.ORIG
ln -s /usr/local/include/getopt.h ./dm_getopt.h
../configure --with-XXsql
gmake
gmake install
/* everything happy but I guess that's a wierd way to do 
this */
[SNIP]

I think Aaron built with success on a 4.7 host which must 
have had a unique variant of getopt.
:o)

best...
Mike





----- Original Message ----- 
From: "Paul J Stevens" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Monday, March 21, 2005 4:24 AM
Subject: Re: [Dbmail] dbmail-2.0.4 build


This sucks :-/

Aaron started the whole dm_getopt to get around the 
compatibility problems with
bsd's native getopt, and now you guys start installing gnu 
getopt on bsd because
dm_getopt doesn't work....

Aaron, how are we going to unravel this mess?

Anne Strikwerda wrote:
> To be complete:
>
> 1) Install port misc/getopt-1.1.3_1
> 2) extract dbmail, goto extracted dir
> 3) mv dm_getopt.h dm_getopt.h.ORIG
> 4) ln -s /usr/local/include/getopt.h ./dm_getopt.h
> 5) ./configure
> 6) gmake
> 7) backup your dbmail execs
> 8) gmake install
> 9) start dbmail daemons (lmtpd first)
>
> Anne
>
>
>
>>Hi,
>>
>>I checked /usr/include, there's no getopt.h
>>But I tried another port: misc/getopt-1.1.3_1
>>
>>Now it makes and installs fine!
>>
>>thanks,
>>Anne
>>
>>
>>
>>>On my Mac OS X system (10.3.8) I had the same problem 
>>>compiling dbmail
>>>2.0.4
>>>
>>>The solution suggested by Mike O'Brien works for me, only 
>>>the path to
>>>getopt.h is wrong
>>>
>>>Replace /usr/local/include/getopt.h by 
>>>/usr/include/getopt.h
>>>
>>>
>>>Since Mac OS X is based upon FreeBSD the file could be in 
>>>the same
>>>location
>>>
>>>I found the solution on the developer mailing list by the 
>>>way
>>>http://mailman.fastxs.net/pipermail/dbmail-dev/2005-March/006498.html
>>>
>>>Hope this helps
>>>
>>>Eelko
>>>
>>>On 19 Mar 2005, at 17:02, Anne Strikwerda wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>/usr/local/include/getopt.h didn't exist on my system so 
>>>>I tried to be
>>>>smart and installed the devel/libgnugetopt-1.2 port.
>>>>
>>>>Now gmake stops here:
>>>>
>>>>creating dbmail-smtp
>>>>gcc -DHAVE_CONFIG_H -I. -I. -I.    -fomit-frame-pointer  
>>>>-g -O2 -W -Wall
>>>>-Wpointer-arith -Wstrict-prototypes -c pop3.c
>>>>gcc -DHAVE_CONFIG_H -I. -I. -I.    -fomit-frame-pointer  
>>>>-g -O2 -W -Wall
>>>>-Wpointer-arith -Wstrict-prototypes -c pop3d.c
>>>>In file included from misc.h:32,
>>>>                 from pop3d.c:41:
>>>>/usr/include/unistd.h:112: conflicting types for 
>>>>`dm_getopt'
>>>>dm_getopt.h:66: previous declaration of `dm_getopt'
>>>>gmake[2]: *** [pop3d.o] Error 1
>>>>gmake[2]: Leaving directory `/usr/progs/dbmail-2.0.4'
>>>>gmake[1]: *** [all-recursive] Error 1
>>>>gmake[1]: Leaving directory `/usr/progs/dbmail-2.0.4'
>>>>gmake: *** [all-recursive-am] Error 2
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>You must have a GNU-like variant of getopt, something 
>>>>>that
>>>>>was not native on 4.9.
>>>>>
>>>>>Try this...
>>>>>
>>>>>mv dm_getopt.h dm_getopt.h.ORIG
>>>>>ln -s /usr/local/include/getopt.h ./dm_getopt.h
>>>>>
>>>>>
>>>>>mike
>>>>>
>>>>>
>>>>>
>>>>>I have exactly the same errors on FreeBSD 4.9
>>>>>
>>>>>Anne
>>>>>
>>>>>
>>>>>>I download dbmail-2.0.4 from site and try to build:
>>>>>>PATH=/opt/mysql/bin:$PATH
>>>>>>
>>>>>>../configure              \
>>>>>>        --prefix=/opt/dbmail \
>>>>>>        --with-mysql=/opt/mysql
>>>>>>
>>>>>>configuring was successfull, but gmake:
>>>>>>
>>>>>>In file included from misc.h:32,
>>>>>>                 from pop3d.c:41:
>>>>>>/usr/include/unistd.h:112: conflicting types for
>>>>>>`dm_getopt'
>>>>>>dm_getopt.h:66: previous declaration of `dm_getopt'
>>>>>>gmake[2]: *** [pop3d.o] error 1
>>>>>>gmake[2]: Leaving directory
>>>>>>`/usr/home/goodwin/src/dbmail-2.0.4'
>>>>>>gmake[1]: *** [all-recursive] error 1
>>>>>>gmake[1]: Leaving directory
>>>>>>`/usr/home/goodwin/src/dbmail-2.0.4'
>>>>>>gmake: *** [all-recursive-am] error 2
>>>>>>
>>>>>>How fix it?
>>>>>>OS: 4.11-STABLE FreeBSD
>>>>>>older releases build without any troubles
>>>>>>
>>>>>>_______________________________________________
>>>>>>Dbmail mailing list
>>>>>>[email protected]
>>>>>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>>>>
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Dbmail mailing list
>>>>>[email protected]
>>>>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>>>
>>>>>_______________________________________________
>>>>>Dbmail mailing list
>>>>>[email protected]
>>>>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Dbmail mailing list
>>>>[email protected]
>>>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>>
>>>
>>>_______________________________________________
>>>Dbmail mailing list
>>>[email protected]
>>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>
>>
>>
>>_______________________________________________
>>Dbmail mailing list
>>[email protected]
>>https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>
>
>
>
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>

-- 
   ________________________________________________________________
   Paul Stevens 
[EMAIL PROTECTED]
   NET FACILITIES GROUP                     GPG/PGP: 
1024D/11F8CD31
   The 
Netherlands_______________________________________www.nfg.nl
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to