jabberd2 2.2.0 has the wrong function names in util/base64.c, leading to an "unresolved symbol" error when starting the session manager. I have a patch.
Created attachment 158333 [details, diff] fix unresolved symbol error
Created attachment 158335 [details] updated ebuild This ebuild incorporates the above patch, softens some hard deps, and removes the superfluous "--with-sasl=gsasl".
(In reply to comment #2) > Created an attachment (id=158335) [edit] > updated ebuild > > This ebuild incorporates the above patch, softens some hard deps, and removes > the superfluous "--with-sasl=gsasl". > Please provide a diff -u of the ebuild that you changed. (also, emerge --info would be great). Thanks.
Thomas: Thanks for the report. I can't reproduce here, but that certainly doesn't mean anything considering how much of a beast this package is. Could you figure out what library has the unresolved symbol and report that back here along with the output of "emerge -pv jabberd2" and your emerge info? Thanks, Thomas
*** Bug 229331 has been marked as a duplicate of this bug. ***
I just discovered that the unresolved symbol problem seems to only appear if jabberd2 is compiled with the --as-needed ldflag
Patched fixed the issue here! ;)
Diego: I've read on the planet that you'll help out with as-needed problems. I have no idea why this bug is happening(I don't really understand as-needed). Could you please explain why apr_base64.diff fixes a undefined symbol in one of the libraries installed?
I'll have to take a look at the source code, and I'm currently on break, but it's likely to be a generic --as-needed problem that stops linking the library where the ap_* functions are defined, while the one containing the apr_* functions is still linked in. Sincerely, if jabberd2 already uses aprutil (or wherever the apr_* functions are defined), I'd prefer those to defining two new functions.
This is a programmer error, not a linker bug. The apr_* functions are defined in the same file, which looks like it was copied from aprutil (or wherever). Someone working on jabberd2 wrote the b64_* functions to wrap the apr_* functions, but they wrote ap_* instead of apr_*. The patch just fixes the identifiers. It doesn't define anything new. I don't know why this wouldn't always cause an error, but it's probably because the b64_* functions are never used.
The ap_* names are what the apr_* functions were called in Apache 1.3.
Created attachment 158671 [details, diff] diff between ebuild in tree and attachment 158335 [details]
You're missing quotes for ${S} and ${FILESDIR} in src_unpack but otherwise looks good. So I still have no idea how --as-needed changes this around, sorry :/
Fixed in CVS, thanks for reporting and thanks for the patches!
Fixed upstream: http://jabberd2.xiaoka.com/changeset/595