[Plr-general] Compiling plr under MSYS
Mike Leahy
mgleahy at alumni.uwaterloo.ca
Tue Dec 16 22:47:53 UTC 2008
Hello Joe/Yuri,
If you check the mailing list archives from a while back, you should
find some posts from me when I tried compiling plr against 8.3 - as-of
8.3.x, the distributed win32 binaries for PostgreSQL are compiled in
msvc. I'm not sure if that means they are incompatible with
MinGW/MSYS, but since that change, the pgxs files in /lib have not been
included with the binaries included by the installer. I contacted the
PostgreSQL list about this, but didn't really get a conclusive response
(that I can recall off-hand). There is even a bug, but the story
sort-of ends here:
http://archives.postgresql.org/pgsql-bugs/2008-03/msg00226.php
My guess is that what needs to happen for plr to remain compatible with
the main official PostgreSQL binaries is that plr must be setup to
compile in the same msvc environment. Maybe someone from the PostgreSQL
team could be drafted to help with this?
Mike
Yuri Galachyants wrote:
> On Tue, Dec 16, 2008 at 2:10 PM, Joe Conway <mail at joeconway.com> wrote:
>> Have you run ./configure at the postgres source root?
>>
> No, I didn't. Now, when I run it breaks at some point:
> ./configure --build=i686-pc-mingw32
> checking build system type... i686-pc-mingw32
> checking host system type... i686-pc-mingw32
> checking which template to use... win32
> checking whether to build with 64-bit integer date/time support... no
> checking whether NLS is wanted... no
> checking for default port number... 5432
> checking for gcc... gcc
> checking for C compiler default output file name... a.exe
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking if gcc supports -Wdeclaration-after-statement... no
> checking if gcc supports -Wendif-labels... no
> checking if gcc supports -fno-strict-aliasing... yes
> checking if gcc supports -fwrapv... no
> configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Winline -fno-strict-aliasing
> checking whether the C compiler still works... no
> configure: error: cannot proceed
>
>> pg_config is either not present or not executable. Did you install postgres
>> from the standard MSI installer? If so, did you include development support?
> With PGXS, It looks odd but I installed it with SDK, but no PGXS
> appears in lib directory. So, I downloaded linux SDK rpm and copy it
> to database tree. Problem was in there were pg_config and
> pg_config.exe in bin and MSYS tried to run linux's pg_config.
>
> Now the problem still remains:
>
> $ USE_PGXS=1 make
> gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386
> -mtune=generic -fasynchronous-unwind-tables -I/usr/include/et -Wall
> -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv -fpic -I"." -I"D:\R/include" -ID:\R/include -I.
> -Id:/pgsql/include/server -Id:/pgsql/include/internal
> -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include
> -DPKGLIBDIR=\"d:/pgsql/lib\" -DDLSUFFIX=\".so\" -DR_HOME_DEFAULT=\"\"
> -c -o plr.o plr.c
> cc1.exe: Invalid option `32'
> cc1.exe: Invalid option `tune=generic'
> cc1.exe: Invalid option `-Wdeclaration-after-statement'
> cc1.exe: Invalid option `-Wendif-labels'
> cc1.exe: Invalid option `-fstack-protector'
> cc1.exe: Invalid option `-fparam=ssp-buffer-size=4'
> cc1.exe: Invalid option `-fasynchronous-unwind-tables'
> cc1.exe: Invalid option `-fwrapv'
>
> This long listing on error messages on conflicting types and
> redefinitions ends with script stop.
>
> Does it means that something wrong with compiler?
>
> $ make --version
> GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
> Built for i686-pc-msys
>
> $ gcc --version
> 2.95.3-1
>
> Best regards, Yuri.
> _______________________________________________
> Plr-general mailing list
> Plr-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/plr-general
>
More information about the Plr-general
mailing list