Bug 188527 - databases/libdbi-drivers fails to build on FreeBSD 10.0
Summary: databases/libdbi-drivers fails to build on FreeBSD 10.0
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-12 19:40 UTC by holger
Modified: 2014-09-27 12:55 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description holger 2014-04-12 19:40:01 UTC
libdbi-drivers can not be built. It fails that dbi/dbi.h can not be found. -I/usr/local/include does not appear to be in the command line:


gmake[6]: Entering directory `/var/ports/basejail/usr/ports/databases/libdbi-drivers/work/libdbi-drivers-0.9.0/drivers/sqlite3'
/bin/sh /usr/local/bin/libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I/usr/local/include/dbi  -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\"   -std=gnu99 -O2 -pipe -fno-strict-aliasing -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo dbd_sqlite3.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I/usr/local/include/dbi -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -O2 -pipe -fno-strict-aliasing -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c  -fPIC -DPIC -o .libs/dbd_sqlite3.o
dbd_sqlite3.c:56:10: fatal error: 'dbi/dbi.h' file not found
#include <dbi/dbi.h>
         ^
1 error generated.
gmake[6]: *** [dbd_sqlite3.lo] Error 1
gmake[6]: Leaving directory `/var/ports/basejail/usr/ports/databases/libdbi-drivers/work/libdbi-drivers-0.9.0/drivers/sqlite3'
gmake[5]: *** [all-recursive] Error 1
gmake[5]: Leaving directory `/var/ports/basejail/usr/ports/databases/libdbi-drivers/work/libdbi-drivers-0.9.0/drivers'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/var/ports/basejail/usr/ports/databases/libdbi-drivers/work/libdbi-drivers-0.9.0'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/var/ports/basejail/usr/ports/databases/libdbi-drivers/work/libdbi-drivers-0.9.0'

Fix: 

Patch the code to include dbi.h only or make sure -I/usr/local/include  is in the compiler flags
How-To-Repeat: make -C /usr/ports/databases/libdbi-drivers install
Comment 2 Warren Block freebsd_committer freebsd_triage 2014-07-27 16:44:12 UTC
It depends on the options.  With PGSQL or PGSQL and SQLITE3, it builds fine.  (MYSQL was always off in these tests.)
 
With SQLITE3 alone, it fails:
 
  libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I/usr/local/include/dbi -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -O2 -pipe -march=corei7 -fno-strict-aliasing -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c  -fPIC -DPIC -o .libs/dbd_sqlite3.o
  dbd_sqlite3.c:56:10: fatal error: 'dbi/dbi.h' file not found
  #include <dbi/dbi.h>

It's looking in /usr/local/include/dbi for dbi/dbi.h, one level too deep.
Comment 3 John Marino freebsd_committer freebsd_triage 2014-07-27 16:50:44 UTC
maybe try hardcoding CFLAGS+= -I${LOCALBASE} ?

There's no maintainer for the port, so a user is going to have to come up with the patch..
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2014-09-27 12:55:11 UTC
This has been fixed. libdbi now installs headers in include/dbi, so they are correctly picked up by libdbi-drivers, even if only SQLITE is selected. Closing this bug report.