Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 497698

Summary: dev-lua/luadbi: luadbi fails to build with postgres support
Product: Gentoo Linux Reporter: Alexander Sulfrian <alexander>
Component: [OLD] DevelopmentAssignee: Manuel Rüger (RETIRED) <mrueg>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for adding the correct include directory

Description Alexander Sulfrian 2014-01-10 10:57:54 UTC
While compiling luadbi-0.5-r3 with USE="postgres" the following error occurs:

make -j3 CC=x86_64-pc-linux-gnu-gcc 'COMMON_LDFLAGS=-Wl,-O1 -Wl,--as-needed' psql 
mkdir -p build
x86_64-pc-linux-gnu-gcc -c -o build/dbd_common.o dbd/common.c -march=athlon64 -msse3 -O2 -pipe -fPIC -pedantic -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I . -I/usr/include/postgresql-9.3
x86_64-pc-linux-gnu-gcc -c -o build/dbd_postgresql_main.o dbd/postgresql/main.c -march=athlon64 -msse3 -O2 -pipe -fPIC -pedantic -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I . -I/usr/include/postgresql-9.3
x86_64-pc-linux-gnu-gcc -c -o build/dbd_postgresql_connection.o dbd/postgresql/connection.c -march=athlon64 -msse3 -O2 -pipe -fPIC -pedantic -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I . -I/usr/include/postgresql-9.3
x86_64-pc-linux-gnu-gcc -c -o build/dbd_postgresql_statement.o dbd/postgresql/statement.c -march=athlon64 -msse3 -O2 -pipe -fPIC -pedantic -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I . -I/usr/include/postgresql-9.3
In file included from /usr/include/postgresql/server/postgres_fe.h:27:0,
                 from dbd/postgresql/dbd_postgresql.h:2,
                 from dbd/postgresql/main.c:1:
/usr/include/postgresql/server/common/fe_memutils.h:18:26: fatal error: utils/palloc.h: No such file or directory
compilation terminated.
make: *** [build/dbd_postgresql_main.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/include/postgresql/server/postgres_fe.h:27:0,
                 from dbd/postgresql/dbd_postgresql.h:2,
                 from dbd/postgresql/connection.c:1:
/usr/include/postgresql/server/common/fe_memutils.h:18:26: fatal error: utils/palloc.h: No such file or directory
compilation terminated.
make: *** [build/dbd_postgresql_connection.o] Error 1
In file included from /usr/include/postgresql/server/postgres_fe.h:27:0,
                 from dbd/postgresql/dbd_postgresql.h:2,
                 from dbd/postgresql/statement.c:1:
/usr/include/postgresql/server/common/fe_memutils.h:18:26: fatal error: utils/palloc.h: No such file or directory
compilation terminated.
make: *** [build/dbd_postgresql_statement.o] Error 1


Currently there is a patch in the ebuild to change the path for including postgres_fe.h. In my opinion this is the wrong way trying to fix this. Instead /usr/include/postgresql/server/ should be added to the include path.

Reproducible: Always
Comment 1 Alexander Sulfrian 2014-01-10 10:59:00 UTC
Created attachment 367566 [details, diff]
Patch for adding the correct include directory
Comment 2 Manuel Rüger (RETIRED) gentoo-dev 2014-01-13 03:48:58 UTC
Thanks! 


*luadbi-0.5-r4 (13 Jan 2014)

  13 Jan 2014; Manuel Rüger <mrueg@gentoo.org> +luadbi-0.5-r4.ebuild:
  Add fix for postgres' server include path by Alexander Sulfrian. Fixes bug
  #497698.