Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289519 - Emerging libdbi-drivers with USE="firebird" fails because of missing libfbembed.so
Summary: Emerging libdbi-drivers with USE="firebird" fails because of missing libfbemb...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 20:20 UTC by Daniel Tremblay
Modified: 2009-10-26 07:19 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tremblay 2009-10-17 20:20:19 UTC
The emerge command failed in ebuild dev-db/libdbi-drivers-0.8.3.  

This ebuild has two problems for the current firebird ebuild:
1. the path for the libraries is wrong (need to seek for executables in /usr/bin, includes in /usr/include and libraries in /usr/lib).
2. the library libfbembed.so is not necessarily deployed.  The ebuild should check while version of firebird is deployed and use either libfbembed.so or libfbclient.so.



Reproducible: Always

Steps to Reproduce:
1. add USE flag "firebird"
2. emerge firebird first, then emerge libdbi-drivers (emerge world, is what I was doing).
3. when the error message shows up, you will get an error that firebird was not found (failure in the configure script).
4. if you fix the configure script by add --with-firebird-dir=/usr/bin in the ebuild, then run "ebuild libdbi-drivers-0.8.3.ebuild manifest"
5. You then get an error stating that libfbembed.so is not found.
6. You need to fix the acinclude.m4 and configure and replace the fbembed for fbclient, generate a diff file, add it to the files folder .
7. re-run "ebuild libdbi-drivers-0.8.3.ebuild manifest"
8. the ebuild is now fixed.




========= /usr/portage/dev-db/libdbi-drivers/libdbi-drivers-0.8.3.ebuild =====
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/libdbi-drivers/libdbi-drivers-0.8.3.eb
uild,v 1.17 2009/02/24 17:44:47 armin76 Exp $

inherit eutils autotools

MY_PV="${PV}-1"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="The libdbi-drivers project maintains drivers for libdbi."
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
HOMEPAGE="http://libdbi-drivers.sourceforge.net/"
LICENSE="LGPL-2.1"
DEPEND=">=dev-db/libdbi-0.8.3
                mysql? ( virtual/mysql )
                postgres? ( virtual/postgresql-server )
                sqlite? ( <dev-db/sqlite-3 )
                sqlite3? ( >=dev-db/sqlite-3 )
                !bindist? ( firebird? ( dev-db/firebird ) )
                doc? ( app-text/openjade )"

IUSE="mysql postgres sqlite oci8 firebird sqlite3 bindist doc"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
SLOT=0
S="${WORKDIR}/${MY_P}"

src_unpack() {
        unpack ${A}
        epatch "${FILESDIR}"/${PN}-0.8.3-doc-build-fix.patch
        epatch "${FILESDIR}"/${PN}-0.8.3-firebird.patch
        cd "${S}"
        eautoreconf
}

pkg_setup() {
        local drivers=""
        use mysql && drivers="${drivers} mysql"
        use postgres && drivers="${drivers} pgsql"
        use sqlite && drivers="${drivers} sqlite"
        use sqlite3 && drivers="${drivers} sqlite3"
        if use firebird; then
                if use bindist; then
                        eerror "The Interbase Public License is incompatible wit
h LGPL, see bug #200284."
                        eerror "Disabling firebird in the build"
                else
                        drivers="${drivers} firebird"
                fi
        fi
        if use oci8; then
                if [ -z "${ORACLE_HOME}" ]; then
                        die "\$ORACLE_HOME is not set!"
                fi
                drivers="${drivers} oracle"
        fi
        # safety check
        if [ -z "${drivers// /}" ]; then
                die "No supported databases in your USE flags! (mysql, postgres,
 sqlite, sqlite3, oracle, firebird)"
        fi
}

