Thread: Rendezvous/Bonjour broken in 8.1 beta
Hi, I'm trying to compile Postgresql 8.1 beta on my own in mingw/windows. I tried to compile it with --with-bonjour but it is looking for the wrong file, it looks for "DNSServiceDiscovery.h" but Apple provides a file named "dns_sd.h" (Bonjour SDK for windows as of May 5 2005), after renaming it ./configure went ok but make ended with errors: ... In file included from postmaster.c:92: d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:52: error: syntax error before "uint8_t" d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:53: error: syntax error before "int8_t" d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:54: error: syntax error before "uint16_t" d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:55: error: syntax error before "int16_t" postmaster.c:249: error: syntax error before "errorCode" postmaster.c: In function `PostmasterMain': postmaster.c:769: warning: implicit declaration of function `DNSServiceRegistrationCreate' postmaster.c:774: error: `DNSServiceRegistrationReply' undeclared (first use in this function) postmaster.c:774: error: (Each undeclared identifier is reported only once postmaster.c:774: error: for each function it appears in.) postmaster.c:774: error: syntax error before "reg_reply" postmaster.c: At top level: postmaster.c:1042: error: syntax error before "errorCode" postmaster.c: In function `reg_reply': postmaster.c:1043: warning: old-style parameter declaration postmaster.c: At top level: postmaster.c:1043: warning: 'reg_reply' defined but not used is this supported on windows? Do you have any plans to restore this function? Thanks in advance.
pmagnoli@systemevolution.it wrote: >Hi, I'm trying to compile Postgresql 8.1 beta on my own in mingw/windows. >I tried to compile it with --with-bonjour > I don't recall ever hearing that this has been done. >but it is looking for the wrong >file, it looks for "DNSServiceDiscovery.h" but Apple provides a file named >"dns_sd.h" (Bonjour SDK for windows as of May 5 2005), after renaming it > > We should not be renaming other people's files - if necessary we should adjust our configure tests and #include directives. But I guess you did that just to make some progress. >./configure went ok but make ended with errors: > >... >In file included from postmaster.c:92: >d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:52: >error: syntax error before "uint8_t" >d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:53: >error: syntax error before "int8_t" >d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:54: >error: syntax error before "uint16_t" >d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/DNSServiceDiscovery/DNSServiceDiscovery.h:55: >error: syntax error before "int16_t" > > > What's on lines 52 .. 55 of that file? cheers andrew
Hi Andrew, you wrote: > I don't recall ever hearing that this has been done. bonjour is the new name of Apple's rendezvous technology, an old email (http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated that rendezvous support was working at least on macosx and windows, so I tried. >We should not be renaming other people's files - if necessary we >should >adjust our configure tests and #include directives. But I guess you >did >that just to make some progress. Yes, also keep in mind that I'm a programming illiterate and I was doing some "do it yourself" tests >What's on lines 52 .. 55 of that file? Lines 51 and 52 are: #ifndef _MSL_STDINT_H typedef UINT8 uint8_t; Thanks and best regards paolo
<pmagnoli@systemevolution.it> writes: >> I don't recall ever hearing that this has been done. > bonjour is the new name of Apple's rendezvous technology, an old email > (http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated > that rendezvous support was working at least on macosx and windows, so I > tried. I'm not sure I believe that old message. Certainly we've never had code to accommodate different names for the rendezvous/bonjour header files. One possibility is that bonjour-for-windows *does* have the original file name (DNSServiceDiscovery.h) if you install it on a filesystem supporting long names, but you dropped it on an 8+3 filesystem instead? regards, tom lane
Tom Lane wrote: ><pmagnoli@systemevolution.it> writes: > > >>>I don't recall ever hearing that this has been done. >>> >>> > > > >>bonjour is the new name of Apple's rendezvous technology, an old email >>(http://archives.postgresql.org/pgsql-hackers/2005-05/msg00739.php) stated >>that rendezvous support was working at least on macosx and windows, so I >>tried. >> >> > >I'm not sure I believe that old message. Certainly we've never had code >to accommodate different names for the rendezvous/bonjour header files. > >One possibility is that bonjour-for-windows *does* have the original >file name (DNSServiceDiscovery.h) if you install it on a filesystem >supporting long names, but you dropped it on an 8+3 filesystem instead? > > > > No, that is indeed the name from the Bonjour Windows SDK. *sigh* cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > Tom Lane wrote: >> One possibility is that bonjour-for-windows *does* have the original >> file name (DNSServiceDiscovery.h) if you install it on a filesystem >> supporting long names, but you dropped it on an 8+3 filesystem instead? > No, that is indeed the name from the Bonjour Windows SDK. *sigh* Grumble. Are you going to send in a patch? I can test that the OS X side still works, but I can't test Windows. regards, tom lane
Andrew Dunstan wrote: > Tom Lane wrote: > >> >> Grumble. Are you going to send in a patch? I can test that the OS X >> side still works, but I can't test Windows. >> > > I can make a patch and see that it configures and compiles. But I > can't test it. > > I guess that will be an advance, though. > > It gets a lot worse. The Windows SDK does not export the same API. None of the DNSfoo things we refer to in postmaster.c are defined in the supplied header file (not to mention other idiocies I was able to negotiate past). Apparently Apple have never heard of code portability. I have no idea what I'm looking for in here, so I don't intend to take anything further - someone who actually cares about this might like to try ;-) Below are shown diffs to configure.in and postmaster.c that I made to get as far as I did. cheers andrew Index: configure.in =================================================================== RCS file: /cvsroot/pgsql/configure.in,v retrieving revision 1.425 diff -c -r1.425 configure.in *** configure.in 25 Aug 2005 02:28:03 -0000 1.425 --- configure.in 8 Sep 2005 23:43:14 -0000 *************** *** 755,761 **** fi if test "$with_bonjour" = yes ; then ! AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour])]) fi --- 755,765 ---- fi if test "$with_bonjour" = yes ; then ! if test "$PORTNAME" = "win32"; then ! AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file <dns_sd.h> is required for Bonjour])]) ! else ! AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour])]) ! fi fi Index: src/backend/postmaster/postmaster.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v retrieving revision 1.467 diff -c -r1.467 postmaster.c *** src/backend/postmaster/postmaster.c 20 Aug 2005 23:26:17 -0000 1.467 --- src/backend/postmaster/postmaster.c 8 Sep 2005 23:39:50 -0000 *************** *** 89,96 **** --- 89,104 ---- #endif #ifdef USE_BONJOUR + #ifdef WIN32 + #include <stdint.h> + #define _MSL_STDINT_H + #include <dns_sd.h> + #undef _MSL_STDINT_H + typedef int DNSServiceRegistrationReplyErrorType; + #else #include <DNSServiceDiscovery/DNSServiceDiscovery.h> #endif + #endif #include "access/xlog.h" #include "bootstrap/bootstrap.h"
Andrew Dunstan <andrew@dunslane.net> writes: > It gets a lot worse. The Windows SDK does not export the same API. None > of the DNSfoo things we refer to in postmaster.c are defined in the > supplied header file (not to mention other idiocies I was able to > negotiate past). Apparently Apple have never heard of code portability. Great :-(. Well, until there's actually some value in supporting bonjour on non-Apple platforms, let's just leave the code as it is. I can't see plastering the code with a ton of #ifdefs to support something that no Windows users will care about. regards, tom lane
Tom Lane wrote: >Andrew Dunstan <andrew@dunslane.net> writes: > > >>It gets a lot worse. The Windows SDK does not export the same API. None >>of the DNSfoo things we refer to in postmaster.c are defined in the >>supplied header file (not to mention other idiocies I was able to >>negotiate past). Apparently Apple have never heard of code portability. >> >> > >Great :-(. Well, until there's actually some value in supporting >bonjour on non-Apple platforms, let's just leave the code as it is. >I can't see plastering the code with a ton of #ifdefs to support >something that no Windows users will care about. > > > > Agreed. cheers andrew
>> >> Great :-(. Well, until there's actually some value in supporting >> bonjour on non-Apple platforms, let's just leave the code as it is. >> I can't see plastering the code with a ton of #ifdefs to support >> something that no Windows users will care about. >> Lets at least document the fact that it is borked on everything but apple.... maybe even a note in the postgresql.conf file? >> >> >> > > Agreed. > > cheers > > andrew > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster -- Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240 PostgreSQL Replication, Consulting, Custom Programming, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
"Joshua D. Drake" <jd@commandprompt.com> writes: > Lets at least document the fact that it is borked on everything but > apple.... "borked on windows" is not necessarily the same thing as "borked on everything but apple". BTW, wasn't it you that sent in that old note that said it did work on windows? What did you test exactly? regards, tom lane
>"borked on windows" is not necessarily the same thing as "borked on >everything but apple". > >BTW, wasn't it you that sent in that old note that said it did work >on windows? What did you test exactly? > > Not I. The only thing I have ever noted with Rendezvous/Bonjour was the whole trademark issue with the name. Sincerely, Joshua D. Drake > regards, tom lane > > -- Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240 PostgreSQL Replication, Consulting, Custom Programming, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
>> > Not I. The only thing I have ever noted with Rendezvous/Bonjour > was the whole trademark issue with the name. > > Sincerely, > > Joshua D. Drake I retract the above statement. As Andrew kindly pointed it out I did mention that it works on Windows. Unfortunately I was taking that from literature not in practice knowledge. I apologize. I should know better. Sincerely, Joshua D. Drake > > > >> regards, tom lane >> >> > > -- Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240 PostgreSQL Replication, Consulting, Custom Programming, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
Hi, wouldn't it be better to implement rendezvous with a free/open/cross-platform implementation like Howl (http://www.porchdogsoft.com/products/howl/) which should help avoiding apple's "tricks"? Best regards paolo -----Messaggio originale----- Da: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org]Per conto di Tom Lane Inviato: venerdì 9 settembre 2005 2.22 A: Joshua D. Drake Cc: Andrew Dunstan; pmagnoli@systemevolution.it; pgsql-hackers@postgresql.org Oggetto: Re: [HACKERS] Rendezvous/Bonjour broken in 8.1 beta "Joshua D. Drake" <jd@commandprompt.com> writes: > Lets at least document the fact that it is borked on everything but > apple.... "borked on windows" is not necessarily the same thing as "borked on everything but apple". BTW, wasn't it you that sent in that old note that said it did work on windows? What did you test exactly? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster
"Paolo Magnoli" <pmagnoli@systemevolution.it> writes: > Hi, wouldn't it be better to implement rendezvous with a > free/open/cross-platform implementation like Howl > (http://www.porchdogsoft.com/products/howl/) which should help avoiding > apple's "tricks"? Why bother? AFAIK, no one cares at all about bonjour unless they are running OS X --- and if they are on OS X, switching to howl would just mean there's an additional bit of software they have to get. If this were central to Postgres' purpose, we might feel like doing extra work on it; but it's so peripheral that we've already wasted more time on it than it's worth. IMHO anyway. regards, tom lane
Just to counter this statement- I am using postgresql mDNSReponder discovery on Linux. In my case, I have several "satellite" machines that need to send events to the database. Zeroconf makes the discovery trivial and I don't have to worry about network settings. I would like to see postgresql support this feature natively so that I could just add a line to postgresql.conf and have it work. I am currently using howl to do this- howl wraps the Apple libs in Darwin and hooks into the standard mDNSResponder on other OSs. Since obviously no one else is working on this, I can work on a patch. On Sep 9, 2005, at 8:46 AM, Tom Lane wrote: > "Paolo Magnoli" <pmagnoli@systemevolution.it> writes: > >> Hi, wouldn't it be better to implement rendezvous with a >> free/open/cross-platform implementation like Howl >> (http://www.porchdogsoft.com/products/howl/) which should help >> avoiding >> apple's "tricks"? >> > > Why bother? AFAIK, no one cares at all about bonjour unless they are > running OS X --- and if they are on OS X, switching to howl would just > mean there's an additional bit of software they have to get. > > If this were central to Postgres' purpose, we might feel like doing > extra work on it; but it's so peripheral that we've already wasted > more time on it than it's worth. IMHO anyway. > > regards, tom lane |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- AgentM agentm@themactionfaction.com |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
FYI: The DNSServiceDiscovery.h is Mac OS X specific and only kept around for Mac OS X 10.2 and older compatiability. Apple has moved to a cross platform impelentation with the dns_sd.h API available for OS X, Win32, and most any posix type system. Any reference to DNSServiceDiscovery.h in pgsql should go away (unless you want to keep support for pre-10.3 Mac OS X) and be replaced with the newer dns_sd.h interfaces. On 9/8/05, Andrew Dunstan <andrew@dunslane.net> wrote: > It gets a lot worse. The Windows SDK does not export the same API. None > of the DNSfoo things we refer to in postmaster.c are defined in the > supplied header file (not to mention other idiocies I was able to > negotiate past). Apparently Apple have never heard of code portability. -- Sandy McArthur
Added to TODO: * Update Bonjour to work with newer cross-platform SDK --------------------------------------------------------------------------- Sandy McArthur wrote: > FYI: The DNSServiceDiscovery.h is Mac OS X specific and only kept > around for Mac OS X 10.2 and older compatiability. Apple has moved to > a cross platform impelentation with the dns_sd.h API available for OS > X, Win32, and most any posix type system. > > Any reference to DNSServiceDiscovery.h in pgsql should go away (unless > you want to keep support for pre-10.3 Mac OS X) and be replaced with > the newer dns_sd.h interfaces. > > On 9/8/05, Andrew Dunstan <andrew@dunslane.net> wrote: > > It gets a lot worse. The Windows SDK does not export the same API. None > > of the DNSfoo things we refer to in postmaster.c are defined in the > > supplied header file (not to mention other idiocies I was able to > > negotiate past). Apparently Apple have never heard of code portability. > > -- > Sandy McArthur > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073