Thread: Windows on SuSE? 7.4

Windows on SuSE? 7.4

From
elein
Date:
SuSE 7.3, PostgreSQL cvshead (7.4)

This is as far as I've gotten with 7.4.
It is built and configured like my 7.3 installation
on the same machine.  I have built from CVS previously.  
And the production sources always builds very nice and clean.

Nothing runs.  gbd output is below. It is balking
on loading a suspect library.

I ordinarily would suspect some minor permission 
or configuration issue, but I cannot see one.   

Joe Conway suggested it might be a problem with the
the windows configuration changes.

My machine has WINE on it (windows) although
I never use it.  There really should be no
reason for anything to be trying to link
in a windows socket library.

I don't have time to follow it further right now.
But if someone else has a similar configuration
and/or wine installed, it would be very helpful
to compare 7.4 installations.  I can provide
config arguments and log if someone would find
them useful.

>gdb bin/postmaster
GNU gdb 20010316
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-suse-linux"...
(gdb) run -i -D /local/pghead/data
Starting program: /local/pghead/bin/postmaster -i -D /local/pghead/data

Program received signal SIGSEGV, Segmentation fault.
0x40099ac5 in dllname () from /usr/lib/libwsock32.so
(gdb) bt
#0  0x40099ac5 in dllname () from /usr/lib/libwsock32.so
#1  0x08121821 in StreamServerPort ()
#2  0x08150996 in PostmasterMain ()
#3  0x08123353 in main ()
#4  0x4010e7ee in __libc_start_main () from /lib/libc.so.6


elein@varlena.com


Re: Windows on SuSE? 7.4

From
Bruce Momjian
Date:
That line is certainly strange:
#0  0x40099ac5 in dllname () from /usr/lib/libwsock32.so

When you run configure, it says you are on Linux, right?

My guess is that gdb is getting confused because there is no dllopen
call in StreamServerPort().

---------------------------------------------------------------------------

elein wrote:
> 
> SuSE 7.3, PostgreSQL cvshead (7.4)
> 
> This is as far as I've gotten with 7.4.
> It is built and configured like my 7.3 installation
> on the same machine.  I have built from CVS previously.  
> And the production sources always builds very nice and clean.
> 
> Nothing runs.  gbd output is below. It is balking
> on loading a suspect library.
> 
> I ordinarily would suspect some minor permission 
> or configuration issue, but I cannot see one.   
> 
> Joe Conway suggested it might be a problem with the
> the windows configuration changes.
> 
> My machine has WINE on it (windows) although
> I never use it.  There really should be no
> reason for anything to be trying to link
> in a windows socket library.
> 
> I don't have time to follow it further right now.
> But if someone else has a similar configuration
> and/or wine installed, it would be very helpful
> to compare 7.4 installations.  I can provide
> config arguments and log if someone would find
> them useful.
> 
> >gdb bin/postmaster
> GNU gdb 20010316
> Copyright 2001 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-suse-linux"...
> (gdb) run -i -D /local/pghead/data
> Starting program: /local/pghead/bin/postmaster -i -D /local/pghead/data
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x40099ac5 in dllname () from /usr/lib/libwsock32.so
> (gdb) bt
> #0  0x40099ac5 in dllname () from /usr/lib/libwsock32.so
> #1  0x08121821 in StreamServerPort ()
> #2  0x08150996 in PostmasterMain ()
> #3  0x08123353 in main ()
> #4  0x4010e7ee in __libc_start_main () from /lib/libc.so.6
> 
> 
> elein@varlena.com
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
> 

--  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
 


Re: Windows on SuSE? 7.4

From
Tom Lane
Date:
elein <elein@norcov.com> writes:
> This is as far as I've gotten with 7.4.

Would you rebuild with --enable-debug (perhaps also --enable-cassert)
so that the gdb backtrace is more informative?