src_compile() {
        local myconf=""
        # WARNING: the configure script does NOT work correctly
        # --without-$driver does NOT work
        # so do NOT use `use_with...`
        use mysql && myconf="${myconf} --with-mysql"
        use postgres && myconf="${myconf} --with-pgsql"
        use sqlite && myconf="${myconf} --with-sqlite"
        use sqlite3 && myconf="${myconf} --with-sqlite3"
        use !bindist && use firebird && myconf="${myconf} --with-firebird --with
-firebird-dir=/usr/bin"
        if use oci8; then
                if [ -z "${ORACLE_HOME}" ]; then
                        die "\$ORACLE_HOME is not set!"
                fi
                myconf="${myconf} --with-oracle-dir=${ORACLE_HOME} --with-oracle
"
        fi

        econf $(use_enable doc docs) ${myconf} || die "econf failed"
        emake || die "emake failed"
}

src_install () {
        emake install DESTDIR="${D}" || die "make install failed"
        dodoc AUTHORS ChangeLog NEWS README README.osx TODO
}
src_test() {
        if [ -z "${WANT_INTERACTIVE_TESTS}" ]; then
                ewarn "Tests disabled due to interactivity."
                ewarn "Run with WANT_INTERACTIVE_TESTS=1 if you want them."
                return 0
        fi
        einfo "Running interactive tests"
        emake check || die "Tests failed"
}


========= /usr/portage/dev-db/libdbi-drivers/Manifest
AUX libdbi-drivers-0.8.1-oci8.diff 695 RMD160 5431c6888dc5b703d91343f4f3d3be6f4e
6e1c9d SHA1 68599f1c5d3c9e0c2c970f40574a2f9055dac9dc SHA256 23a2c8819f9f80548f2c
933278c844d03dec35e8500883f25ab4b7d5f4b7c523
AUX libdbi-drivers-0.8.3-doc-build-fix.patch 566 RMD160 42a6e40d92dd878e66cb2f50
87af463d463ab09d SHA1 c3a62be19e77d9bdd253eefb9ee7f8d69f375d95 SHA256 ef18cdb0e5
338d29bcdbbf9839bd64283d067bfe3eed3d4af3eb58fa29a316ec
AUX libdbi-drivers-0.8.3-firebird.patch 1889 RMD160 a3844317245b28707c7a028fa192
fd2d8a7d4252 SHA1 212d2f61586367f69d02daad50dcb4a34a6d80ab SHA256 0db6be0344609c
6dbbb1cf21440499053dbb436d5ecd7336e9fc5cb83ff50d1f
DIST libdbi-drivers-0.8.1.tar.gz 1147446 RMD160 280c5ea3a8a2b7029865d4fc48064620
d9db2e38 SHA1 82c00d3f4d86a88d57cc1b58163182c5db09d990 SHA256 1b45bb53693feccdcc
7fe7d32d37474e3ae15e8013553cc7051faa101f445bcd
DIST libdbi-drivers-0.8.3-1.tar.gz 1534420 RMD160 e0aa9e67f6560fb44018b1d35d90d4
ac21b48597 SHA1 599fbab115419e8fc88b3b31a38031584ee213b5 SHA256 4ab9944398ce769c
0deeb64d2f73555c67bc25ccd2ade1ccf552226c7b2acf72
EBUILD libdbi-drivers-0.8.1-r1.ebuild 2208 RMD160 ac9b7b73baff2737c43fb351e19b10
4a641dda24 SHA1 57ff17f909de5ec728d43b068006f1f5bbcc447a SHA256 f8e67c955f37b817
895706d010d3bfd5abf2032e0ecd578392b381be5fa18155
EBUILD libdbi-drivers-0.8.1-r2.ebuild 2604 RMD160 d2da80c6c2465d06740b1ca97766de
699556b1dc SHA1 8231b9c9b03cf3aee87dcd4b871e48c5825361a4 SHA256 f20d154e14f86792
1d8aabc1c9634ca2e9770a7933f6e91654ae56693f5088e1
EBUILD libdbi-drivers-0.8.3.ebuild 2873 RMD160 47fbe5bdc468badf1e7cde926330197e0
23738d5 SHA1 d280c7a4707b65d4df43a37b8e0e891f40c125fb SHA256 2addff0078259f2604f
329ecac6aee705db4492c234bf8136f6f593aef466d05
MISC ChangeLog 6622 RMD160 dbba543b1e999eea4084aaa826863c2fef263465 SHA1 9dabda8
957198d9f71a6382df0d7051fb8aea45f SHA256 c9ea9ca086b9ce4e4cd04984d534ea479a76977
148190437d73d78a9b8fe89bb
MISC metadata.xml 223 RMD160 ffa99612cf27469c417944deed0e0c9155e64331 SHA1 607c6
37402dd253406aa6ee684471a702c5d1a99 SHA256 d6bb9ba68629616062b4433ab3b8fb01dfcaf
ae5bb47804d9e06cdd6c66daa44

