Closed Bug 1692909 Opened 4 years ago Closed 4 years ago

Update RNP to v0.14.0

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: KaiE, Assigned: KaiE)

References

Details

Attachments

(2 files)

We should update RNP to a newer snapshot to pick up correctness fixes.

There is a recent tag v0.14.0 which I guess is a stable snapshot.

Blocks: 1671758, 1673236
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Comment on attachment 9203297 [details]
Bug 1692909 - Update RNP to v0.14.0. r=rjl

[Approval Request Comment]
Regression caused by (bug #): no
User impact if declined:
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): unknown, need beta testing

Attachment #9203297 - Flags: approval-comm-beta?
Backout by kaie@kuix.de: https://hg.mozilla.org/comm-central/rev/4eca58df05b1 Backed out changeset 7158d5b72c9e, bug 1692909 because for build failures on Windows.

Reopening

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9203297 - Flags: approval-comm-beta?

Linking rnp.dll failed on Windows:

INFO -  /builds/worker/fetches/clang/bin/lld-link -NOLOGO -DLL -OUT:rnp.dll -PDB:rnp.pdb -SUBSYSTEM:WINDOWS,6.01 -MACHINE:X64 @/builds/worker/workspace/obj-build/comm/third_party/rnp/rnp_dll.list rnp.dll.res  -LARGEADDRESSAWARE -RELEASE -DEBUG -PDBALTPATH:%_PDB% -OPT:REF,ICF -guard:cf,nolongjmp    -DEF:rnp.dll.def  user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib -LIBPATH:/builds/worker/fetches/clang/lib/clang/11.0.1/lib/windows /builds/worker/fetches/clang/lib/clang/11.0.1/lib/windows/clang_rt.builtins-x86_64.lib
INFO -  lld-link: warning: ignoring unknown argument '-RELEASE'
INFO -  lld-link: error: undefined symbol: class std::basic_string<wchar_t, struct std::char_traits<wchar_t>, class std::allocator<wchar_t>> __cdecl wstr_from_utf8(char const *)
INFO -  >>> referenced by /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/file-utils.cpp:65
INFO -  >>>               file-utils.obj:(rnp_unlink)
INFO -  >>> referenced by /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/file-utils.cpp:128
INFO -  >>>               file-utils.obj:(int __cdecl rnp_stat(char const *, struct stat *))
INFO -  >>> referenced by /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/file-utils.cpp:100
INFO -  >>>               file-utils.obj:(int __cdecl rnp_open(char const *, int, int))
INFO -  >>> referenced 7 more times
INFO -  lld-link: error: undefined symbol: class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> __cdecl wstr_to_utf8(wchar_t const *)
INFO -  >>> referenced by /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/file-utils.cpp:191
INFO -  >>>               file-utils.obj:(class std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>> __cdecl rnp_readdir_name(struct _WDIR *))
INFO -  lld-link: error: undefined symbol: class std::basic_string<wchar_t, struct std::char_traits<wchar_t>, class std::allocator<wchar_t>> __cdecl wstr_from_utf8(char const *, char const *)
INFO -  >>> referenced by /builds/worker/checkouts/gecko/comm/third_party/rnp/src/common/file-utils.cpp:243
INFO -  >>>               file-utils.obj:(int __cdecl rnp_mkstemp(char *))
ERROR -  make[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:544: rnp.dll] Error 1

The missing symbol is a standard c++ class.

Did RNP begin to use the standard C++ library between November and the v0.14.0 release, and the above link command doesn't allow it?

Flags: needinfo?(o.nickolay)

The error point to calls to wstr_from_utf8 wrapped in #ifdef _WIN32.

That's new code added in December 2020.
https://github.com/rnpgp/rnp/commit/e94529534f5bbdfb51c60d828a65bf5573c2376c

(In reply to Kai Engert (:KaiE:) from comment #6)

Did RNP begin to use the standard C++ library between November and the v0.14.0 release,

Yes!

On Linux, "ldd librnp.so" on a recent Thunderbird release does NOT reference libstdc++.so

In my local build with this updated RNP snapshot, "ldd librnp.so" DOES reference libstdc++.so

Rob, could you please help to identify the right build commands to add the c++ standard library to the list of linked libraries, and maybe start a Windows try build?

Flags: needinfo?(o.nickolay) → needinfo?(rob)

Add str-utils.cpp to files to build.

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/45f4c2e99734
Update RNP to v0.14.0. r=rjl
https://hg.mozilla.org/comm-central/rev/c9b7cea3754a
Follow-up: Fix building librnp on Windows. r=kaie

Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Flags: needinfo?(rob)
Target Milestone: --- → 87 Branch
Attachment #9203297 - Flags: approval-comm-beta?
Attachment #9203468 - Flags: approval-comm-beta?

Comment on attachment 9203468 [details]
Bug 1692909 - Follow-up: Fix building librnp on Windows. r=kaie

[Triage Comment]
no uplift needed - already in "current beta"

Attachment #9203468 - Flags: approval-comm-beta? → approval-comm-beta-

Comment on attachment 9203297 [details]
Bug 1692909 - Update RNP to v0.14.0. r=rjl

[Triage Comment]
ditto

Attachment #9203297 - Flags: approval-comm-beta? → approval-comm-beta-

Should we uplift?

(In reply to Magnus Melin [:mkmelin] from comment #13)

Should we uplift?

yes will request

Comment on attachment 9203297 [details]
Bug 1692909 - Update RNP to v0.14.0. r=rjl

[Approval Request Comment]
Regression caused by (bug #): none
User impact if declined: less correct openpgp engine
Testing completed (on c-c, etc.): c-c, beta, manual
Risk to taking this patch (and alternatives if risky): low

Attachment #9203297 - Flags: approval-comm-esr78?
Attachment #9203468 - Flags: approval-comm-esr78?

Comment on attachment 9203468 [details]
Bug 1692909 - Follow-up: Fix building librnp on Windows. r=kaie

[Triage Comment]
Approved for esr78

Attachment #9203468 - Flags: approval-comm-esr78? → approval-comm-esr78+

Comment on attachment 9203297 [details]
Bug 1692909 - Update RNP to v0.14.0. r=rjl

[Triage Comment]
Approved for esr78

Attachment #9203297 - Flags: approval-comm-esr78? → approval-comm-esr78+
Blocks: 1699295
See Also: → 1657094
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: