Hi Tom Lane, 




Thanks for the help.



I had extracted PG using WinZip outside of MSYS2, and it was causing many of 
the errors, may be due to some errors in file attributes. So I unpacked the 
source tarball within the shell itself(using gunzip and tar), and I could fix 
many errors.



Now new errors are popping up. I've compared the config file with the file 
given in the URL, but I couldn't fix this yet.



The current error is basically due to the fact that, PUTENVPROC macro is 
defined to empty.



Config output and make error output are uploaded here 
https://gist.github.com/codercet/760ae3b0337144059570ccfc06e2a847



config.log is available here 
https://gist.github.com/codercet/725cc5fdd0acfbf5193d891bffb4dfda



The error output while doing make is



gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement 
-Wendif-labels -Wmissing-format-attribute -Wformat-security 
-fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -std=c11 
-I../../src/port -DFRONTEND -I../../src/include  -I./src/include/port/win32 
-DEXEC_BACKEND  "-I../../src/include/port/win32" -DBUILDING_DLL  -c -o 
win32env.o win32env.c

win32env.c: In function 'pgwin32_putenv':

win32env.c:24:22: error: expected ')' before '*' token

  typedef int (_cdecl * PUTENVPROC) (const char *);

                      ^

win32env.c:96:4: error: unknown type name 'PUTENVPROC'; did you mean 
'IMCENUMPROC'?

    PUTENVPROC putenvFunc;

    ^~~~~~~~~~

    IMCENUMPROC

win32env.c:98:18: error: 'PUTENVPROC' undeclared (first use in this function); 
did you mean 'IMCENUMPROC'?

    putenvFunc = (PUTENVPROC) GetProcAddress(hmodule, "_putenv");

                  ^~~~~~~~~~

                  IMCENUMPROC

win32env.c:98:18: note: each undeclared identifier is reported only once for 
each function it appears in

win32env.c:98:30: error: expected ';' before 'GetProcAddress'

    putenvFunc = (PUTENVPROC) GetProcAddress(hmodule, "_putenv");

                              ^~~~~~~~~~~~~~

win32env.c:100:5: error: called object 'putenvFunc' is not a function or 
function pointer

     putenvFunc(envval);

     ^~~~~~~~~~

win32env.c:96:15: note: declared here

    PUTENVPROC putenvFunc;

               ^~~~~~~~~~

make[2]: *** [<builtin>: win32env.o] Error 1

make[2]: Leaving directory '/home/admin/postgresql-10.0/src/port'

make[1]: *** [Makefile:37: all-port-recurse] Error 2

make[1]: Leaving directory '/home/admin/postgresql-10.0/src'

make: *** [GNUmakefile:11: all-src-recurse] Error 2





Could you please help?



Best Regards,

Mohamed Insaf K

---- On Fri, 27 Apr 2018 21:01:56 +0530 Tom Lane <t...@sss.pgh.pa.us> 
wrote ----




"insaf.k" <insa...@zohocorp.com> writes: 

> I am trying to build PG from source, in MS Windows using MSYS2 and 
MinGW-w64. I've tried to build PG 10.0 as wells as 10.3. 

> I've done configuring like this 

> ./configure --prefix="/d/pg10/" 

> And when I do "make" or "make world", I'm getting compilation error. I've 
attached complete error report at the end of the mail. 

 

I don't know anything about mingw, but from the first error message you 

showed, I'd venture that configure failed to fill in pg_config_ext.h 

correctly. It should have put in a line like 

 

#define PG_INT64_TYPE long long int 

 

and evidently it hasn't. This suggests that there's something wrong 

with one of the text-processing tools it uses, such as "sed". You 

might look into config.log and see if there are any relevant-looking 

error messages (probably down near the end). Also, try comparing 

your configure text output and config.log to those of one of our 

buildfarm machines that's using mingw successfully, such as 

 

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2018-04-27%2012%3A19%3A49
 

 

(the "config" and "configure" links on that page are what to compare to). 

 

Hm ... I notice that jacana's been set up so that it explicitly 

gives configure a --host setting instead of letting configure work 

that out. No idea if that was really necessary or not. 

 

            regards, tom lane 






Reply via email to