I use this with cmake: -DWITH_SSL=/home/mdcallag/d/openssl-111
And it is respected during the build. If I check binaries in the build directory they are linked against it. But after "make install" when I check with ldd on the installed binaries, they reference a different path to SSL.
I think we should remove WITH_SSL=path (because it duplicates official functionality of FindOpenSSL.cmake), like we removed WITH_DEBUG long ago.
If MySQL thinks it is a good thing to keep this option that I introduced in 2009 (to be compatible with autotools, no other reason,and because I did not know CMake back then), I can't stop them from doing it
We can make a better error message, and just have WITH_SSL=system|bundled.
BTW, maybe you can live with "bundled", which is wolfssl, or is there any special reason why you're compiling with custom static OpenSSL libraries?
Vladislav Vaintroub
added a comment - - edited I think we should remove WITH_SSL=path (because it duplicates official functionality of FindOpenSSL.cmake), like we removed WITH_DEBUG long ago.
If MySQL thinks it is a good thing to keep this option that I introduced in 2009 (to be compatible with autotools, no other reason,and because I did not know CMake back then), I can't stop them from doing it
We can make a better error message, and just have WITH_SSL=system|bundled.
BTW, maybe you can live with "bundled", which is wolfssl, or is there any special reason why you're compiling with custom static OpenSSL libraries?
Only checked this on MariaDB 10.1.48, but I get compiler errors from Mroonga with -DWITHOUT_DYNAMIC_PLUGINS=1. The fix is to add -DPLUGIN_MROONGA=NO so I don't think that WITHOUT_DYNAMIC_PLUGINS=1 does what I want it to do.
And from cmake . -LH I see that Mroonga is dynamic
PLUGIN_MROONGA:STRING=DYNAMIC
Mark Callaghan
added a comment - Only checked this on MariaDB 10.1.48, but I get compiler errors from Mroonga with -DWITHOUT_DYNAMIC_PLUGINS=1. The fix is to add -DPLUGIN_MROONGA=NO so I don't think that WITHOUT_DYNAMIC_PLUGINS=1 does what I want it to do.
And from cmake . -LH I see that Mroonga is dynamic
PLUGIN_MROONGA:STRING=DYNAMIC
Yes, you're right mroonga is special . It is the only plugin that does not use MYSQL_ADD_PLUGIN, but feels the need to reinvent it in their CMakeLists.txt
Vladislav Vaintroub
added a comment - Yes, you're right mroonga is special . It is the only plugin that does not use MYSQL_ADD_PLUGIN, but feels the need to reinvent it in their CMakeLists.txt
wlad, I suspect there may be many custom scripts using -DWITH_SSL=. It shouldn't be difficult to set OPENSSL_ROOT_DIR and OPENSSL_USE_STATIC_LIBS if WITH_SSL is set to a path, should it?
Unless, of course, it was totally broken for the last 15 (?) years, in which case we can assume that nobody uses it.
Sergei Golubchik
added a comment - wlad , I suspect there may be many custom scripts using -DWITH_SSL= . It shouldn't be difficult to set OPENSSL_ROOT_DIR and OPENSSL_USE_STATIC_LIBS if WITH_SSL is set to a path, should it?
Unless, of course, it was totally broken for the last 15 (?) years, in which case we can assume that nobody uses it.
I do not think there are many custom scripts. In the years past, I have seen this bug report, and something with openssl fips, 2 bug reports, which amounts in a bug report every 7 years. Breaking the workflow of estimated 5-6 people worldwide, who use -WITH_SSL=path, should be no concern, especially if the error message is clear and the fix is trivial.
Going forward, I would not like our cmake to be "helpful" , and obstruct/hide all standard option from the user.
I made an experiment, tried pretending to be CMake newbie, so I asked ChatGPT, how to use custom version of OpenSSL, and it knows about OPENSSL_ROOT_DIR. And when I asked "what if I want to link statically", it knew the correct answer as well.
Besides, changing the behavior to be compatible with MySQL's CMake makes, wrt static linking, as proposed, would make it incompatible with our traditional compilation anyway. That static libraries are suddenly preferred now, and were not in the past, is Oracle MySQL's undocumented behavior, that by accident seemed to do the right thing for bug reporter.
Lastly, this OPENSSL=path already was problematic for us in the past, see MDEV-27540
Vladislav Vaintroub
added a comment - - edited I do not think there are many custom scripts. In the years past, I have seen this bug report, and something with openssl fips, 2 bug reports, which amounts in a bug report every 7 years. Breaking the workflow of estimated 5-6 people worldwide, who use -WITH_SSL=path, should be no concern, especially if the error message is clear and the fix is trivial.
Going forward, I would not like our cmake to be "helpful" , and obstruct/hide all standard option from the user.
I made an experiment, tried pretending to be CMake newbie, so I asked ChatGPT, how to use custom version of OpenSSL, and it knows about OPENSSL_ROOT_DIR. And when I asked "what if I want to link statically", it knew the correct answer as well.
Besides, changing the behavior to be compatible with MySQL's CMake makes, wrt static linking, as proposed, would make it incompatible with our traditional compilation anyway. That static libraries are suddenly preferred now, and were not in the past, is Oracle MySQL's undocumented behavior, that by accident seemed to do the right thing for bug reporter.
Lastly, this OPENSSL=path already was problematic for us in the past, see MDEV-27540
People
Vladislav Vaintroub
Mark Callaghan
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":905.2000007629395,"ttfb":240.10000038146973,"pageVisibility":"visible","entityId":128028,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"b2c95c5c-c781-4ac7-9cda-27083519b23d","navigationType":0,"readyForUser":1022.1000003814697,"redirectCount":0,"resourceLoadedEnd":691.1000003814697,"resourceLoadedStart":253,"resourceTiming":[{"duration":74.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":253,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":327.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":74.90000057220459,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":253.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":328.20000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":166.70000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":253.5,"connectEnd":253.5,"connectStart":253.5,"domainLookupEnd":253.5,"domainLookupStart":253.5,"fetchStart":253.5,"redirectEnd":0,"redirectStart":0,"requestStart":331.80000019073486,"responseEnd":420.20000076293945,"responseStart":360.70000076293945,"secureConnectionStart":253.5},{"duration":210.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":332.4000005722046,"responseEnd":464.30000019073486,"responseStart":364,"secureConnectionStart":254},{"duration":90.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":254.30000019073486,"connectEnd":254.30000019073486,"connectStart":254.30000019073486,"domainLookupEnd":254.30000019073486,"domainLookupStart":254.30000019073486,"fetchStart":254.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":333.6000003814697,"responseEnd":345.1000003814697,"responseStart":344.1000003814697,"secureConnectionStart":254.30000019073486},{"duration":92.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":254.5,"connectEnd":254.5,"connectStart":254.5,"domainLookupEnd":254.5,"domainLookupStart":254.5,"fetchStart":254.5,"redirectEnd":0,"redirectStart":0,"requestStart":335,"responseEnd":346.80000019073486,"responseStart":346.1000003814697,"secureConnectionStart":254.5},{"duration":93.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":254.60000038146973,"connectEnd":254.60000038146973,"connectStart":254.60000038146973,"domainLookupEnd":254.60000038146973,"domainLookupStart":254.60000038146973,"fetchStart":254.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":336.30000019073486,"responseEnd":347.70000076293945,"responseStart":346.9000005722046,"secureConnectionStart":254.60000038146973},{"duration":80.90000057220459,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":254.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":335.70000076293945,"responseStart":0,"secureConnectionStart":0},{"duration":94.59999942779541,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":254.9000005722046,"connectEnd":254.9000005722046,"connectStart":254.9000005722046,"domainLookupEnd":254.9000005722046,"domainLookupStart":254.9000005722046,"fetchStart":254.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":338.4000005722046,"responseEnd":349.5,"responseStart":348.70000076293945,"secureConnectionStart":254.9000005722046},{"duration":82.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":255.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":255.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":338,"responseStart":0,"secureConnectionStart":0},{"duration":96.79999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":255.20000076293945,"connectEnd":255.20000076293945,"connectStart":255.20000076293945,"domainLookupEnd":255.20000076293945,"domainLookupStart":255.20000076293945,"fetchStart":255.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":340.5,"responseEnd":352,"responseStart":351,"secureConnectionStart":255.20000076293945},{"duration":420.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":270.20000076293945,"connectEnd":270.20000076293945,"connectStart":270.20000076293945,"domainLookupEnd":270.20000076293945,"domainLookupStart":270.20000076293945,"fetchStart":270.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":482.20000076293945,"responseEnd":690.3000001907349,"responseStart":683.3000001907349,"secureConnectionStart":270.20000076293945},{"duration":420.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":270.30000019073486,"connectEnd":270.30000019073486,"connectStart":270.30000019073486,"domainLookupEnd":270.30000019073486,"domainLookupStart":270.30000019073486,"fetchStart":270.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":498.6000003814697,"responseEnd":691.1000003814697,"responseStart":685.5,"secureConnectionStart":270.30000019073486},{"duration":193.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":647.3000001907349,"connectEnd":647.3000001907349,"connectStart":647.3000001907349,"domainLookupEnd":647.3000001907349,"domainLookupStart":647.3000001907349,"fetchStart":647.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":806.9000005722046,"responseEnd":840.4000005722046,"responseStart":839.8000001907349,"secureConnectionStart":647.3000001907349},{"duration":288,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":898.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":898.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1186.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":271.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":923.7000007629395,"connectEnd":923.7000007629395,"connectStart":923.7000007629395,"domainLookupEnd":923.7000007629395,"domainLookupStart":923.7000007629395,"fetchStart":923.7000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":1143.5,"responseEnd":1195.2000007629395,"responseStart":1192.3000001907349,"secureConnectionStart":923.7000007629395}],"fetchStart":0,"domainLookupStart":43,"domainLookupEnd":55,"connectStart":55,"connectEnd":74,"secureConnectionStart":63,"requestStart":74,"responseStart":240,"responseEnd":269,"domLoading":244,"domInteractive":1130,"domContentLoadedEventStart":1130,"domContentLoadedEventEnd":1177,"domComplete":1815,"loadEventStart":1815,"loadEventEnd":1816,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1094.6000003814697},{"name":"bigPipe.sidebar-id.end","time":1095.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.start","time":1095.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1097.2000007629395},{"name":"activityTabFullyLoaded","time":1199.3000001907349}],"measures":[],"correlationId":"a08d196a221a91","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I think we should remove WITH_SSL=path (because it duplicates official functionality of FindOpenSSL.cmake), like we removed WITH_DEBUG long ago.
If MySQL thinks it is a good thing to keep this option that I introduced in 2009 (to be compatible with autotools, no other reason,and because I did not know CMake back then), I can't stop them from doing it
We can make a better error message, and just have WITH_SSL=system|bundled.
BTW, maybe you can live with "bundled", which is wolfssl, or is there any special reason why you're compiling with custom static OpenSSL libraries?