Hi there I'm maintaining the commoncpp2-package for Gentoo and we have several patches laying around which might be included:
1. To build commoncpp2 successfully with LDFLAGS="-Wl,--as-needed", some lines in src/Makefile.am and configure.ac need to be patched to make sure that libccext2 and libccgnu2 link to the needed libraries themselves. The attached patch "1.5.7-as-needed.patch" does that. 2. Someone might want to link against OpenSSL even if GnuTLS is installed or to not link to a SSL-lib at all. At the moment configure automatically chooses GnuTLS even if --with-openssl is specified. Patch "1.5.1-ssl_config.patch" takes care of that. 3. The tests don't build: there are three smaller flaws which I hopefully fixed the right way with patch "1.5.7-test_fixes.patch". The problem: The tests hang reproducible on my machine. This is all I get: =================================================== $ ./dotests.sh bug1 test... bug1 test... before start()... Run()... Final()... exiting... bug2 test... bug2 test... thread1 test... thread1 test... *********************************************** * Testing class Thread without syncronization * *********************************************** Testing thread creation - thread should set n to 1...ok Testing thread is working - thread should change n...ok - thread should change n...ok Testing suspend & resume =================================================== Cheers, Tiziano
diff -Naur commoncpp2-1.5.7.orig/configure.ac commoncpp2-1.5.7/configure.ac --- commoncpp2-1.5.7.orig/configure.ac 2007-06-16 15:23:05.000000000 +0200 +++ commoncpp2-1.5.7/configure.ac 2007-06-16 15:24:39.000000000 +0200 @@ -357,6 +357,9 @@ darwin*) MODULE_FLAGS="-dynamic -bundle -undefined suppress -flat_namespace -read_only_relocs suppress" ;; +linux*) + BASE_LIB="../src/libccgnu2.la" + ;; esac AC_SUBST(COMMON_FLAGS) diff -Naur commoncpp2-1.5.7.orig/src/Makefile.am commoncpp2-1.5.7/src/Makefile.am --- commoncpp2-1.5.7.orig/src/Makefile.am 2007-06-16 15:23:05.000000000 +0200 +++ commoncpp2-1.5.7/src/Makefile.am 2007-06-16 15:23:32.000000000 +0200 @@ -32,7 +32,7 @@ scriptdir = $(bindir) script_DATA = ccgnu2-config -libccgnu2_la_LIBADD = @THREAD_LIBS@ +libccgnu2_la_LIBADD = @THREAD_LIBS@ @DYN_LOADER@ libccgnu2_la_LDFLAGS = $(RELEASE) $(SHARED_FLAGS) noinst_DATA = @STAGE2@ @@ -45,7 +45,8 @@ cidr.cpp private.h nat.h if EXTRAS -libccext2_la_LDFLAGS = @BASE_LIB@ @THREAD_LIBS@ @SSL_LIBS@ @ZSTREAM_LIBS@ $(RELEASE) $(SHARED_FLAGS) +libccext2_la_LIBADD = @THREAD_LIBS@ @BASE_LIB@ @SSL_LIBS@ @ZSTREAM_LIBS@ +libccext2_la_LDFLAGS = $(RELEASE) $(SHARED_FLAGS) if GETOPT_LONG optincludedir=$(includedir)/cc++2
--- configure.ac.orig 2006-10-22 18:02:57.000000000 +0200 +++ configure.ac 2006-10-22 18:06:17.000000000 +0200 @@ -247,6 +247,7 @@ ost_cv_extras=yes AC_DEFINE(HAVE_EXTRAS, [1], [Enable extras]) + AC_ARG_WITH(gnutls, [ --with-gnutls Enable gnutls support], [ AC_CHECK_HEADER(gnutls/gnutls.h,[ AC_CHECK_LIB(gnutls, gnutls_init, [ SSL_LIBS="-lgnutls -lgcrypt" @@ -254,13 +255,12 @@ AC_DEFINE(CCXX_SSL, [GNUTLS], [defines ssl]) AC_DEFINE(CCXX_GNUTLS, [1], [define gnutls]) ]) - - ],[ - AC_ARG_WITH(openssl, [ --with-openssl Enable openssl support], - [OST_LIB_SSL], - [OST_LIB_NOSSL]) + ],[]) + ], [ + AC_ARG_WITH(openssl, [ --with-openssl Enable openssl support], + [OST_LIB_SSL], + [OST_LIB_NOSSL]) ]) - AC_ARG_WITH(compression, [ --without-compression Disable libz compression], [OST_LIB_NOZLIB], [OST_LIB_ZLIB])
diff -Naur commoncpp2-1.5.7.orig/tests/SampleObject.cpp commoncpp2-1.5.7/tests/SampleObject.cpp --- commoncpp2-1.5.7.orig/tests/SampleObject.cpp 2007-06-16 15:25:16.000000000 +0200 +++ commoncpp2-1.5.7/tests/SampleObject.cpp 2007-06-16 15:25:30.000000000 +0200 @@ -40,7 +40,7 @@ #include "SampleObject.h" -IMPLEMENT_PERSISTENCE(Test,"Test"); +IMPLEMENT_PERSISTENCE(Test,"Test") Test::Test() : iInteger(0), strString("Null"), strString2("Null") diff -Naur commoncpp2-1.5.7.orig/tests/SampleSubObject.cpp commoncpp2-1.5.7/tests/SampleSubObject.cpp --- commoncpp2-1.5.7.orig/tests/SampleSubObject.cpp 2007-06-16 15:25:16.000000000 +0200 +++ commoncpp2-1.5.7/tests/SampleSubObject.cpp 2007-06-16 15:25:37.000000000 +0200 @@ -40,7 +40,7 @@ #include "SampleSubObject.h" -IMPLEMENT_PERSISTENCE(TestSub, "TestSub"); +IMPLEMENT_PERSISTENCE(TestSub, "TestSub") TestSub::TestSub() : iInteger(0), strString("Null"), strString2("Null") diff -Naur commoncpp2-1.5.7.orig/tests/Test_Engine.cpp commoncpp2-1.5.7/tests/Test_Engine.cpp --- commoncpp2-1.5.7.orig/tests/Test_Engine.cpp 2007-06-16 15:25:16.000000000 +0200 +++ commoncpp2-1.5.7/tests/Test_Engine.cpp 2007-06-16 15:25:56.000000000 +0200 @@ -343,7 +343,7 @@ outputEngine << test_Int32; //CPPUNIT_FAIL("Call to persist to an input stream should throw an exception"); } - catch(Engine::Exception ex) { + catch(PersistException &ex) { CPPUNIT_ASSERT_MESSAGE(ex.getString(), true); }
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bug-commoncpp mailing list Bug-commoncpp@gnu.org http://lists.gnu.org/mailman/listinfo/bug-commoncpp