Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519002 - dev-libs/redland-1.0.16[berkdb] fails to detect multilib sys-libs/db
Summary: dev-libs/redland-1.0.16[berkdb] fails to detect multilib sys-libs/db
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Multilib team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 06:14 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2014-08-04 20:51 UTC (History)
1 user (show)

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 Arfrever Frehtes Taifersar Arahesis 2014-08-04 06:14:20 UTC
dev-libs/redland-1.0.16[berkdb] fails to detect multilib sys-libs/db, because it tries to extract version from header, which is now a wrapper header:

configure.ac:

    for bdbc_version in 5.3 5.2 5.1 5.0 4.9 4.8 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 4 3.3 3.2 3.1 3 2; do
      bdbc_major=`echo $bdbc_version | sed -e 's/^\(.\).*$/\1/'`;
      bdbc_version2=`echo $bdbc_version | sed -e 's/^\(.\).\(.\)$/\1\2/'`

      for bdbc_prefix in $extraprefix /usr/local/BerkeleyDB.$bdbc_version /usr/local /opt/local /usr; do
        bdbc_libdir=$bdbc_prefix/lib

        for bdbc_incdir in $bdbc_prefix/include/db$bdbc_version $bdbc_prefix/include/db$bdbc_version2 $bdbc_prefix/include/db$bdbc_major $bdbc_prefix/include ; do
          if test -r $bdbc_incdir/db.h ; then
==>         header_bdbc_version=`sed -ne 's/^.*DB_VERSION_STRING.*Berkeley DB \(...\).*/\1/p' $bdbc_incdir/db.h`
            if test "X$header_bdbc_version" = "X$bdbc_version" ; then
              for bdbc_name in db-$bdbc_version db$bdbc_version db-$bdbc_version2 db$bdbc_version2; do
                bdbc_libdir_multiarch=
                if test "X$multiarch" != X; then
                  bdbc_libdir_multiarch=$bdbc_libdir/$multiarch
                fi
                for bdbc_libdir2 in $bdbc_libdir_multiarch $bdbc_libdir $bdbc_libdir/db$bdbc_version $bdbc_libdir/db$bdbc_version2; do
                  if test -r $bdbc_libdir2/lib$bdbc_name.a -o -r $bdbc_libdir2/lib$bdbc_name.so -o -r $bdbc_libdir2/lib$bdbc_name.dylib; then
                    bdb_version=$bdbc_version
                    bdb_prefix=$bdbc_prefix
                    bdb_include_dir=$bdbc_incdir
                    bdb_lib_dir=$bdbc_libdir2
                    bdb_dbname=$bdbc_name
                    break 5
                  fi
                done
              done
            fi
          fi

        done
       done
     done

  fi
Comment 1 Arfrever Frehtes Taifersar Arahesis 2014-08-04 07:01:27 UTC
The result of incorrect code is not a build failure, but detection of incorrect version of sys-libs/db.
E.g. if sys-libs/db:4.8 and sys-libs/db:5.3 are installed, then 4.8 will be detected.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-04 07:23:40 UTC
I'd guess the easy (and possibly the proper) solution would be to use CPP to obtain the contents for matching.

With only multilib db versions, it spawns:

checking Oracle Berkeley DB (BDB) version... unknown
checking location of BDB libs... /usr/lib
checking location of BDB includes... /usr/include
configure: WARNING: Cannot find the BDB library name from the files in /usr/lib
configure: WARNING: Assuming it is 'db' and will link like -ldb
configure: WARNING: Use --with-bdb-dbname=NAME if this is wrong
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-04 07:28:56 UTC
Also, the list doesn't contain 6.0 though it seems to work :). I think we should use db-use eclass and pass --with-bdb-dbname instead.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2014-08-04 07:34:03 UTC
(See bug #476376 about 6.0.)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-04 20:51:00 UTC
+  04 Aug 2014; Michał Górny <mgorny@gentoo.org> redland-1.0.16.ebuild:
+  Utilize db-use.eclass to obtain proper include path & library for berkdb. Bugs
+  #519002 and #476376.