Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 364141 - dev-lua/luadbi wrong include path for postgresql
Summary: dev-lua/luadbi wrong include path for postgresql
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL: http://code.google.com/p/luadbi/issue...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 15:22 UTC by Wicher Minnaard
Modified: 2013-05-12 16:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to ebuild, to apply files/0.5-postgrespath.patch (luadbi0.5.ebuild.patch,667 bytes, text/plain)
2011-04-19 15:22 UTC, Wicher Minnaard
Details
files/0.5-postgrespath.patch (0.5-postgrespath.patch,428 bytes, patch)
2011-04-19 15:22 UTC, Wicher Minnaard
Details | Diff
files/0.5-postgrespath.patch (0.5-postgrespath.patch,277 bytes, patch)
2011-04-19 15:26 UTC, Wicher Minnaard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wicher Minnaard 2011-04-19 15:22:28 UTC
Created attachment 270555 [details]
patch to ebuild, to apply files/0.5-postgrespath.patch

While compiling dev-lua/luadbi-0.5 with USE="postgres sqlite -mysql":

gcc -c -o build/dbd_postgresql_main.o dbd/postgresql/main.c -g -pedantic -Wall -O2 -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/p
ostgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
In file included from dbd/postgresql/main.c:1:0:
dbd/postgresql/dbd_postgresql.h:2:25: fatal error: postgres_fe.h: No such file or directory
compilation terminated.
make: *** [build/dbd_postgresql_main.o] Error 1
emake failed


Postgresql headers are installed (by dev-db/postgresql-base-9.0.3) in

/usr/include/postgresql-9.0/server/postgres_fe.h


Patch included.
Comment 1 Wicher Minnaard 2011-04-19 15:22:54 UTC
Created attachment 270557 [details, diff]
files/0.5-postgrespath.patch
Comment 2 Wicher Minnaard 2011-04-19 15:26:04 UTC
Created attachment 270559 [details, diff]
files/0.5-postgrespath.patch

(previous one was the patch diffed against /dev/null, this is more convenient)
Comment 3 Rafał Mużyło 2011-04-19 15:43:50 UTC
I suspect that 'eselect postgresql' was the correct answer to the problem.
Comment 4 Wicher Minnaard 2011-04-19 20:36:03 UTC
Eselect:

#eselect postgresql show-all
Utilities:  9.0
Service:    9.0


I am under the impression that the problem is with the path to postgres_fe.h *inside* /usr/include/postgresql-*/ . Eselect just governs the /usr/include/postgresql symlink, right?
Comment 5 Aaron W. Swenson gentoo-dev 2011-04-19 21:39:58 UTC
(In reply to comment #4)
> Eselect:
> 
> #eselect postgresql show-all
> Utilities:  9.0
> Service:    9.0
> 
> 
> I am under the impression that the problem is with the path to postgres_fe.h
> *inside* /usr/include/postgresql-*/ . Eselect just governs the
> /usr/include/postgresql symlink, right?

More than that, it places symlinks in common places to look for headers. postgres_fe.h is not explicitly one of them.

However, the version of the eselect module you're using doesn't create a '/usr/include/postgresql/' symlink. Upgrade to eselect-postgresql-1.0.7.
Comment 6 Aaron W. Swenson gentoo-dev 2011-04-19 21:47:56 UTC
And upstream PostgreSQL does place postgres_fe.h in '/usr/include/postgresql/server/'. Upstream dev-lua/luadbi needs to be bugged about it.
Comment 7 Wicher Minnaard 2011-04-19 23:09:24 UTC
My previous eselect-postgresql did in fact create the /usr/include/postgresql symlink (which is why came to mention it in #c4).

Upgrading to eselect-postgresql-1.0.7 and reconfiguring didn't help. The patches I attached address the issue. Hope upstream resolves this.
Comment 8 Rafał Mużyło 2011-04-20 13:14:06 UTC
Note: 'pg_config --includedir-server'.
Thank you.
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-05-02 16:24:05 UTC
Reported upstream at http://code.google.com/p/luadbi/issues/detail?id=11.
Comment 10 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-05-02 16:37:58 UTC
Committed 0.5-r1 which includes the proposed patch, thanks!
Comment 11 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2013-05-12 16:57:23 UTC
I also patch upstream's buildsystem[1] so i'll be possible to just
> PSQL_INC=-I/usr/include/postgresql/server
instead of both patches