Re: CMake on Unix

Noel Butler <[email protected]> Thu, 14 May 2026 06:53:54 +1000
Newsgroups gmane.comp.apache.apr.devel
Message-ID <[email protected]>
--=_d61437a1fb51221b0c70c8ee5c860d19
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8;
 format=flowed

On 13/05/2026 07:25, Branko Čibej wrote:

> On 12. 5. 26 22:43, Noel Butler wrote:
> 
> On 13/05/2026 02:08, Timofei Zhakov wrote:
> 
> I will be happy to try and extend cmake to work on Unix, if this 
> feature is wanted of course.
> 
> -1
> 
> cmake is a PITA on *nix   for server admins

While I agree in principle that CMake is fundamentally broken and 
wrong-headed, that case can be made for pretty much any generic build 
system. So I would be grateful if you would expand on why server admins 
in particular would be more affected than anyone else.

-- Brane

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

-- 
_Regards,_
_Noel Butler_
--=_d61437a1fb51221b0c70c8ee5c860d19
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 13/05/2026 07:25, 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">
<div class=3D"v1moz-cite-prefix">On 12. 5. 26 22:43, Noel Butler wrote:</di=
v>
<blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2=
px solid; margin: 0">
<p id=3D"v1reply-intro">On 13/05/2026 02:08, Timofei Zhakov wrote:</p>
<blockquote style=3D"padding: 0 0.4em; border-left: #1010ff 2px solid; marg=
in: 0;">
<div id=3D"v1replybody1">
<div dir=3D"ltr">
<div>&nbsp;</div>
<div>I will be happy to try and extend cmake to work on Unix, if this featu=
re is wanted of course.</div>
<div>&nbsp;</div>
<span class=3D"v1v1gmail_signature_prefix"></span></div>
</div>
</blockquote>
<p>-1</p>
<p>cmake is a PITA on *nix &nbsp; for server admins</p>
</blockquote>
<br />While I agree in principle that CMake is fundamentally broken and wro=
ng-headed, that case can be made for pretty much any generic build system. =
So I would be grateful if you would expand on why server admins in particul=
ar would be more affected than anyone else.<br /><br />-- Brane<br /><br />=
</div>
</blockquote>
<p><br /></p>
<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&nbsp;</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&nbsp;<br />-DINSTALL_SQLBENCHDIR=3D=
"" -DINSTALL_MYSQLTESTDIR=3Dmysql-test -DINSTALL_MANDIR=3Dman -DINSTALL_PLU=
GINDIR=3D"lib64/mysql/plugin"<br />&nbsp;-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 &nbsp;running &nbsp; &nbsp;make...</p>
<p><strong>THEN</strong>&nbsp;to upgrade each version you have to screw aro=
und with garbage like</p>
<p>rm $(&lt;/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 &nbsp;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, &nbsp;12 lines to do with what cron does in 1</p>
<p><br /></p>
<p>/that completes this years rant</p>
<p><br /></p>
<p><br /></p>
<div id=3D"signature">-- <br />
<p><em>Regards,</em><br /><em>Noel Butler</em></p>
<p><br /></p>
</div>
</body></html>

--=_d61437a1fb51221b0c70c8ee5c860d19--