mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Native pg_conf failing on FreeBSD


From: Tony Theodore
Subject: [Mingw-cross-env-list] Native pg_conf failing on FreeBSD
Date: Sat, 13 Feb 2010 19:48:13 +1100

FreeBSD was failing at the native pg_conf build step with errors along
the lines of:

# Build a native pg_config.
echo '/* empty */'
>'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/include/pg_config_os.h
gcc -I'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/include
-DFRONTEND 
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/snprintf.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/path.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/strlcat.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/strlcpy.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/thread.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/port/exec.c
'/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2'/src/bin/pg_config/pg_config.c
-o '/home/tony/mingw-cross-env/usr/i686-pc-mingw32'/bin/pg_config
In file included from
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/include/c.h:854,
                 from
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/port/snprintf.c:33:
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/include/port.h:398:
error: conflicting types for 'srandom'
/usr/include/stdlib.h:217: error: previous declaration of 'srandom' was here
In file included from
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/include/c.h:854,
                 from
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/port/path.c:16:
/home/tony/mingw-cross-env/tmp-postgresql/postgresql-8.4.2/src/include/port.h:398:
error: conflicting types for 'srandom'
/usr/include/stdlib.h:217: error: previous declaration of 'srandom' was here
.....

It seems (http://thread.gmane.org/gmane.comp.db.postgresql.ports/890)
that running ./configure will create the required header files in the
right location. This change works on FreeBSD and OSX, and I'm fairly
sure will also across other systems.

diff -r 4900eca60bd8 src/postgresql.mk
--- a/src/postgresql.mk Fri Feb 12 20:49:40 2010 +0100
+++ b/src/postgresql.mk Sat Feb 13 19:44:57 2010 +1100
@@ -57,7 +57,7 @@
     $(INSTALL) -m664 '$(1)/src/include/pg_config.h'
'$(PREFIX)/$(TARGET)/include/'
     $(INSTALL) -m664 '$(1)/src/include/postgres_ext.h'
'$(PREFIX)/$(TARGET)/include/'
     # Build a native pg_config.
-    echo '/* empty */' >'$(1)'/src/include/pg_config_os.h
+    cd '$(1)' && ./configure
     gcc \
         -I'$(1)'/src/include \
         -DFRONTEND \


Regards,

Tony




reply via email to

[Prev in Thread] Current Thread [Next in Thread]