<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 16, 2016 at 8:33 PM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 16.10.2016, at 20:27, Esteban Lorenzano &lt;<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 16 Oct 2016, at 20:03, Ben Coman &lt;btc@openInWorld.com&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Sun, Oct 16, 2016 at 10:47 AM, Gerardo Santana Gómez Garrido<br>
&gt;&gt; &lt;<a href="mailto:gerardo.santana@gmail.com">gerardo.santana@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I would like to get more feedback regarding the summary I posted a week ago. Reverse engineering configure to get <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> has meant a lot of work (see my progress attached) yet I still believe this step is crucial to tidy up our build system and add new platforms more easily, by adding more and *better* tests to <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Please let me know if there&#39;s any interest on this or whether you want to follow a different approach.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sat, Oct 8, 2016 at 12:27 AM, Gerardo Santana Gómez Garrido &lt;<a href="mailto:gerardo.santana@gmail.com">gerardo.santana@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; To summarize it:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 1. use simple, hand tailored, GNU Makefiles for building<br>
&gt;&gt;&gt;&gt; 2. generate and distribute a config.h once per platform<br>
&gt;&gt;&gt;&gt; 3. re-generate them only when a new platform is added or a current platform has had significant changes<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; For #3 to happen we need a configure script to do it. New platforms or changes to current ones will certainly mean adding tests to the configure script and so we also need <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>, for maintaining it.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Sadly, it seems that the configure script was being generated and checked into the source tree without the corresponding <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>. FYI, I&#39;m working on reverse engineering it to get the original <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>. After that it will be easy to move to where we want to be.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Wed, Oct 5, 2016 at 8:38 PM, Gerardo Santana Gómez Garrido &lt;<a href="mailto:gerardo.santana@gmail.com">gerardo.santana@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Yes, makes sense. Thanks. I will work on simplify it, based on your directives.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Tue, Oct 4, 2016 at 2:16 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Hi Gerardo,<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On Tue, Oct 4, 2016 at 12:32 AM, Gerardo Santana Gómez Garrido &lt;<a href="mailto:gerardo.santana@gmail.com">gerardo.santana@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Yes, energy and will.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Actually I would like to keep autoconf. I found out some duplicated code in the build.* directories that could probably be solved by using the autotools properly.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Are you strongly opposed to using autotools? May I try to make it work?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; No, I&#39;m not.  I&#39;m opposed to running it on each build.  The scheme we&#39;ve agreed upon is as follows (and I&#39;m cc&#39;ing vm-dev to include others working on this):<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 1. The correct realm for autoconf is in determining what facilities the platform provides, /not/ for deciding how to configure the VM, /not/ for generating Makefiles, etc.  So autoconf (or CMake) should be run once per platform (updating after significant third-party software is installed, C compiler is updated, etc), and produces a config.h in the relevant build directory, e.g. build.linux32x86/config.h.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 2. the VM is to be configured from config.h (which informs us as to what third-party libraries, os facilities, word sizes, etc are available for the current platform), the Makefile (e.g. build.macos32x86/pharo.cog.<wbr>spur/Makefile), and <a href="http://plugins.int" rel="noreferrer" target="_blank">plugins.int</a> and plugins.ext (to determine the set of plugins to attempt to build; their makefiles may further filter-out plugins depending on available third-party libraries).<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; So the build scheme we&#39;re trying to move towards is<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; a) either autoconf or CMake is used to generate a config.h file in each build directory that defines platform facilities (#define HAS_EPOLL 1 et al).  This is run occasionally, /not/ on every build<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; b) use conventional Gnu Make makefiles, avoiding all the mkmf scripts in platforms/unix/conf, to build specific VMs<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Does that make sense?  For me this is very important.  See<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2016-February/119002.html" rel="noreferrer" target="_blank">http://lists.pharo.org/<wbr>pipermail/pharo-dev_lists.<wbr>pharo.org/2016-February/<wbr>119002.html</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; and this is from a Squeak Oversight Board discussion before we moved to githug:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; &quot;It was decided to leave the build system as-is using GNU Makefiles where available with a commitment to move to GNU Makefiles on Linux. We will use CMake to produce per-platform config files that identify platform facilities (such as epoll(2) vs kqueue(2) vs poll(s) vs select(3)).&quot;<br>
&gt;&gt;<br>
&gt;&gt; Is the CMake approach certain, or yet to be proven?  Maybe CMake fits<br>
&gt;&gt; in better than autoconf with the third party libs used by Pharo ?<br>
&gt;&gt;<br>
&gt;&gt;&gt; From my naive reading CMake seems a better cross platform choice than<br>
&gt;&gt; autoconf, but it seems that CMake can&#39;t separate out generating just a<br>
&gt;&gt; config.h file from generating the build makefiles, a part that seems<br>
&gt;&gt; not wanted.  Does anyone know any different?  I&#39;ve signed up to the<br>
&gt;&gt; CMake mail list to try to clarify this.<br>
&gt;&gt;<br>
&gt;&gt; On the flip side, most of the stuff I read about autoconf is that it<br>
&gt;&gt; is very unix based and not suited for cross-platform with native<br>
&gt;&gt; MSWindows MSVC.  Except an enabler might be CCCL, a gcc compatibility<br>
&gt;&gt; wrapper for the MSVC command-line....<br>
&gt;&gt;  <a href="https://github.com/swig/cccl#autotools-and-msvc" rel="noreferrer" target="_blank">https://github.com/swig/cccl#<wbr>autotools-and-msvc</a><br>
&gt;&gt;  <a href="https://folti.blogs.balabit.com/2009/08/compiling-autoconfmake-projects-under-msvc-part-one/" rel="noreferrer" target="_blank">https://folti.blogs.balabit.<wbr>com/2009/08/compiling-<wbr>autoconfmake-projects-under-<wbr>msvc-part-one/</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; What is the future of (IIUC) Pharo&#39;s dynamic generation of Cmake files?<br>
&gt;<br>
&gt; in my talk with Eliot, config.h (named cogConfig.h) generation will be moved to one or the other, the one that is easier. There was not a “use this” decision.<br>
&gt; today, I’m more closer to the opinion of using autoconf instead cmake. Main reason is that we already use autoconf for linux so why add yet-another-tool?<br>
<br>
Sorry, but CMake has been used since 2006 for the Interpreter VM on Linux replacing Autoconf there…<br>
CMake is much less convoluted than Autoconf.<br></blockquote><div><br></div><div>+ 1000</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
&gt;<br>
&gt; anyway, that’s what I have from my side. Not squeak board but pharo board :)<br>
&gt;<br>
&gt; Esteban<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Mon, Oct 3, 2016 at 8:26 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi Gerardo,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;   welcome!<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Sun, Oct 2, 2016 at 8:45 AM, Gerardo Santana Gómez Garrido &lt;<a href="mailto:gerardo.santana@gmail.com">gerardo.santana@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi Eliot,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; what is the proper way to ask questions regarding building Clog?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I just found that in opensmalltalk-vm/platforms/<wbr>unix/config, configure is not in sync with <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
&gt;&gt;<br>
&gt;&gt; I guess this observation comes from generating configure from<br>
&gt;&gt; <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> and finding a difference with the committed configure.<br>
&gt;&gt;<br>
&gt;&gt; But I see the history date on these files seems in sync<br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commits/Cog/platforms/unix/config/configure.ac" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/commits/Cog/platforms/unix/<wbr>config/configure.ac</a><br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commits/Cog/platforms/unix/config/configure" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/commits/Cog/platforms/unix/<wbr>config/configure</a><br>
&gt;&gt;<br>
&gt;&gt; so maybe its down to different environments?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I see your version on the right here...<br>
&gt;&gt;  <a href="https://www.diffchecker.com/jAQEeQOn" rel="noreferrer" target="_blank">https://www.diffchecker.com/<wbr>jAQEeQOn</a>    (valid 1 month only)<br>
&gt;&gt; has this different...<br>
&gt;&gt;   AC_DEFUN([AC_ICONV], [<br>
&gt;&gt;   AC_CHECK_FUNC(_dyld_present,[]<wbr>,[<br>
&gt;&gt;   AC_CHECK_LIB(iconv, iconv_open, ac_cv_iconv=yes, [<br>
&gt;&gt;   AC_CHECK_LIB(iconv, libiconv_open, ac_cv_iconv=yes, ac_cv_iconv=no)<br>
&gt;&gt;   ])<br>
&gt;&gt;   if test $ac_cv_iconv = yes; then<br>
&gt;&gt;     LIBS=&quot;$LIBS -liconv&quot;<br>
&gt;&gt;   fi]<br>
&gt;&gt;   )])<br>
&gt;&gt;<br>
&gt;&gt; which I find in...<br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/vm/acinclude.m4" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/blob/Cog/platforms/unix/vm/<wbr>acinclude.m4</a><br>
&gt;&gt; which is included by...<br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/config/aclocal.m4" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/blob/Cog/platforms/unix/<wbr>config/aclocal.m4</a><br>
&gt;&gt; which seems referenced by...<br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/config/Makefile" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/blob/Cog/platforms/unix/<wbr>config/Makefile</a><br>
&gt;&gt; but I don&#39;t really know how they all fit together.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; btw Eliot, I see the following...<br>
&gt;&gt; <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/doc/HowToBuildFromSource.txt" rel="noreferrer" target="_blank">https://github.com/<wbr>OpenSmalltalk/opensmalltalk-<wbr>vm/blob/Cog/platforms/unix/<wbr>doc/HowToBuildFromSource.txt</a><br>
&gt;&gt; describes running configure, but I wonder how much of that from 2010<br>
&gt;&gt; is still relevant today?<br>
&gt;&gt;<br>
&gt;&gt; In fact I learnt something new in that doc, reading... &quot;by running the<br>
&gt;&gt; config.status script ... is much faster than running configure all<br>
&gt;&gt; over again. (In fact, make should detect any changes to the plugin<br>
&gt;&gt; configuration and re-run config.status for you automatically.) Note:<br>
&gt;&gt; `configure&#39; doesn&#39;t actually create any files. The last thing it does<br>
&gt;&gt; is run `config.status&#39; to create the configured files in blddir from<br>
&gt;&gt; the corresponding file.ins in the unix/config directory.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; It may or may not be.  Currently I can only reliably run make to generate a new configure script on CentOS 5.3.  If I try on e.g. 6.x I get an invalid configure.<br>
&gt;&gt;<br>
&gt;&gt; Eliot, How do you determine its an invalid configure file?<br>
&gt;&gt; I just ran &#39;make&#39; in  platforms/unix/config without error, although<br>
&gt;&gt; the diff lines is 40k.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; We hope to eliminate configure soon and use a makefile style similar to the Mac and Windows platforms.  Do you have energy to contribute to this?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Thanks in advance.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; P. S. I have made squeak.clog.spur compile on OpenBSD, but I&#39;m looking for a better way to do it.<br>
<br>
<br>
</blockquote></div><br></div></div>