Hello,
Both on master and kamailio_3.0:
CC (gcc) [M db_berkeley.so] bdb_res.o bdb_res.c: In function ‘bdb_res_free’: bdb_res.c:51: error: ‘DBC’ has no member named ‘close’ make: *** [bdb_res.o] Error 1
After checking the documentation, it seems that a function that works and closes a cursor for versions > 4.2 is c_close(), but this is marked as deprecated in 4.6, where the close() alternative is also present . c_close() is still used in several places. My thoughts : either we replace DBC->close() with DBC->c_close() or , keeping in mind DB_VERSION, we use both c_close() or close() depending on the version on the system.
Ideas?
Marius
El Mon, 30 Aug 2010 14:03:55 +0300 marius zbihlei marius.zbihlei@1and1.ro escribió:
Hello,
Both on master and kamailio_3.0:
CC (gcc) [M db_berkeley.so] bdb_res.o bdb_res.c: In function ‘bdb_res_free’: bdb_res.c:51: error: ‘DBC’ has no member named ‘close’ make: *** [bdb_res.o] Error 1
After checking the documentation, it seems that a function that works and closes a cursor for versions > 4.2 is c_close(), but this is marked as deprecated in 4.6, where the close() alternative is also present . c_close() is still used in several places. My thoughts : either we replace DBC->close() with DBC->c_close() or , keeping in mind DB_VERSION, we use both c_close() or close() depending on the version on the system.
It's a known bug. It's in the tracker some time ago #76
It would be great to be solved although Berkeley db < 4.6 seems quite old.
Jon Bonilla wrote:
El Mon, 30 Aug 2010 14:03:55 +0300 marius zbihlei marius.zbihlei@1and1.ro escribió:
Hello,
Both on master and kamailio_3.0:
CC (gcc) [M db_berkeley.so] bdb_res.o bdb_res.c: In function ‘bdb_res_free’: bdb_res.c:51: error: ‘DBC’ has no member named ‘close’ make: *** [bdb_res.o] Error 1
After checking the documentation, it seems that a function that works and closes a cursor for versions > 4.2 is c_close(), but this is marked as deprecated in 4.6, where the close() alternative is also present . c_close() is still used in several places. My thoughts : either we replace DBC->close() with DBC->c_close() or , keeping in mind DB_VERSION, we use both c_close() or close() depending on the version on the system.
It's a known bug. It's in the tracker some time ago #76
It would be great to be solved although Berkeley db < 4.6 seems quite old.
Hello
Never occurred to look thru the bug tracker. I have made a patch that based on DB_VERSION_MAJOR and DB_VERSION_MINOR decides between c_close() and the new API close(). Also the same discussion for the other c_ function like c_get().
Have a look at commit 9d8d30c and tell if you spot something weird. I have tested with libdb4.5(c_close) and libdb4.6(close) and now it compiles without problems
Cheers, Marius
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
El Mon, 30 Aug 2010 17:24:59 +0300 marius zbihlei marius.zbihlei@1and1.ro escribió:
Hello
Never occurred to look thru the bug tracker. I have made a patch that based on DB_VERSION_MAJOR and DB_VERSION_MINOR decides between c_close() and the new API close(). Also the same discussion for the other c_ function like c_get().
Have a look at commit 9d8d30c and tell if you spot something weird. I have tested with libdb4.5(c_close) and libdb4.6(close) and now it compiles without problems
Cheers, Marius
Hi Marius
I'll test it ASAP. I've been sick and not much time for playing with sr. I created the ticket time ago but did not update it because the berkeley db version was so old that it was not worthy to take care of that. In my scenarios, where debian is used, it fails to compile in etch which is a really outdated version of debian.
There are more plugins that do not compile due to specific versioning. Sometimes because the lib is too old (ej berkeley module not compiling in etch) and sometimes because of new versions (ej purple module not compiling in squeeze).
What I do not know is what to consider a bug. Problems with old versions (how old?), problems with newer versions (how recent?) or none of them.
cheers, Jon
Jon Bonilla wrote:
El Mon, 30 Aug 2010 17:24:59 +0300 marius zbihlei marius.zbihlei@1and1.ro escribió:
Hello
Never occurred to look thru the bug tracker. I have made a patch that based on DB_VERSION_MAJOR and DB_VERSION_MINOR decides between c_close() and the new API close(). Also the same discussion for the other c_ function like c_get().
Have a look at commit 9d8d30c and tell if you spot something weird. I have tested with libdb4.5(c_close) and libdb4.6(close) and now it compiles without problems
Cheers, Marius
Hi Marius
I'll test it ASAP. I've been sick and not much time for playing with sr. I created the ticket time ago but did not update it because the berkeley db version was so old that it was not worthy to take care of that. In my scenarios, where debian is used, it fails to compile in etch which is a really outdated version of debian.
Hello Jon,
First of all, I hope you get well soon. The problem is that I have a dependency on libdb4.5 on a lenny system. The fix is fairly simple so I think this approach works best.
Cheers Marius
There are more plugins that do not compile due to specific versioning. Sometimes because the lib is too old (ej berkeley module not compiling in etch) and sometimes because of new versions (ej purple module not compiling in squeeze).
What I do not know is what to consider a bug. Problems with old versions (how old?), problems with newer versions (how recent?) or none of them.
cheers, Jon