Re: CMake on Unix
Timofei Zhakov <[email protected]> Fri, 15 May 2026 21:57:14 +0200
| Newsgroups | gmane.comp.apache.apr.devel |
|---|---|
| Message-ID | <CAPD1kXQzVRybVH-Qui3p-LWAxz=iVTm7SSVpOpz1KSeVGLRJmg@mail.gmail.com> |
--000000000000aa84da0651e0a01d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 15, 2026 at 9:28=E2=80=AFPM Daniel Sahlberg <daniel.l.sahlberg@= gmail.com> wrote: > fre 15 maj 2026 kl. 21:18 skrev Timofei Zhakov <[email protected]>: > >> On Thu, May 14, 2026 at 12:49=E2=80=AFPM Noel Butler <noel.butler@ausics= .net> >> wrote: >> > >> > On 14/05/2026 14:54, Branko =C4=8Cibej 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 f= rom >> memory - >> > >> > ./configure --prefix=3D/usr --localstatedir=3D/usr/mysql/data >> --datadir=3D/var/lib/mysql >> > >> > >> > done... >> > >> > >> > BUT cmake to do same thing requires this crap (supplied my mariadb tea= m >> member to mimic our build requirements) >> > >> > >> > cmake -DCMAKE_C_FLAGS=3D"-O2 -fPIC" -DCMAKE_CXX_FLAGS=3D"-O2 -fPIC" >> -DFEATURE_SET=3D"community" -DCMAKE_INSTALL_PREFIX=3D/usr -D >> > INSTALL_LIBDIR=3D"lib64" -DINSTALL_SBINDIR=3Dlibexec >> -DINSTALL_INCLUDEDIR=3Dinclude/mysql -DINSTALL_MYSQLSHAREDIR=3Dshare/mys= ql >> > -DINSTALL_SQLBENCHDIR=3D"" -DINSTALL_MYSQLTESTDIR=3Dmysql-test >> -DINSTALL_MANDIR=3Dman -DINSTALL_PLUGINDIR=3D"lib64/mysql/plugin" >> > -DINSTALL_SCRIPTDIR=3Dbin -DINSTALL_SUPPORTFILESDIR=3Dshare/mysql >> -DINSTALL_MYSQLDATADIR=3D"/var/lib/mysql" -DMYSQL_DATADIR=3D" >> > /var/lib/mysql" -DMYSQL_UNIX_ADDR=3D"/var/run/mysql/mysql.sock" >> -DWITH_EXTRA_CHARSETS=3Dcomplex -DWITH_INNOBASE_STORAGE_ENGI >> > NE=3D1 -DENABLED_LOCAL_INFILE=3DON -DWITH_LIBARCHIVE=3DON -DWITH_READL= INE=3DON >> -DWITH_JEMALLOC=3Dsystem -DWITH_ZLIB=3Dsystem -DWITH_ >> > EXTERNAL_ZLIB=3DON -DWITH_SSL=3Dsystem -DCONC_WITH_SSL=3DON >> -DUSE_ARIA_FOR_TMP_TABLES=3DON -DAWS_SDK_EXTERNAL_PROJECT=3DOFF >> > >> > Then running make... >> > >> > THEN to upgrade each version you have to screw around with garbage lik= e >> > >> > 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 pluc= k >> out of a tarball >> > >> > all because there is no make uninstall.... >> > >> > >> > >> > And clamav as mentioned earlier, before it was just >> > >> > ./configure --prefix=3D >> > >> > >> > 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=3D/usr/local -D >> CMAKE_INSTALL_LIBDIR=3Dlib64 -D APP_CONFIG_DIRECTORY=3D/etc/clamav -D >> DATABASE_DIRECTORY=3D/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 exc= use. >> > >> > 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 garbag= e. >> > >> > >> > >> > >> > >> > 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 clama= v >> (that I could remove if need be), why the cisco folk want to go all >> windowsy with clamav, christ knows. >> >> >> I would like to kindly remind you that in projects under the Apache >> Software Foundation we *must* follow the Code of Conduct. >> >> Please refer to: >> >> [[[ >> 2. Be empathetic, welcoming, friendly, and patient. We work together to >> resolve conflicts, assume good intentions, and do our best to act in an >> empathetic fashion. We may all experience some frustration from time to >> time, but we do not allow frustration to result in a personal attack. A >> community where people feel uncomfortable or threatened is not a product= ive >> one. We should be respectful when dealing with other community members a= s >> well as with people outside our community. >> ]]] >> >> and >> >> [[[ >> 5. Be careful in the words that we choose. Whether we are participating >> as professionals or volunteers, we value professionalism in all >> interactions, and take responsibility for our own speech. Be kind to >> others. Do not insult or put down other participants. Harassment and oth= er >> exclusionary behaviour are not acceptable. This includes, but is not >> limited to: >> ]]] >> >> That can be found here: < >> https://apache.org/foundation/policies/conduct.html>. >> >> I'm sorry but calling a suggested feature "fucked up like cmake" because >> you "don't want to fight with this shit" is higly unproffesional, not ki= nd >> at all, and you have zero technical arguments to back your point with. >> >> "I reckon the same morons who are involved in systemd are involved in >> cmake" is really not the most polite way when you speak about opensource >> devs - volunteers that develop software that runs more than 50% atleast >> (but probably even more) of all web infrastructure with what I believe a >> little or none founding. Even if a piece of software is not the best we >> could've seen, don't blame the people. >> >> I encourage you to be more respectful to people and new ideas. If you >> don't like a thought that was brought up on the list, form your >> constructive argument and we'll have a better conversation than just >> calling everyone stupid. >> >> -- >> Timofei Zhakov >> > > I would like to say that I stand behind Timofei I all the above. > > CMake may have its quirks and Brane has made a case that it doesn=E2=80= =99t > provide sensible defaults for many platforms, but I also think you can > create difficult build systems or easy build systems with any tool. > > Is it more difficult to create an easy to use build systems with autotool= s > than CMake? I have no idea. But we have one individual who is keen on > updating the existing CMake build system to also work on Unix. Lets see h= ow > it goes and if we can make it feature compatible and as easy as autotools > for the end user. > > Unfortunately, build systems in C are not perfect as we all know. There is always some trade off that we make when choosing one over another, or community preference which is also important. If you'd ask me to, I'd never stop naming downsides that either of them have. Of course the only good build system is the vanilla pure make but it's not how the modern real world turned out to be. Whether we like it or not. But generally, I think both systems do decently well on Unix. With cmake you can write the same configuration for Unix and Windows at the same time, while autoconf is generally the most standard way - the classic that everybody knows how to work with. If it works, nobody complains, and we understand how it works there is really no difference. This is my practical opinion. This is something I don't care about in the perfect world. However, my main point was lost; I'm NOT proposing switching to cmake completely. I only suggest making it work on Unix *as well*. I think all can agree that when an option to somehow test another platform is present, it's much easier to figure out how it works than to set up a VM and still deal with the same cmake, although it's probably not the most accurate example. --=20 Timofei Zhakov --000000000000aa84da0651e0a01d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Fri, May 15, 2026 at 9:28=E2=80=AFPM D= aniel Sahlberg <<a href=3D"mailto:[email protected]">daniel.l.= [email protected]</a>> wrote:</div><div class=3D"gmail_quote gmail_quot= e_container"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"= auto">fre 15 maj 2026 kl. 21:18 skrev Timofei Zhakov <<a href=3D"mailto:= [email protected]" target=3D"_blank">[email protected]</a>>:<br></div><d= iv dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote= " style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);= padding-left:1ex"><div dir=3D"ltr">On Thu, May 14, 2026 at 12:49=E2=80=AFPM= Noel Butler <<a href=3D"mailto:[email protected]" target=3D"_blank= ">[email protected]</a>> wrote:<br>><br>> On 14/05/2026 14:54= , Branko =C4=8Cibej wrote:<br>><br>> Its convoluted. Its messy.<br>&g= t;<br>> Lets take sql as a horrid example (but its similar with the only= other =C2=A0forced 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 -<br>><br>> ./configure --prefix=3D/usr --localstatedir=3D/us= r/mysql/data --datadir=3D/var/lib/mysql<br>><br>><br>> done...<br>= ><br>><br>> BUT cmake to do same thing requires this crap (supplie= d my mariadb team member to mimic our build requirements)<br>><br>><b= r>> cmake -DCMAKE_C_FLAGS=3D"-O2 -fPIC" -DCMAKE_CXX_FLAGS=3D&q= uot;-O2 -fPIC" -DFEATURE_SET=3D"community" -DCMAKE_INSTALL_P= REFIX=3D/usr -D<br>> INSTALL_LIBDIR=3D"lib64" -DINSTALL_SBINDI= R=3Dlibexec -DINSTALL_INCLUDEDIR=3Dinclude/mysql -DINSTALL_MYSQLSHAREDIR=3D= share/mysql<br>> -DINSTALL_SQLBENCHDIR=3D"" -DINSTALL_MYSQLTES= TDIR=3Dmysql-test -DINSTALL_MANDIR=3Dman -DINSTALL_PLUGINDIR=3D"lib64/= mysql/plugin"<br>> =C2=A0-DINSTALL_SCRIPTDIR=3Dbin -DINSTALL_SUPPOR= TFILESDIR=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 -DWIT= H_INNOBASE_STORAGE_ENGI<br>> NE=3D1 -DENABLED_LOCAL_INFILE=3DON -DWITH_L= IBARCHIVE=3DON -DWITH_READLINE=3DON -DWITH_JEMALLOC=3Dsystem -DWITH_ZLIB=3D= system -DWITH_<br>> EXTERNAL_ZLIB=3DON -DWITH_SSL=3Dsystem -DCONC_WITH_S= SL=3DON -DUSE_ARIA_FOR_TMP_TABLES=3DON -DAWS_SDK_EXTERNAL_PROJECT=3DOFF<br>= ><br>> Then =C2=A0running =C2=A0 =C2=A0make...<br>><br>> THEN t= o upgrade each version you have to screw around with garbage like<br>><b= r>> rm $(</root/install_manifest-MARIADB.txt)<br>> make install<br= >> cp install_manifest.txt /root/install_manifest-MARIADB.txt<br>><br= >> (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 ve= rsions, so you copy it, and lets not forget =C2=A0that file is not created = until the program is built and installed, its not something you can pluck o= ut of a tarball<br>><br>> all because there is no make uninstall....<= br>><br>><br>><br>> And clamav as mentioned earlier, before it = was just<br>><br>> ./configure --prefix=3D<br>><br>><br>> NO= W it too requires all the manual rm BS as maria/mysql above, but at least i= ts CMAKE line is much shorter..<br>><br>><br>> cmake .. -D CMAKE_I= NSTALL_PREFIX=3D/usr/local -D CMAKE_INSTALL_LIBDIR=3Dlib64 -D APP_CONFIG_DI= RECTORY=3D/etc/clamav -D DATABASE_DIRECTORY=3D/var/lib/clamav<br>><br>&g= t;<br>> you try remembering all that crap when you need to off the top o= f your head, and using a cheatsheet (like we obviously are doing) is not an= excuse.<br>><br>> I reckon the same morons who are involved in syste= md are involved in cmake, =C2=A012 lines to do with what cron does in 1<br>= ><br>><br>> /that completes this years rant<br>><br>><br>>= ;<br>> You just described two horribly broken CMake build systems. In th= e two cases you mentioned, the fault lies with the authors, not with CMake.= :)<br>><br>><br>><br>> yes, its a proble with cmake (see my en= d) and if the mariadb team can't get it right as you claim, then its mo= re of a reason to avoid the garbage.<br>><br>><br>><br>><br>>= ;<br>> Well, except in the sense that CMake has zero, nil, zilch, none w= hatsoever sane defaults on ANY platform.<br>><br>> I'm "happ= y" 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>><br>> I doubt its =C2=A0"just as easy&quo= t; to make it royally fscked up like cmake have, =C2=A0since most options a= re pretty well known, tried and tested, most code can be built with ./confi= gure && make && make install, you can't do that with th= at horrid cmake sewer.<br>><br>> You'll never change my mind on t= hat having fought with the shit, now I avoid it, except mariadb (that can&#= 39;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.<br><= br><br>I would like to kindly remind you that in projects under the Apache = Software Foundation we *must* follow the Code of Conduct.<br><br>Please ref= er to:<br><br>[[[<br>2. Be empathetic, welcoming, friendly, and patient. We= work together to resolve conflicts, assume good intentions, and do our bes= t to act in an empathetic fashion. We may all experience some frustration f= rom time to time, but we do not allow frustration to result in a personal a= ttack. A community where people feel uncomfortable or threatened is not a p= roductive one. We should be respectful when dealing with other community me= mbers as well as with people outside our community.<br>]]]<br><br>and<br><b= r>[[[<br>5. Be careful in the words that we choose. Whether we are particip= ating as professionals or volunteers, we value professionalism in all inter= actions, and take responsibility for our own speech. Be kind to others. Do = not insult or put down other participants. Harassment and other exclusionar= y behaviour are not acceptable. This includes, but is not limited to:<br><d= iv>]]]</div><div><br></div><div>That can be found here: <<span></span><a= href=3D"https://apache.org/foundation/policies/conduct.html" target=3D"_bl= ank">https://apache.org/foundation/policies/conduct.html</a>>.</div><br>= I'm sorry but calling a suggested feature "fucked up like cmake&qu= ot; because you "don't want to fight with this shit" is higly= unproffesional, not kind at all, and you have zero technical arguments to = back your point with.<br><br><div>"I reckon the same morons who are in= volved in systemd are involved in cmake<span>" is really not the most = polite way when you speak about opensource devs - volunteers that develop s= oftware that runs more than 50% atleast (but probably even more) of all web= infrastructure with what I believe a little or none founding. Even if a pi= ece of software is not the best we could've seen, don't blame the p= eople.</span></div><div><br></div><div><span>I encourage you to be more res= pectful to people and new ideas. If you don't like a thought that was= =C2=A0</span><span>brought up on the list</span><span>, form your construct= ive argument and we'll have a better conversation than just calling eve= ryone stupid.</span></div><br>--<br>Timofei Zhakov</div></blockquote><div d= ir=3D"auto"><br></div><div dir=3D"auto">I would like to say that I stand be= hind Timofei I all the above.</div><div dir=3D"auto"><br></div><div dir=3D"= auto">CMake may have its quirks and Brane has made a case that it doesn=E2= =80=99t provide sensible defaults for many platforms, but I also think you = can create difficult build systems or easy build systems with any tool.</di= v><div dir=3D"auto"><br></div><div dir=3D"auto">Is it more difficult to cre= ate an easy to use build systems with autotools than CMake? I have no idea.= But we have one individual who is keen on updating the existing CMake buil= d system to also work on Unix. Lets see how it goes and if we can make it f= eature compatible and as easy as autotools for the end user.</div><br clear= =3D"all"></div></div></blockquote><div><br></div><div>Unfortunately, build = systems in C are not perfect as we all=C2=A0know. There is always some=20 trade off that we make when choosing one over another,=C2=A0or community pr= eference which is also important. If you'd ask me to, I'd never sto= p naming=20 downsides that either of them have. Of course the only good build system is= the vanilla pure make but it's not how the modern real world turned ou= t to be. Whether=C2=A0we like it or not.</div><div><br></div><div>But gener= ally, I think both systems do decently well on Unix. With cmake you can wri= te the same configuration=C2=A0for Unix and Windows at the same time, while= autoconf is generally the most standard way - the classic that everybody k= nows how to work with.</div><div><br></div><div>If it works, nobody complai= ns, and we understand how it works there is really no difference. This is m= y practical opinion. This is something I don't care about in the perfec= t world.</div><div><br></div><div>However, my main point was lost; I'm = NOT proposing switching to cmake completely. I only suggest making it work = on Unix *as well*. I think all can agree that when an option to somehow tes= t another platform is present, it's much easier to figure out how it wo= rks than to set up a VM and still deal with the same cmake, although it'= ;s probably not the most accurate example.</div></div><br><span class=3D"gm= ail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signatu= re"><div dir=3D"ltr"><div>Timofei Zhakov</div></div></div></div> --000000000000aa84da0651e0a01d--