Bug 14541 - libndr linking fails on freebsd 12
Summary: libndr linking fails on freebsd 12
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: PIDL and libndr (show other bugs)
Version: 4.13.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-21 02:39 UTC by Amitay Isaacs
Modified: 2020-11-03 12:36 UTC (History)
2 users (show)

See Also:


Attachments
Patch for v4-13 (1.49 KB, patch)
2020-10-26 04:39 UTC, Amitay Isaacs
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amitay Isaacs 2020-10-21 02:39:24 UTC
On freebsd 12, the linking of libndr.so fails with following error:

[ 918/3912] Linking bin/default/librpc/libndr.so
ld: error: duplicate symbol '_ndr_pull_error' in version script
ld: error: duplicate symbol '_ndr_push_error' in version script
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This happened because symbols _ndr_push_error and _ndr_pull_error were
added to abi_match in commit 42ac80fb46cfb485e8c4a26d455fa784fdd1daed.
It generates the following snippet in ndr.vscript.

--------------------
NDR_1.0.0 {
        global:
                _ndr_pull_error;
                _ndr_push_error;
                ndr_print_steal_switch_value;
                ndr_push_steal_switch_value;
} NDR_0.2.1;

NDR_1.0.1 {
        global:
                ndr_*;
                GUID_*;
                _ndr_pull_error;
                _ndr_push_error;
        local:
                ndr_table_*;
                _end;
                __bss_start;
                _edata;
                *;
};
--------------------

Symbols _ndr_push_error and _ndr_pull_error are added to both versions
NDR_1.0.0 and NDR_1.0.1.
Comment 1 Samba QA Contact 2020-10-22 17:29:05 UTC
This bug was referenced in samba master:

4cd195aafefb02b6921ea8439dd3897f8c74b012
Comment 2 Douglas Bagnall 2020-10-22 22:01:02 UTC
actually sorry, backports are probably wanted.
Comment 3 Amitay Isaacs 2020-10-26 04:39:07 UTC
Created attachment 16305 [details]
Patch for v4-13
Comment 4 Andreas Schneider 2020-10-26 06:51:46 UTC
Karolin, please apply the patch to 4.13. Thanks!
Comment 5 Karolin Seeger 2020-10-26 09:59:48 UTC
(In reply to Andreas Schneider from comment #4)
Pushed to autobuild-v4-13-test.
Comment 6 Samba QA Contact 2020-10-30 13:54:30 UTC
This bug was referenced in samba v4-13-test:

bca2f0e92c26f24f225e1688c10e3c979182a39e
Comment 7 Karolin Seeger 2020-11-02 07:56:02 UTC
Closing out bug report.

Thanks!
Comment 8 Samba QA Contact 2020-11-03 12:36:30 UTC
This bug was referenced in samba v4-13-stable (Release samba-4.13.2):

bca2f0e92c26f24f225e1688c10e3c979182a39e