Also, it seems likely that the issue is in or around the recently-added
IPv6 support, so I'd suggest using CVS tip or last night's snapshot
rather than the beta1 tarball.  We've already made some portability
fixes there since beta1.
        regards, tom lane


Re: Windows on SuSE? 7.4

From
elein
Date:
cassert was on.  Now debug is on, too.
I updated from cvs-head just now.

configure knows it is a linux box.
Should it be trying to link to libwsock32.so
or not?  If this is a legitimate link, then
the problem is different than if it is trying
to link it in erroneously.

--elein

The is the top of the config.log
---------------------
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by PostgreSQL configure 7.4beta1, which was
generated by GNU Autoconf 2.53.  Invocation command line was
 $ ./configure --prefix=/local/pghead --with-perl --with-python --enable-depend --enable-cassert --enable-d
ebug

## --------- ##
## Platform. ##
## --------- ##

hostname = cookie
uname -m = i686
uname -r = 2.4.16-4GB
uname -s = Linux
uname -v = #1 Mon Apr 15 08:57:26 GMT 2002
---------------------


$ gdb postmaster
GNU gdb 20010316
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-suse-linux"...
(gdb)  run -i -D /local/pghead/data
Starting program: /local/pghead/bin/postmaster -i -D /local/pghead/data

Program received signal SIGSEGV, Segmentation fault.
0x40099ac5 in dllname () from /usr/lib/libwsock32.so
(gdb) bt
#0  0x40099ac5 in dllname () from /usr/lib/libwsock32.so
#1  0x081218b1 in StreamServerPort (family=0, hostName=0x0, portNumber=5432, unixSocketName=0x82d6e68 "",
ListenSocket=0x829b420,MaxListen=10) at pqcomm.c:279
 
#2  0x08150a26 in PostmasterMain (argc=4, argv=0x82cfae8) at postmaster.c:765
#3  0x081233e3 in main (argc=4, argv=0xbffff414) at main.c:215
#4  0x4010e7ee in __libc_start_main () from /lib/libc.so.6


On Mon, Aug 11, 2003 at 11:54:39AM -0400, Tom Lane wrote:
> elein <elein@norcov.com> writes:
> > This is as far as I've gotten with 7.4.
> 
> Would you rebuild with --enable-debug (perhaps also --enable-cassert)
> so that the gdb backtrace is more informative?
> 
> Also, it seems likely that the issue is in or around the recently-added
> IPv6 support, so I'd suggest using CVS tip or last night's snapshot
> rather than the beta1 tarball.  We've already made some portability
> fixes there since beta1.
> 
>             regards, tom lane
> 


Re: Windows on SuSE? 7.4

From
Tom Lane
Date:
elein <elein@norcov.com> writes:
> configure knows it is a linux box.
> Should it be trying to link to libwsock32.so
> or not?  If this is a legitimate link, then
> the problem is different than if it is trying
> to link it in erroneously.

configure is unconditionally including libwsock32 if it can find one.
AFAICT from the CVS logs, this was only expected to happen on win32
(Bruce, that was your commit, configure.in v1.250; please confirm).
So it would probably make sense to not look for libwsock32 unless
PORTNAME is "win32".

I take it you actually have a libwsock32?  What's it supposed to do?
        regards, tom lane


Re: Windows on SuSE? 7.4

From
elein
Date:
Yes, I actually have a libwsock32 because my
system has wine on it.  Wine is a windows 
emulator.  

So the assumption that any system with that
file is a windows system will break on 
systems with windows emulators.

It sounds like Joe's guess on this was right.

--elein


On Mon, Aug 11, 2003 at 01:29:19PM -0400, Tom Lane wrote:
> elein <elein@norcov.com> writes:
> > configure knows it is a linux box.
> > Should it be trying to link to libwsock32.so
> > or not?  If this is a legitimate link, then
> > the problem is different than if it is trying
> > to link it in erroneously.
> 
> configure is unconditionally including libwsock32 if it can find one.
> AFAICT from the CVS logs, this was only expected to happen on win32
> (Bruce, that was your commit, configure.in v1.250; please confirm).
> So it would probably make sense to not look for libwsock32 unless
> PORTNAME is "win32".
> 
> I take it you actually have a libwsock32?  What's it supposed to do?
> 
>             regards, tom lane
> 


