You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/02/02 11:48:18 UTC

[Bug 58944] configure script breaks openssl static library dependencies by removing duplicates from LIBS

https://bz.apache.org/bugzilla/show_bug.cgi?id=58944

--- Comment #1 from Rainer Jung <ra...@kippdata.de> ---
This code comes form APACHE_CHECK_OPENSSL in acinclude.m4, which in turn uses
APR_ADDTO to add the flags.

APR_ADDTO is part of APR and defined in apr_common.m4. It adds all tokens given
in the second argument to the variable which name is given in the first
argument. It does this by processing tokens fromleft to right.

Unfortunately for redundant library dependencies this can lead to a result that
doesn't work, because ordering is relevant for library dependencies (-l...).

It looks to me as we would need a version of APR_ADDTO that works from right to
left:

- combine original token and full list of new tokens in new token list
- create a new empty token result list
- work through new list from right to left, copy any token to the front of the
result list that is not already part of the result list.

Because of APR versioning I guess we can't rely on such a new macro in httpd
2.4 and thus would have to add it to APR for future use but use a private copy
in httpd.

The same problem might occur in any place we use APR_ADDTo to handle "-l" flags
and where the libraries might have complex dependencies themselves. I don't
have another concrete example than openssl in my mind though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org