Re: CMake on Unix
Noel Butler <[email protected]> Thu, 14 May 2026 20:49:14 +1000
| Newsgroups | gmane.comp.apache.apr.devel |
|---|---|
| Message-ID | <[email protected]> |
--=_5e1adb991e182414f5c8920d5b75e0d8 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed On 14/05/2026 14:54, Branko Čibej wrote: >> Its convoluted. Its messy. >> >> Lets take sql as a horrid example (but its similar with the only other >> forced cmake requirement that we use being clamav), what used to >> configured and built with autotools could be done as such, clear >> simple EASY for even the most junior and senior administrator alike to >> config from memory - >> >> ./configure --prefix=/usr --localstatedir=/usr/mysql/data >> --datadir=/var/lib/mysql >> >> done... >> >> BUT cmake to do same thing requires this crap (supplied my mariadb >> team member to mimic our build requirements) >> >> cmake -DCMAKE_C_FLAGS="-O2 -fPIC" -DCMAKE_CXX_FLAGS="-O2 -fPIC" >> -DFEATURE_SET="community" -DCMAKE_INSTALL_PREFIX=/usr -D >> INSTALL_LIBDIR="lib64" -DINSTALL_SBINDIR=libexec >> -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_MYSQLSHAREDIR=share/mysql >> -DINSTALL_SQLBENCHDIR="" -DINSTALL_MYSQLTESTDIR=mysql-test >> -DINSTALL_MANDIR=man -DINSTALL_PLUGINDIR="lib64/mysql/plugin" >> -DINSTALL_SCRIPTDIR=bin -DINSTALL_SUPPORTFILESDIR=share/mysql >> -DINSTALL_MYSQLDATADIR="/var/lib/mysql" -DMYSQL_DATADIR=" >> /var/lib/mysql" -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" >> -DWITH_EXTRA_CHARSETS=complex -DWITH_INNOBASE_STORAGE_ENGI >> NE=1 -DENABLED_LOCAL_INFILE=ON -DWITH_LIBARCHIVE=ON -DWITH_READLINE=ON >> -DWITH_JEMALLOC=system -DWITH_ZLIB=system -DWITH_ >> EXTERNAL_ZLIB=ON -DWITH_SSL=system -DCONC_WITH_SSL=ON >> -DUSE_ARIA_FOR_TMP_TABLES=ON -DAWS_SDK_EXTERNAL_PROJECT=OFF >> >> Then running make... >> >> THEN to upgrade each version you have to screw around with garbage >> like >> >> rm $(</root/install_manifest-MARIADB.txt) >> make install >> cp install_manifest.txt /root/install_manifest-MARIADB.txt >> >> (Sure you don't need to cp and use /root/install_manifest but if >> someone clears out the source code you will be left with pieces of >> older versions, so you copy it, and lets not forget that file is not >> created until the program is built and installed, its not something >> you can pluck out of a tarball >> >> all because there is no make uninstall.... >> >> And clamav as mentioned earlier, before it was just >> >> ./configure --prefix= >> >> NOW it too requires all the manual rm BS as maria/mysql above, but at >> least its CMAKE line is much shorter.. >> >> cmake .. -D CMAKE_INSTALL_PREFIX=/usr/local -D >> CMAKE_INSTALL_LIBDIR=lib64 -D APP_CONFIG_DIRECTORY=/etc/clamav -D >> DATABASE_DIRECTORY=/var/lib/clamav >> >> you try remembering all that crap when you need to off the top of your >> head, and using a cheatsheet (like we obviously are doing) is not an >> excuse. >> >> I reckon the same morons who are involved in systemd are involved in >> cmake, 12 lines to do with what cron does in 1 >> >> /that completes this years rant > > You just described two horribly broken CMake build systems. In the two > cases you mentioned, the fault lies with the authors, not with CMake. > :) yes, its a proble with cmake (see my end) and if the mariadb team can't get it right as you claim, then its more of a reason to avoid the garbage. > Well, except in the sense that CMake has zero, nil, zilch, none > whatsoever sane defaults on ANY platform. > > I'm "happy" to say that it's extremely easy to write autotools builds > that are just as broken as the CMake examples you just described. > > -- Brane I doubt its "just as easy" to make it royally fscked up like cmake have, since most options are pretty well known, tried and tested, most code can be built with ./configure && make && make install, you can't do that with that horrid cmake sewer. You'll never change my mind on that having fought with the shit, now I avoid it, except mariadb (that can't be helped - at this time) and clamav (that I could remove if need be), why the cisco folk want to go all windowsy with clamav, christ knows. -- _Regards,_ _Noel Butler_ --=_5e1adb991e182414f5c8920d5b75e0d8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset= =3DUTF-8" /></head><body style=3D'font-size: 12pt; font-family: Verdana,Gen= eva,sans-serif'> <p id=3D"reply-intro">On 14/05/2026 14:54, Branko =C4=8Cibej wrote:</p> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0"> <div id=3D"replybody1"> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0"> <p>Its convoluted. Its messy.</p> <p>Lets take sql as a horrid example (but its similar with the only other &= nbsp;forced cmake requirement that we use being clamav), what used to confi= gured and built with autotools could be done as such, clear simple EASY for= even the most junior and senior administrator alike to config from memory = -</p> <p>./configure --prefix=3D/usr --localstatedir=3D/usr/mysql/data --datadir= =3D/var/lib/mysql </p> <p><br /></p> <p>done...</p> <p><br /></p> <p>BUT cmake to do same thing requires this crap (supplied my mariadb team = member to mimic our build requirements)</p> <p><br /></p> <p>cmake -DCMAKE_C_FLAGS=3D"-O2 -fPIC" -DCMAKE_CXX_FLAGS=3D"-O2 -fPIC" -DFE= ATURE_SET=3D"community" -DCMAKE_INSTALL_PREFIX=3D/usr -D<br />INSTALL_LIBDI= R=3D"lib64" -DINSTALL_SBINDIR=3Dlibexec -DINSTALL_INCLUDEDIR=3Dinclude/mysq= l -DINSTALL_MYSQLSHAREDIR=3Dshare/mysql <br />-DINSTALL_SQLBENCHDIR=3D= "" -DINSTALL_MYSQLTESTDIR=3Dmysql-test -DINSTALL_MANDIR=3Dman -DINSTALL_PLU= GINDIR=3D"lib64/mysql/plugin"<br /> -DINSTALL_SCRIPTDIR=3Dbin -DINSTAL= L_SUPPORTFILESDIR=3Dshare/mysql -DINSTALL_MYSQLDATADIR=3D"/var/lib/mysql" -= DMYSQL_DATADIR=3D"<br />/var/lib/mysql" -DMYSQL_UNIX_ADDR=3D"/var/run/mysql= /mysql.sock" -DWITH_EXTRA_CHARSETS=3Dcomplex -DWITH_INNOBASE_STORAGE_ENGI<b= r />NE=3D1 -DENABLED_LOCAL_INFILE=3DON -DWITH_LIBARCHIVE=3DON -DWITH_READLI= NE=3DON -DWITH_JEMALLOC=3Dsystem -DWITH_ZLIB=3Dsystem -DWITH_<br />EXTERNAL= _ZLIB=3DON -DWITH_SSL=3Dsystem -DCONC_WITH_SSL=3DON -DUSE_ARIA_FOR_TMP_TABL= ES=3DON -DAWS_SDK_EXTERNAL_PROJECT=3DOFF</p> <p>Then running make...</p> <p><strong>THEN</strong> to upgrade each version you have to screw aro= und with garbage like</p> <p>rm $(</root/install_manifest-MARIADB.txt)<br />make install<br />cp i= nstall_manifest.txt /root/install_manifest-MARIADB.txt</p> <p>(Sure you don't need to cp and use /root/install_manifest but if someone= clears out the source code you will be left with pieces of older versions,= so you copy it, and lets not forget that file is not created until t= he program is built and installed, its not something you can pluck out of a= tarball</p> <p>all because there is no make uninstall....</p> <p><br /></p> <p><br /></p> <p>And clamav as mentioned earlier, before it was just</p> <p>./configure --prefix=3D</p> <p><br /></p> <p>NOW it too requires all the manual rm BS as maria/mysql above, but at le= ast its CMAKE line is much shorter..</p> <p><br /></p> <p>cmake .. -D CMAKE_INSTALL_PREFIX=3D/usr/local -D CMAKE_INSTALL_LIBDIR=3D= lib64 -D APP_CONFIG_DIRECTORY=3D/etc/clamav -D DATABASE_DIRECTORY=3D/var/li= b/clamav</p> <p><br /></p> <p>you try remembering all that crap when you need to off the top of your h= ead, and using a cheatsheet (like we obviously are doing) is not an excuse.= </p> <p>I reckon the same morons who are involved in systemd are involved in cma= ke, 12 lines to do with what cron does in 1</p> <p><br /></p> <p>/that completes this years rant</p> </blockquote> <br /><br />You just described two horribly broken CMake build systems. In = the two cases you mentioned, the fault lies with the authors, not with CMak= e. :)</div> <div> </div> </blockquote> <div> </div> <div>yes, its a proble with cmake (see my end) and if the mariadb team can'= t get it right as you claim, then its more of a reason to avoid the garbage= =2E</div> <div> </div> <div> </div> <blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2= px solid; margin: 0"> <div> </div> <div><br />Well, except in the sense that CMake has zero, nil, zilch, none = whatsoever sane defaults on ANY platform.<br /><br />I'm "happy" to say tha= t it's extremely easy to write autotools builds that are just as broken as = the CMake examples you just described.<br /><br />-- Brane<br /><br /></div> </blockquote> <p><br /></p> <p>I doubt its "just as easy" to make it royally fscked up like cmake= have, since most options are pretty well known, tried and tested,&nb= sp;most code can be built with ./configure && make && make = install, you can't do that with that horrid cmake sewer.</p> <p>You'll never change my mind on that having fought with the shit, now I a= void it, except mariadb (that can't be helped - at this time) and clamav (t= hat I could remove if need be), why the cisco folk want to go all windowsy = with clamav, christ knows.</p> <div> </div> <div id=3D"signature">-- <br /> <p><em>Regards,</em><br /><em>Noel Butler</em></p> <p><br /></p> </div> </body></html> --=_5e1adb991e182414f5c8920d5b75e0d8--