Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice-3.5.0 won't compile with Berkeley DB 6.0

Hello,

this is taken from https://bugs.gentoo.org/476378. In that bug report you can find a full build logfile.
g++ -c -I.. -I../../include -DFREEZE_API_EXPORTS -I/usr/include/db6.0 -march=barcelona -mtune=barcelona -O2 -pipe -m64 -Wall -D_REENTRANT -fPIC -DNDEBUG MapDb.cpp
MapDb.cpp: In constructor 'Freeze::MapDb::MapDb(const ConnectionIPtr&, const string&, const string&, const string&, const KeyCompareBasePtr&, const std::vector<IceUtil::Handle<Freeze::MapIndexBase> >&, bool)':
MapDb.cpp:137:46: error: call of overloaded 'set_bt_compare(int (*)(DB*, const DBT*, const DBT*))' is ambiguous
MapDb.cpp:137:46: note: candidates are:
In file included from ../Freeze/MapDb.h:14:0,
from MapDb.cpp:10:
/usr/include/db6.0/db_cxx.h:272:14: note: virtual int Db::set_bt_compare(bt_compare_fcn_type) <near match>
/usr/include/db6.0/db_cxx.h:272:14: note: no known conversion for argument 1 from 'int (*)(DB*, const DBT*, const DBT*) {aka int (*)(__db*, const __db_dbt*, const __db_dbt*)}' to 'bt_compare_fcn_type {aka int (*)(__db*, const __db_dbt*, const __db_dbt*, long unsigned int*)}'
/usr/include/db6.0/db_cxx.h:273:14: note: virtual int Db::set_bt_compare(int (*)(Db*, const Dbt*, const Dbt*, size_t*)) <near match>
/usr/include/db6.0/db_cxx.h:273:14: note: no known conversion for argument 1 from 'int (*)(DB*, const DBT*, const DBT*) {aka int (*)(__db*, const __db_dbt*, const __db_dbt*)}' to 'int (*)(Db*, const Dbt*, const Dbt*, size_t*) {aka int (*)(Db*, const Dbt*, const Dbt*, long unsigned int*)}'
make[2]: *** [MapDb.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/Ice-3.5.0/work/Ice-3.5.0/cpp/src/Freeze'
make[1]: *** [Freeze] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-libs/Ice-3.5.0/work/Ice-3.5.0/cpp/src'
make: *** [all] Error 1
make: Leaving directory `/var/tmp/portage/dev-libs/Ice-3.5.0/work/Ice-3.5.0/cpp'
* ERROR: dev-libs/Ice-3.5.0 failed (compile phase):
* emake failed

Comments

  • bernard
    bernard Jupiter, FL
    Hello Lars,

    Welcome to our forums!

    Ice 3.5.0 supports Berkeley DB 5.3[.21] but not Berkeley DB 6.0[.20].

    I am sure it would be easy to update Ice to build with DB 6.0, however, DB 6.0's open source license is now AGPL v3, which is not compatible Ice's open source license (GPL v2). As a result, you could not distribute a patched Ice built with DB 6.0.

    (Berkeley DB 5.3 and prior releases of DB are licensed under the SleepyCat License, which is compatible with GPL v2).


    If your goal is to make DB 6.0 the default for a new Gentoo release, I would recommend to check carefully the license of all the software packages you "upgrade" to this new version of DB.

    Best regards,
    Bernard
  • Hello Bernard,

    thank you for your nice welcome :)

    Right now Gentoo is not planning to make db-6.0 the default implementation of Berkeley DB. We are still at version 4.8 and I assume that our Bekeley DB maintainer will try to work on making db-5.3 the next default version.

    IMHO we would not be in any legal difficulties as Gentoo is a source-based distribution and all we provide to our users are build scripts (which are called "ebuilds") that contain information for our package manager software how to fetch, unpack, patch and compile the source code of each provided "package" and then install the compiled binaries into the user's system.

    Of course if you intend to not support db-6.0 we can make Ice depend on older versions of Berkeley DB. We already have the possibility to install several versions of Berkeley DB in parallel (right now I have db-6.0.20 and db-5.3.21 installed due to packages being incompatible with db-6.0).
    But this would still leave the question how you as upstream plan to handle this license situation? I'm afraid that Oracle won't support older Berkeley DB versions any longer and at some point these old versions will become a pain to maintain.
  • bernard
    bernard Jupiter, FL
    Hello Lars,

    Ice 3.5 supports only DB 5.3, and we don't plan to support any other version of DB with this release.

    A future Ice 3.6 or 4.0 could support another version of DB, but nothing is decided yet.

    I also disagree with your suggestion that distributing sources - and have the end-user build these sources on his or her own machine - is a way to work-around license requirements.

    GPLv3 and APGLv3 are clear on this point:
    5. Conveying Modified Source Versions.
    You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
    b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
    c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
    [...]

    So, if you write an application that uses DB 6.0, you can only "convey" this application under AGPL v3, even if you convey only its source code.

    Best regards,
    Bernard