Bug 232282

Summary: [libc] Restore symbol __collate_load_error
Product: Base System Reporter: Leonid Nevecherya <nevecherya>
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Many People CC: brooks, kib, nti, theraven
Priority: --- Keywords: regression
Version: 11.2-RELEASE   
Hardware: i386   
OS: Any   

Description Leonid Nevecherya 2018-10-15 12:56:21 UTC
Port sysutils/arcconf stopped working after FreeBSD upgrade from 10.4 to 11.2
Running arcconf ends with:
Undefined symbol "__collate_load_error" referenced from COPY relocation in /usr/local/sbin/arcconf
The libc export symbol __collate_load_error in FreeBSD 10.4 (i386) and early/ but not export in FreeBSD 11.2 (i386).
Please restore export symbol.
See base r238182 and bug #213781
Comment 1 nti 2018-11-28 18:24:15 UTC
Same problem with old Arcserve backup agent (Arcserve Backup Client Agent for UNIX	r16.5). Upgrading from 10.4 to 11.2 breaks the compatibility:

/opt/CA/BABuagent/uagentd
Undefined symbol "__collate_load_error" referenced from COPY relocation in /opt/CA/BABuagent/uagentd

Compats for 10 and down are installed: 
pkg info compat\*
compat10x-amd64-10.3.1003000.20170608
compat6x-amd64-6.4.604000.200810_3
compat7x-amd64-7.4.704000.201310.1
compat8x-amd64-8.4.804000.20151116
compat9x-amd64-9.3.903000.20170608

Any suggestions?
Comment 2 Leonid Nevecherya 2018-11-29 07:18:44 UTC
The library /lib/libc.so.7 was included in FreeBSD 7.0.
It was broken and fixing in FreeBSD 9.0 https://lists.freebsd.org/pipermail/freebsd-stable/2012-July/068761.html
It was broken in FreeBSD 11.x (i386) only, but I don't sure  of only (i386). IMHO 32bit version of library was broken and wasn't broken 64bit version.
My workaround is to use the version of your software compiled for FreeBSD 6.x with compat6x. See bug #213781, comment #10
Comment 3 Brooks Davis freebsd_committer 2018-11-29 16:55:50 UTC
It looks like this private symbol was removed in r290494.  If we wanted to work around problems with old binaries (which should not have been using it), it might be worth adding it back with a comment that it's unused and exists for binary compatibility.
Comment 4 Konstantin Belousov freebsd_committer 2018-11-29 19:03:00 UTC
I object on restoring the symbol in libc on principle.  It is part of the private namespace, and starting maintaining ABI there gets us into the tar pit immediately.

If you want to run this binary, create a fake dso which exports the symbol in the same namespace, and preload it through LD_PRELOAD.
Comment 5 Leonid Nevecherya 2018-11-30 07:30:26 UTC
I understand your problems with maintaining  ABI, but...
IMHO. Changing the ABI without compat or any notification (!) is a big mistake.