TbSync add-on needs a dependency on libc6-dev (for libresolv.so)

Bug #1875348 reported by Joris Bierkens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
thunderbird (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When trying to get the add-on TbSync to work in combination with the add-on "Provider for CalDAV & CardDAV", I encountered a mysterious error message, "status.service-provider-setup-failed".

After getting in touch with the maintainer of these add-ons, it turns out that this add-on depends upon libresolv.so. Indeed I managed to resolve the error by manually installing libc6-dev which contains this so.

Therefore should libc6-dev be a dependency for Thunderbird?

Revision history for this message
Joris Bierkens (jbierkens) wrote :

I should also mention that the maintainer of the Thunderbird add-ons pointed me to this relevant issue tracker:

https://github.com/jobisoft/DAV-4-TbSync/issues/202

Revision history for this message
Olivier Tilloy (osomon) wrote :

libresolv.so is a symbolic link to libresolv.so.2, which is installed by libc6.

Nothing in thunderbird itself appears to link against the unversioned so, so the problem is most likely somewhere else (in TbSync itself maybe?).

Can you get more details on how this add-on depends on libresolv.so (maybe get its maintainer to comment here)?

Changed in thunderbird (Ubuntu):
status: New → Incomplete
Revision history for this message
Joris Bierkens (jbierkens) wrote :

Ok, I have asked him to comment. Under the link mentioned earlier (https://github.com/jobisoft/DAV-4-TbSync/issues/202) the following is mentioned:

" I am just using standard API calls and do not load libraries."

But I can imagine it is useful to know which API calls this concerns.

Revision history for this message
Joris Bierkens (jbierkens) wrote :

The maintainer got back to me and asked me to add the following:

"
I am just using the file DNS.jsm, which ships with Thunderbird and use that to do DNS requests.

https://searchfox.org/comm-central/source/mail/base/modules/DNS.jsm

And I do

const { DNS } = ChromeUtils.import("resource:///modules/DNS.jsm");
let rv = await DNS.srv(request);

and that fails on Linux.
"

Revision history for this message
Joris Bierkens (jbierkens) wrote :

"Line 42 of that DNS.jsm file could be a hint

https://searchfox.org/comm-central/source/mail/base/modules/DNS.jsm#42
"

Revision history for this message
Olivier Tilloy (osomon) wrote :

Indeed. And ctypes.libraryName() doesn't seem to be aware of soname versions (https://searchfox.org/comm-central/source/mozilla/js/src/ctypes/Library.cpp#62).

That's a tricky problem though, we can't make thunderbird depend on every single -dev package just because add-ons might be using the ctypes module to load external libraries.

summary: - dependence upon libresolv.so (libc6-dev)
+ TbSync add-on needs a dependency on libc6-dev (for libresolv.so)
Changed in thunderbird (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
Revision history for this message
John Bieling (john-bieling) wrote :

As it turned out, I AM already registered with this bugtracker.

I just want to point out, that this is not limited to my add-on (TbSync). I am using a core feature which is also used by Thunderbird core itself. It is not just an add-on using ctypes module to load external libs.

I am not using ctypes module myself and I am not loading any lib. I am using the core DNS API of Thunderbird.

So I think the fix must be broader and not limited to TbSync.

Revision history for this message
Olivier Tilloy (osomon) wrote :

That's a fair and valid point. I wonder what the best approach would be: add a runtime dependency on libc6-dev (which, from a packaging standpoint, doesn't sound right), or distro-patch the DNS code to look for the correct so file.

Revision history for this message
John Bieling (john-bieling) wrote :

What would be the correct file name that you would distro patch into? Maybe this could be added to TB itself? After all, it is a list of files to check for. I would file that bug with TB if you could tell me what file you need. However, if it will change over time, ... probably not.

I know this is also an issue for Mint. Maybe that would fix it for both?

Revision history for this message
Olivier Tilloy (osomon) wrote :

I am not sure what the best approach would be, because indeed the soname can vary over time (although in this particular case I suspect it will change very seldom). Currently on Ubuntu 20.04 it is "libresolv.so.2". But it looks like the code in the ctypes wrapper would need rearchitecting quite a bit to take sonames into account.

In any case, it is worth taking the discussion upstream, as their opinion would be valuable.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.