========= /usr/portage/dev-db/libdbi-drivers/files/libdbi-drivers-0.8.3-firebird.patch ====================
--- libdbi-drivers-0.8.3-1/configure    2009-10-17 14:00:49.000000000 -0300
+++ libdbi-drivers-0.8.3-1/configure    2009-10-17 14:06:05.000000000 -0300
@@ -21058,7 +21058,7 @@

 ac_firebird_libdir=no
 for i in $firebird_libdirs; do
-       for j in libfbembed.so; do
+       for j in libfbclient.so; do
                if test -r "$i/$j"; then
                        ac_firebird_libdir=$i
                        break 2
@@ -21230,7 +21230,7 @@
        { echo "$as_me:$LINENO: result: $SCHAR_MSG" >&5
 echo "${ECHO_T}$SCHAR_MSG" >&6; }

-       FIREBIRD_LIBS="-lfbembed"
+       FIREBIRD_LIBS="-lfbclient"
        FIREBIRD_INCLUDE="-I$ac_firebird_incdir"
        FIREBIRD_LDFLAGS="-L$ac_firebird_libdir"

--- libdbi-drivers-0.8.3-1/acinclude.m4 2009-10-17 14:01:00.000000000 -0300
+++ libdbi-drivers-0.8.3-1/acinclude.m4 2009-10-17 14:03:57.000000000 -0300
@@ -450,8 +450,8 @@
                firebird_incdirs="/opt/firebird/include /usr/include /usr/local/
include /usr/include/firebird /usr/local/include/firebird /usr/local/firebird/in
clude /opt/firebird/include"
                AC_FIND_FILE(ibase.h, $firebird_incdirs, ac_firebird_incdir)
                firebird_libdirs="/opt/firebird/lib /usr/lib /usr/local/lib /usr
/lib/firebird /usr/local/lib/firebird /usr/local/firebird/lib /opt/firebird/lib"
-dnl            AC_FIND_FILE(libfbclient.so, $firebird_libdirs, ac_firebird_libd
ir)
-               AC_FIND_FILE(libfbembed.so, $firebird_libdirs, ac_firebird_libdi
r)
+               AC_FIND_FILE(libfbclient.so, $firebird_libdirs, ac_firebird_libd
ir)
+dnl            AC_FIND_FILE(libfbembed.so, $firebird_libdirs, ac_firebird_libdi
r)
                if test "$ac_firebird_incdir" = "no"; then
                        AC_MSG_RESULT(no)
                        AC_MSG_ERROR([Invalid Firebird/Interbase directory - inc
lude files not found.])
@@ -479,8 +479,8 @@
        [SCHAR_MSG="no"])
        AC_MSG_RESULT([$SCHAR_MSG])

-dnl    FIREBIRD_LIBS="-lfbclient"
-       FIREBIRD_LIBS="-lfbembed"
+       FIREBIRD_LIBS="-lfbclient"
+dnl    FIREBIRD_LIBS="-lfbembed"
        FIREBIRD_INCLUDE="-I$ac_firebird_incdir"
        FIREBIRD_LDFLAGS="-L$ac_firebird_libdir"
Comment 1 Wormo (RETIRED) gentoo-dev 2009-10-26 00:44:23 UTC
Thanks for reporting the issue, and providing a fix!

For future patches, attached instead of inline is preferred -- note the "Create a new attachment" link above the bug dependencies.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-10-26 07:19:40 UTC
Your patch fails to apply. It seems to be whitespace corrupted.
In future please including just the acinclude.m4/configure.in parts, and use the attachment functionality.

Fixed in 0.8.3 and -r1.