dbTalk Databases Forums  

Build on Windows using MinGW32 Fails

comp.databases.postgresql comp.databases.postgresql


Discuss Build on Windows using MinGW32 Fails in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eric
 
Posts: n/a

Default Build on Windows using MinGW32 Fails - 03-14-2007 , 12:38 PM






Hi,

Hope this is the right group for this...please let me know if there is
a better one.

I have tried a whole bunch of things to get a windows build on 8.1.8
and am stuck in the beginning of the build.

Downloaded the MinGW/Msys tools as specified. Downloaded the tar ball
and unpacked it. Ran configure successfully with (--without-zlib
option).

Get the error running make - gcc.exe says

gcc.exe: no input files

on first file it tries to compile (details here):

$ make
c:/mingw/bin/make.exe -C doc all
make.exe[1]: Entering directory `C:/MinGW/home/postgres/
postgresql-8.1.8/doc'
make.exe[1]: Nothing to be done for `all'.
make.exe[1]: Leaving directory `C:/MinGW/home/postgres/
postgresql-8.1.8/doc'
c:/mingw/bin/make.exe -C src all
make.exe[1]: Entering directory `C:/MinGW/home/postgres/
postgresql-8.1.8/src'
c:/mingw/bin/make.exe -C port all
make.exe[2]: Entering directory `C:/MinGW/home/postgres/
postgresql-8.1.8/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
I../../src/port -DFRONTEND -I../../src/include -I./src/include/port/
win32 -DEXEC_BACKEND -I/mingw/include "-I../../src/include/port/
win32" -c -o crypt.o crypt.c
gcc.exe: no input files
make.exe[2]: *** [crypt.o] Error 1
make.exe[2]: Leaving directory `C:/MinGW/home/postgres/
postgresql-8.1.8/src/port'
make.exe[1]: *** [all] Error 2
make.exe[1]: Leaving directory `C:/MinGW/home/postgres/
postgresql-8.1.8/src'
c:\mingw\bin\make.exe: *** [all] Error 2

<end details>

I pasted the gcc command for crypt.c into the msys shell and executed
it manually, and it compiled ok. gcc doesn't tell me exactly which
input file it can't find, but I am assuming it's crypt.c. It would
almost appear as if make wasn't successfully changing directory to src/
port as it says it is above.

I verified that the current directory is in my PATH.

I also tried including some includes and libs specifically per another
posting, that didn't work either.

I am running this under a postgres user and not administrator (which I
also tried). Have tried versions 8.1.5 and 8.1.8.

Have read the FAQ too and many usenet postings.

Getting desperate!

Eric


Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-15-2007 , 05:24 AM






Eric <fishware (AT) comcast (DOT) net> wrote:
Quote:
Hope this is the right group for this...please let me know if there is
a better one.
This is the correct newsgroup.
The mailing lists may also help you
(http://www.postgresql.org/community/lists/).

Quote:
I have tried a whole bunch of things to get a windows build on 8.1.8
and am stuck in the beginning of the build.

Downloaded the MinGW/Msys tools as specified. Downloaded the tar ball
and unpacked it. Ran configure successfully with (--without-zlib
option).

Get the error running make - gcc.exe says

gcc.exe: no input files

on first file it tries to compile (details here):

$ make
c:/mingw/bin/make.exe -C doc all
make.exe[1]: Entering directory `C:/MinGW/home/postgres/
postgresql-8.1.8/doc'
[...]
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
I../../src/port -DFRONTEND -I../../src/include -I./src/include/port/
win32 -DEXEC_BACKEND -I/mingw/include "-I../../src/include/port/
win32" -c -o crypt.o crypt.c
gcc.exe: no input files
make.exe[2]: *** [crypt.o] Error 1
make.exe[2]: Leaving directory `C:/MinGW/home/postgres/
postgresql-8.1.8/src/port'
I have all sorts of problems with MinGW, but never this.

What strikes me as strange is the 'c:/mingw/bin/make.exe'.
This a Windows Path and should not be there.

On my system, the output starts with:

make -C doc all
make[1]: Entering directory `/home/lanadvall/postgres/doc'
make[1]: Nothing to be done for `all'.

So I guess there's something wrong with your MinGW setup.

- Are you in an rxvt (correct) or on an MS-DOS prompt (wrong)?
- What do you get when you say 'which gcc'?

Unfortunately I am not a MinGW expert...

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Eric
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-15-2007 , 09:06 AM



On Mar 15, 3:24 am, Laurenz Albe <inv... (AT) spam (DOT) to.invalid> wrote:
Quote:
Eric <fishw... (AT) comcast (DOT) net> wrote:
Hope this is the right group for this...please let me know if there is
a better one.

This is the correct newsgroup.
The mailing lists may also help you
(http://www.postgresql.org/community/lists/).

Also found after much searching the pgsql.* newsgroups (e.g.
pgsql.admin; not preceded by comp.databases)...amazingly it took me
awhile to find those, they are relatively active...would be nice to
let people know about these in the postgres docs (there is a link to
"Community" I think).


Quote:
What strikes me as strange is the 'c:/mingw/bin/make.exe'.
This a Windows Path and should not be there.

On my system, the output starts with:

make -C doc all
make[1]: Entering directory `/home/lanadvall/postgres/doc'
make[1]: Nothing to be done for `all'.

So I guess there's something wrong with your MinGW setup.

- Are you in an rxvt (correct) or on an MS-DOS prompt (wrong)?
- What do you get when you say 'whichgcc'?

Not sure what rxvt is, but I'm using the msys shell, not dos (launched
from dos command prompt with the runas postgres user - but also tried
starting up with windows admin account - same error either way).

'which gcc' gives /mingw/bin/gcc

tried renaming gcc.exe to gcc2.exe and executing again to make sure I
have the right one and the compile doesn't get off the ground because
gcc.exe no longer exists. Also tried as indicated the command line
make generates, which works fine - only not when launched in make.
Was wondering if there were a way to get a more verbose output of
what make is doing to see if there was a more detailed error.

I also tried running gcc with a bogus file name for the input and it
gives me a different error message - "No such file or directory"
precedes "no input files" - this would indicate to me that either I'm
not seeing the entire error stream.

Maybe it's time to reinstall mingw. I do remember the installation
instructions as being a little vague. I think I installed mingw
first, then msys, using the mingw directory in the second case
(putting everything into the same bin dir I think). Thought that was
what I was supposed to do but looking back the default may have been
different. Do you have all your msys and mingw stuff in one bin dir
or two?

Quote:
Unfortunately I am not a MinGW expert...

I was hoping I wouldn't have to be. Was hoping that there was a VC++
option for debugging purposes (my understanding is that gdb is pretty
poor on Windows). Next step is to try this on my wife's Mac under OS
X or go out and buy a separate Linux box. A new can of worms.

Quote:
Yours,
Laurenz Albe
Thanks much.




Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-16-2007 , 03:12 AM



Eric <fishware (AT) comcast (DOT) net> wrote:
Quote:
Also found after much searching the pgsql.* newsgroups (e.g.
pgsql.admin; not preceded by comp.databases)...amazingly it took me
awhile to find those, they are relatively active...would be nice to
let people know about these in the postgres docs (there is a link to
"Community" I think).
These *are* the mailing lists - as described on the page I sent you,
they are also accessible via the PostgreSQL news server.

Quote:
- Are you in an rxvt (correct) or on an MS-DOS prompt (wrong)?

Not sure what rxvt is, but I'm using the msys shell, not dos (launched
from dos command prompt with the runas postgres user - but also tried
starting up with windows admin account - same error either way).
rxvt is an X terminal ported to mingw - but it also works on my
system if I start cmd, start /c/msys/bin/sh.exe and continue from there.

What is the output of 'ps' when you are in your shell?

Quote:
Maybe it's time to reinstall mingw. I do remember the installation
instructions as being a little vague. I think I installed mingw
first, then msys, using the mingw directory in the second case
(putting everything into the same bin dir I think). Thought that was
what I was supposed to do but looking back the default may have been
different. Do you have all your msys and mingw stuff in one bin dir
or two?
My mingw directory is a subdirectory of C:\msys
I also only have dim memories of how I did it back then...

Quote:
Next step is to try this on my wife's Mac under OS
X or go out and buy a separate Linux box. A new can of worms.
Linux is of course the OS where PostgreSQL compiles with the least
problems.

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
jpd
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-16-2007 , 07:48 AM



Begin <1173971187.402264.263680 (AT) y66g2000hsf (DOT) googlegroups.com>
On 2007-03-15, Eric <fishware (AT) comcast (DOT) net> wrote:
Quote:
Next step is to try this on my wife's Mac under OS X or go out and buy
a separate Linux box. A new can of worms.
What is your goal then? Compiling PostgreSQL? If so, why? Then a unix-y
environment would probably be easier, altough it'd help if you'd spend
some time learning about unix, its workings and its tools first.

If you're more interested in running it, you could try

http://www.postgresql.org/ftp/binary/v8.1.4/win32/


--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.


Reply With Quote
  #6  
Old   
Lew
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-17-2007 , 03:59 PM



jpd wrote:
Quote:
Begin <1173971187.402264.263680 (AT) y66g2000hsf (DOT) googlegroups.com
On 2007-03-15, Eric <fishware (AT) comcast (DOT) net> wrote:
Next step is to try this on my wife's Mac under OS X or go out and buy
a separate Linux box. A new can of worms.

What is your goal then? Compiling PostgreSQL? If so, why? Then a unix-y
environment would probably be easier, altough it'd help if you'd spend
some time learning about unix, its workings and its tools first.

If you're more interested in running it, you could try

http://www.postgresql.org/ftp/binary/v8.1.4/win32/
Doesn't cygwin provide a prebuilt windows Postgre?

-- Lew


Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Build on Windows using MinGW32 Fails - 03-19-2007 , 02:37 AM



Lew <lew (AT) nospam (DOT) lewscanon.com> wrote:
Quote:
Doesn't cygwin provide a prebuilt windows Postgre?
If you need a pre-built binary for Windows, take the MinGW build from
postgresql.org.

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.