Re: Windows on SuSE? 7.4

From
Tom Lane
Date:
elein <elein@norcov.com> writes:
> Yes, I actually have a libwsock32 because my
> system has wine on it.  Wine is a windows 
> emulator.  

And they drop windows-only libraries into /usr/lib?  Yech.

Anyway, I can't see a need to include libwsock32 on non-win32 platforms.
Will modify configure.
        regards, tom lane


Re: Windows on SuSE? 7.4

From
Tom Lane
Date:
elein <elein@norcov.com> writes:
> It sounds like Joe's guess on this was right.

I've committed this fix in configure.in:

***************
*** 631,637 **** AC_CHECK_LIB(gen,      main) AC_CHECK_LIB(PW,       main) AC_CHECK_LIB(resolv,   main)
- AC_CHECK_LIB(wsock32,   main) AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt]) # QNX: AC_CHECK_LIB(unix, main)
--- 636,641 ----
***************
*** 645,650 ****
--- 649,659 ---- AC_SEARCH_LIBS(fdatasync, [rt posix4]) # Cygwin: AC_CHECK_LIB(cygipc, shmget)
+ # WIN32:
+ if test "$PORTNAME" = "win32"
+ then
+     AC_CHECK_LIB(wsock32, main)
+ fi  if test "$with_readline" = yes; then   PGAC_CHECK_READLINE

        regards, tom lane


Re: Windows on SuSE? 7.4

From
Robert Treat
Date:
On Mon, 2003-08-11 at 13:44, elein wrote:
> Yes, I actually have a libwsock32 because my
> system has wine on it.  Wine is a windows 
> emulator.  
> 

Wine Is Not an Emulator :-)

Robert Treat
-- 
PostgreSQL :: The Enterprise Open Source Database



Re: Windows on SuSE? 7.4

From
Bruce Momjian
Date:
Yes, this is the right fix.  I never suspected wsock32 would exist on a
non-MS WIn machine.

---------------------------------------------------------------------------

Tom Lane wrote:
> elein <elein@norcov.com> writes:
> > It sounds like Joe's guess on this was right.
> 
> I've committed this fix in configure.in:
> 
> ***************
> *** 631,637 ****
>   AC_CHECK_LIB(gen,      main)
>   AC_CHECK_LIB(PW,       main)
>   AC_CHECK_LIB(resolv,   main)
> - AC_CHECK_LIB(wsock32,   main)
>   AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt])
>   # QNX:
>   AC_CHECK_LIB(unix, main)
> --- 636,641 ----
> ***************
> *** 645,650 ****
> --- 649,659 ----
>   AC_SEARCH_LIBS(fdatasync, [rt posix4])
>   # Cygwin:
>   AC_CHECK_LIB(cygipc, shmget)
> + # WIN32:
> + if test "$PORTNAME" = "win32"
> + then
> +     AC_CHECK_LIB(wsock32, main)
> + fi
>   
>   if test "$with_readline" = yes; then
>     PGAC_CHECK_READLINE
> 
> 
>             regards, tom lane
> 

--  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
 


Re: Windows on SuSE? 7.4

From
elein
Date:
I blame SuSE.  

Thank you for the fix and confirmation of the problem.

elein

On Mon, Aug 11, 2003 at 01:53:31PM -0400, Tom Lane wrote:
> elein <elein@norcov.com> writes:
> > Yes, I actually have a libwsock32 because my
> > system has wine on it.  Wine is a windows 
> > emulator.  
> 
> And they drop windows-only libraries into /usr/lib?  Yech.
> 
> Anyway, I can't see a need to include libwsock32 on non-win32 platforms.
> Will modify configure.
> 
>             regards, tom lane
>