[CDRIVER-1939] dpkg-gensymbols error building 1.5.0 Debian package Created: 29/Nov/16  Updated: 14/Dec/16  Resolved: 14/Dec/16

Status: Closed
Project: C Driver
Component/s: debian, libbson, libmongoc
Affects Version/s: 1.5.0
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File dpkg-gensymbols.output.txt    

 Description   

In CDRIVER-1347 we deleted versions.ldscript from libbson and libmongoc, because it's a pain to maintain. That file had two pieces of information:

1. The list of public symbols.
2. Which library versions introduced each of those symbols.

We've replaced number 1 by decorating each public function declaration with the BSON_API macro. But we lost number 2. As a consequence, building the updated Debian package fails:

dpkg-gensymbols: warning: debian/tmp/DEBIAN/symbols doesn't match completely debian/libbson-1.0-0.symbols

The diff is attached.

These missing symbols can be easily reintroduced by just creating a versions.ldscript with only these symbols:

LIBBSON_1.0@LIBBSON_1.0 1.2.1
LIBBSON_1.1@LIBBSON_1.1 1.2.1
LIBBSON_1.2@LIBBSON_1.2 1.2.1
LIBBSON_1.3@LIBBSON_1.3 1.4.1
LIBBSON_1.4@LIBBSON_1.4 1.4.1

But the actual function names are a problem. Consider this symbol that we'd had:

bson_get_version@LIBBSON_1.2 1.2.1

The format is explained here, it is "name@version minimal-version", which I only sort of understand.

The new symbol output is like:

bson_get_version@Base 1.5.0-1

Is this ok and we should just disable dpkg-gensymbols's check?

(The symbols file was added to libbson by Ondřej Surý in pull 149. We'll have the same issue when we build the libmongoc package, which has a symbols file from pull 308.)



 Comments   
Comment by A. Jesse Jiryu Davis [ 14/Dec/16 ]

remove symbols file:

https://github.com/mongodb/libbson/commit/498c9fe909e1a28cc88ff4028fef1348f4d64c42
https://github.com/mongodb/mongo-c-driver/commit/e583f43f67eea8b9aa7303e440c4e1c32af8579c

Comment by A. Jesse Jiryu Davis [ 02/Dec/16 ]

libbson and libmongoc haven't yet been included in a stable Debian release so we have some freedom.

The dpkg-gensymbols check is a secondary check for downstreams that somehow express what symbols they need from us, so some packaging tool can check whether the downstream has the symbols it needs in libbson and libmongoc.

Very few packages use this system, most just rely on SONAME and package version to guarantee compatibility.

We're going to drop the symbols file and not call dpkg-gensymbols at all. We promise to maintain ABI backwards compatibility, but we're going to save ourselves the burden of maintaining versions.ldscript.

Generated at Wed Feb 07 21:13:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.