Summary: | base OpenSSL complains for relocation for databases/mysql57 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | gja822 | ||||||||||||
Component: | Individual Port(s) | Assignee: | Kurt Jaeger <pi> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | amd64, jkim, mmokhi, pi, ports-bugs, rootservice | ||||||||||||
Priority: | --- | ||||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | amd64 | ||||||||||||||
OS: | Any | ||||||||||||||
URL: | https://svnweb.freebsd.org/changeset/ports/412346 | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 209510 | ||||||||||||||
Attachments: |
|
Description
gja822
2016-05-11 18:12:54 UTC
Same issue as in bug #208759 Because of this we set WITH_OPENSSL_PORT in the Makefile for mysql57 I'll prepare a patch this weekend to catch WITH_OPENSSL_BASE and throw an error if set, so this will not bite us again until base is fixed. Created attachment 170235 [details]
ignore openssl from base
builds and runs on 10.3-RELEASE and 10-STABLE
QA not done
added freebsd-ports-bugs and mysql57 maintainer to cc (In reply to Markus Kohlmeyer from comment #2) Why it is said about LibreSSL in the patch, can mysql57 port use it? (In reply to gja822 from comment #4) Yes, MySQL can be linked against LibreSSL I've that combi in production since months now. (In reply to Markus Kohlmeyer from comment #5) ...for in the port's Makefile I do not see any occurrence of LibreSSL, neither in options nor in hidden form of code. (In reply to gja822 from comment #6) You can set default ssl in /etc/make.conf to libressl. Then ports framework will choose that when ssl options used Created attachment 170365 [details]
Previous patch (mark port if Base used intentionally) with some changes
This is like patch Markus suggested with some changes (to be more exact)
Using BROKEN instead of IGNORE: as handbook suggests it's better to "Use BROKEN for ports where the problem is believed to be temporary."
and i believe it's temporary (as I'm trying to patch the Cmake-script to make it not use `ld` for static libs and use them to build ;D)
Also i see no reason to use .if condition for setting "WITH_OPENSSL_PORT=yes" as we should set it anyway.
BTW, i solved these in this patch.
QA: portlint -AC -> done successfully: no Fatal error
Also as this one and #209510 are minor changes, i guess it's good idea to increase port-revision on #209512's patch. Re-assigning to default to go for commit :D Thanks for reporter (gja822@narod.ru) and reviewer (Markus) and committer (who knows ;D) Note head and stable/10 have position independent libcrypto.so. https://svnweb.freebsd.org/changeset/base/299389 https://svnweb.freebsd.org/changeset/base/299966 (In reply to Jung-uk Kim from comment #11) The problem is with libssl.a not libcrypto (if I interpreted your meaning correctly :D) (In reply to Mahdi Mokhtari from comment #12) BTW using openssl-port fixes that. (until patch for using openssl-base becomes ready) (In reply to Jung-uk Kim from comment #11) That changesets are only related to libcrypto.so on i386, but AFAICS are not related to the linking issue with the libssl.a on i386, amd64 and possibly other arches. Nonetheless thanks for the hint. (In reply to Mahdi Mokhtari from comment #12) Ah, I see. Something's wrong with the port. I'll take a look at it. (In reply to Jung-uk Kim from comment #15) The problem is with base not being compiled pic/pie by default, not with any port using pic/pie for good reasons (eg. improved security). (In reply to Markus Kohlmeyer from comment #16) No, see the log. It's complaining that *libssl.a* is not PIC. It should use *libssl.so*, not libssl.a. (In reply to Jung-uk Kim from comment #17) If you realy mean that you're correct, than have a look at mysql-5.7.12/cmake/ssl.cmake line 148-153 and please send any patches upstream, so that Oracle can explain why they prefer static libs. Same applies to MySQL >=5.6, MariaDB >=10 and Percona >=5.6 That code was introduced 2012 to MySQL with this commit: https://github.com/mysql/mysql-server/commit/93494195a986f4c6b5f9e394163af902bbe09869 So it's ages older than the linking problem we now have, which leads me to the conclusion that base is broken not the ports. Created attachment 170380 [details]
Minimal changes to make the system OpenSSL working
This is really a port bug because I was able to build databases/mysql57-{client,server} just fine with this patch. Please note I haven't tried other SSL libraries.
Nice, i'll test that tomorrow, thanks. (In reply to Jung-uk Kim from comment #21) Thanks for your help on this problem ;) I'm trying to change ssl.cmake to find thing in more appropriate/dynamic way. But till then i see your solution really good (better that totally ignoring OpenSSL from Base). FWIW, The chosen/preferred approach is being able to use "-DWITH_SSL=${OPENSSLBASE}" instead of all "-DWITH_SSL=system/or/others" and everything should go correct, accurate and automated from both side (porst-framework and ssl.cmake) BTW, I'm testing its QA :D (lint/build) (In reply to Mahdi Mokhtari from comment #23) Just to inform you guys :) Linting had no Serious problem. But for building, it was okay for 10 and 11, but as 9.X's base is older than supported version, i have to except it from Jung-uk Kim's patch. So finally i added Jung-uk Kim's edits completely under conditions of IF FreeBSD >= 10 and it seems fine now :) Created attachment 170391 [details]
Patch merges Kim's fix to correctly choose SSL Ports for 9.X
Patch that do the works i mentioned above :D
Thanks for everybody's helps ;)
QA:
portlint Okay
poudriere Okay (9.X and newer)
If everybody agree, i guess we can let it to go for commit :) Opinions ? OK for the patch to be committed, but isn't ${PORTSDIR} deprecated? (In reply to Markus Kohlmeyer from comment #27) > but isn't ${PORTSDIR} deprecated? I'm afraid not :) Cause i fixed it by suggestion of portlint tool :D (In reply to Markus Kohlmeyer from comment #29) Thanks for providing link :) It doesn't say the other one is deprecated. At least i think we should wait till `portlint` doesn't warn us for this case ;) testbuilds@work (In reply to Mahdi Mokhtari from comment #30) No, you should remove ${PORTSDIR}. See r412346: https://svnweb.freebsd.org/changeset/ports/412346 Created attachment 170411 [details]
Previous Patch without ${PORTSDIR}
Done ;)
A commit references this bug: Author: pi Date: Tue May 17 18:18:41 UTC 2016 New revision: 415404 URL: https://svnweb.freebsd.org/changeset/ports/415404 Log: databases/mysql57-server: changing the way the SSL libraries are linked PR: 209458 Reported by: gja822@narod.ru Submitted by: Markus Kohlmeyer <rootservice@gmail.com> Reviewed by: jkim Approved by: Mahdi Mokhtari <mokhi64@gmail.com> (maintainer) Changes: head/databases/mysql57-server/Makefile Committed. I've read the discussion, testbuilds are fine. I hope this does not mess things up 8-} Thanks all guys. Good job ;) |