Re: CMake on Unix
Branko Čibej <[email protected]> Thu, 14 May 2026 06:54:30 +0200
| Newsgroups | gmane.comp.apache.apr.devel |
|---|---|
| Organization | The Apache Software Foundation |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------yZWbYniyhyyV10uV00tiJgu3
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 13. 5. 26 22:53, Noel Butler wrote:
>
> 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
>
You just described two horribly broken CMake build systems. In the two
cases you mentioned, the fault lies with the authors, not with CMake. :)
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
--------------yZWbYniyhyyV10uV00tiJgu3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 13. 5. 26 22:53, Noel Butler wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p id="reply-intro">On 13/05/2026 07:25, Branko Čibej wrote:</p>
<blockquote type="cite"
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div class="v1moz-cite-prefix">On 12. 5. 26 22:43, Noel Butler
wrote:</div>
<blockquote type="cite"
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p id="v1reply-intro">On 13/05/2026 02:08, Timofei Zhakov
wrote:</p>
<blockquote
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">
<div id="v1replybody1">
<div dir="ltr">
<div> </div>
<div>I will be happy to try and extend cmake to work
on Unix, if this feature is wanted of course.</div>
<div> </div>
<span class="v1v1gmail_signature_prefix"></span></div>
</div>
</blockquote>
<p>-1</p>
<p>cmake is a PITA on *nix for server admins</p>
</blockquote>
<br>
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.<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 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 -</p>
<p>./configure --prefix=/usr --localstatedir=/usr/mysql/data
--datadir=/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="-O2 -fPIC" -DCMAKE_CXX_FLAGS="-O2 -fPIC"
-DFEATURE_SET="community" -DCMAKE_INSTALL_PREFIX=/usr -D<br>
INSTALL_LIBDIR="lib64" -DINSTALL_SBINDIR=libexec
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_MYSQLSHAREDIR=share/mysql <br>
-DINSTALL_SQLBENCHDIR="" -DINSTALL_MYSQLTESTDIR=mysql-test
-DINSTALL_MANDIR=man -DINSTALL_PLUGINDIR="lib64/mysql/plugin"<br>
-DINSTALL_SCRIPTDIR=bin -DINSTALL_SUPPORTFILESDIR=share/mysql
-DINSTALL_MYSQLDATADIR="/var/lib/mysql" -DMYSQL_DATADIR="<br>
/var/lib/mysql" -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock"
-DWITH_EXTRA_CHARSETS=complex -DWITH_INNOBASE_STORAGE_ENGI<br>
NE=1 -DENABLED_LOCAL_INFILE=ON -DWITH_LIBARCHIVE=ON
-DWITH_READLINE=ON -DWITH_JEMALLOC=system -DWITH_ZLIB=system
-DWITH_<br>
EXTERNAL_ZLIB=ON -DWITH_SSL=system -DCONC_WITH_SSL=ON
-DUSE_ARIA_FOR_TMP_TABLES=ON -DAWS_SDK_EXTERNAL_PROJECT=OFF</p>
<p>Then running make...</p>
<p><strong>THEN</strong> to upgrade each version you have to screw
around with garbage like</p>
<p>rm $(</root/install_manifest-MARIADB.txt)<br>
make install<br>
cp install_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 the 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=</p>
<p><br>
</p>
<p>NOW it too requires all the manual rm BS as maria/mysql above,
but at least its CMAKE line is much shorter..</p>
<p><br>
</p>
<p>cmake .. -D CMAKE_INSTALL_PREFIX=/usr/local -D
CMAKE_INSTALL_LIBDIR=lib64 -D APP_CONFIG_DIRECTORY=/etc/clamav
-D DATABASE_DIRECTORY=/var/lib/clamav</p>
<p><br>
</p>
<p>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.</p>
<p>I reckon the same morons who are involved in systemd are
involved in cmake, 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
CMake. :)<br>
<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 that 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>
</body>
</html>
--------------yZWbYniyhyyV10uV00tiJgu3--