<div dir="ltr">Hi All,<div class="gmail_extra"><br>    in the below, everything looks sane except configH.  This looks like an awful mistake.  It appears to be capturing the output of an autoconf or CMake run, determining things like USE_X11 USE_X11_GLX USE_QUARTZ USE_QUARTZ_CGL USE_RFB HAVE_LIBX11  HAVE_LIBXEXT HAVE_LIBDL HAVE_DYLD HAVE_LIBFFI etc that should be determined at VM configure time, on the host system, immediately before compile, /not/ at source generation time.  What&#39;s going on here?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 10, 2014 at 3:15 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.43.mcz" target="_blank">http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.43.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: CMakeVMMakerSqueak-tty.43<br>
Author: tty<br>
Time: 10 June 2014, 6:15:54.458 pm<br>
UUID: af66e1e9-4379-4938-98bd-0d4b36fcda1c<br>
Ancestors: CMakeVMMakerSqueak-tty.42<br>
<br>
Added SqueakCMakeVMMakerAbstractBuilder query for available build types.<br>
<br>
Started (finally!) the actual build configuration construction.<br>
<br>
This auto-generated image is missing B2DPlugin, so I will investigate that and return to the builds<br>
<br>
=============== Diff against CMakeVMMakerSqueak-tty.42 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config&gt;&gt;configH (in category &#39;squeak compatibility&#39;) -----<br>
+ configH<br>
+       &quot; right now its like  that &quot;<br>
+       ^ &#39;<br>
+ #ifndef __sq_config_h<br>
+ #define __sq_config_h<br>
+<br>
+ /* explicit image width */<br>
+<br>
+ #define HAVE_INTERP_H 1<br>
+<br>
+ /* package options */<br>
+<br>
+ #define USE_X11 1<br>
+ #define USE_X11_GLX 1<br>
+ /* #undef       USE_QUARTZ */<br>
+ /* #undef       USE_QUARTZ_CGL */<br>
+ /* #undef       USE_RFB */<br>
+<br>
+ /* libraries */<br>
+<br>
+ /* #undef       HAVE_LIBX11 */<br>
+ #define HAVE_LIBXEXT 1<br>
+ #define HAVE_LIBDL 1<br>
+ /* #undef       HAVE_DYLD */<br>
+ /* #undef       HAVE_LIBFFI */<br>
+ /* #undef       HAVE_ICONV */<br>
+<br>
+ /* #undef       USE_AUDIO_NONE */<br>
+ /* #undef       USE_AUDIO_SUN */<br>
+ /* #undef       USE_AUDIO_NAS */<br>
+ /* #undef       USE_AUDIO_OSS */<br>
+ /* #undef       USE_AUDIO_MACOSX */<br>
+ /* #undef       OSS_DEVICE */<br>
+<br>
+ /* header files */<br>
+<br>
+ #define HAVE_UNISTD_H 1<br>
+ /* #undef       NEED_GETHOSTNAME_P */<br>
+<br>
+ #define HAVE_DIRENT_H 1<br>
+ /* #undef       HAVE_SYS_NDIR_H */<br>
+ /* #undef       HAVE_SYS_DIR_H */<br>
+ /* #undef       HAVE_NDIR_H */<br>
+ #define HAVE_DLFCN_H 1<br>
+ /* #undef       HAVE_ICONV_H */<br>
+<br>
+ #define HAVE_SYS_TIME_H 1<br>
+ #define TIME_WITH_SYS_TIME 1<br>
+<br>
+ #define HAVE_SYS_FILIO_H 1<br>
+<br>
+ /* #undef       HAVE_SYS_AUDIOIO_H */<br>
+ /* #undef       HAVE_SUN_AUDIOIO_H */<br>
+<br>
+ /* #undef       HAVE_PTY_H */<br>
+ /* #undef       HAVE_UTIL_H */<br>
+ #define HAVE_LIBUTIL_H 1<br>
+ /* #undef       HAVE_STROPTS_H */<br>
+<br>
+ #define HAVE_GL_GL_H 1<br>
+ /* #undef       HAVE_OPENGL_GL_H */<br>
+<br>
+ /* #undef       NEED_SUNOS_H */<br>
+<br>
+<br>
+ #define HAVE_UUID_H<br>
+ /* system calls/library functions */<br>
+<br>
+ #define AT_EXIT atexit<br>
+<br>
+ #define HAVE_TZSET 1<br>
+<br>
+ #define HAVE_OPENPTY 1<br>
+ /* #undef       HAVE_UNIX98_PTYS */<br>
+<br>
+ #define HAVE_SNPRINTF 1<br>
+ /* #undef       HAVE___SNPRINTF */<br>
+<br>
+ #define HAVE_MMAP 1<br>
+<br>
+ /* #undef       HAVE_DYLD */<br>
+<br>
+ #define HAVE_LANGINFO_CODESET 1<br>
+<br>
+ #define HAVE_ALLOCA 1<br>
+ /* #undef       HAVE_ALLOCA_H */<br>
+<br>
+ #define HAVE_UNSETENV 1<br>
+<br>
+ #define HAVE_NANOSLEEP 1<br>
+<br>
+ /* widths of primitive types */<br>
+<br>
+ #define SIZEOF_INT 4<br>
+ #define SIZEOF_LONG 4<br>
+ #define SIZEOF_LONG_LONG 8<br>
+ #define SIZEOF_VOID_P 4<br>
+<br>
+ /* structures */<br>
+<br>
+ #define HAVE_TM_GMTOFF 1<br>
+ #define HAVE_TIMEZONE 1<br>
+<br>
+ /* typedefs */<br>
+<br>
+ /* #undef       size_t */<br>
+ /* #undef       socklen_t */<br>
+<br>
+ #define squeakInt64 long long<br>
+<br>
+ /* architecture */<br>
+<br>
+ #define OS_TYPE &quot;unix&quot;<br>
+<br>
+ #define VM_HOST &quot;i386-freebsd8.2&quot;<br>
+ #define VM_HOST_CPU &quot;i386&quot;<br>
+ /* #undef       VM_HOST_VENDOR */<br>
+ #define VM_HOST_OS &quot;freebsd8.2&quot;<br>
+ #define VM_BUILD_STRING &quot;Unix built on &quot;__DATE__ &quot; &quot;__TIME__&quot; Compiler: &quot;__VERSION__<br>
+<br>
+ /* #undef       WORDS_BIGENDIAN */<br>
+ /* #undef       DOUBLE_WORD_ALIGNMENT */<br>
+<br>
+ /* damage containment */<br>
+<br>
+ /* #undef       DARWIN */<br>
+<br>
+ #ifdef NEED_SUNOS_H<br>
+ # include &quot;sunos.h&quot;<br>
+ #endif<br>
+<br>
+ /* other configured variables */<br>
+<br>
+ #define SQ_VERSION &quot;3.9a-7024&quot;<br>
+ #define VM_VERSION &quot;3.9-7&quot;<br>
+ #define VM_MODULE_PREFIX &quot;&quot;<br>
+ /* #undef VM_DLSYM_PREFIX */<br>
+ #define VM_X11DIR &quot;/usr/X11R6/lib&quot;<br>
+<br>
+ /* avoid dependencies on glibc2.3 */<br>
+<br>
+ /* #undef HAVE_FEATURES_H */<br>
+<br>
+ #if defined(HAVE_FEATURES_H)<br>
+ # include &quot;glibc.h&quot;<br>
+ #endif<br>
+<br>
+ #endif /* __sq_config_h */<br>
+<br>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               &#39;!<br>

<br>
Item was changed:<br>
  ----- Method: Linux32x86Config&gt;&gt;defaultExternalPlugins (in category &#39;plugins&#39;) -----<br>
  defaultExternalPlugins<br>
+ &quot; tty 2014.06.10  cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.ext&quot;<br>
+       ^ #(B3DAcceleratorPlugin<br>
+               BochsIA32Plugin<br>
+               SqueakFFIPrims<br>
+               SqueakSSL<br>
+               LocalePlugin<br>
+               UnixOSProcessPlugin<br>
+               UUIDPlugin)!<br>
-       ^ #(SqueakSSL   )!<br>
<br>
Item was changed:<br>
  ----- Method: Linux32x86Config&gt;&gt;defaultInternalPlugins (in category &#39;plugins&#39;) -----<br>
  defaultInternalPlugins<br>
+ &quot; tty 2014.06.10  cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/<a href="http://plugins.int" target="_blank">plugins.int</a>&quot;<br>
- &quot; cut-n-paste from Cog/build.linux32x86/newspeak.cog.v3/build&quot;<br>
        ^ #(<br>
                AsynchFilePlugin<br>
                BMPReadWriterPlugin<br>
                B2DPlugin<br>
                BitBltPlugin<br>
                DSAPrims<br>
                DropPlugin<br>
                FileCopyPlugin<br>
                FilePlugin<br>
                FloatArrayPlugin<br>
                FloatMathPlugin<br>
                ZipPlugin<br>
                JPEGReadWriter2Plugin<br>
                JPEGReaderPlugin<br>
                LargeIntegers<br>
                Matrix2x3Plugin<br>
                MiscPrimitivePlugin<br>
                IA32ABI<br>
                RePlugin<br>
                SecurityPlugin<br>
                SocketPlugin<br>
                SurfacePlugin<br>
                UUIDPlugin<br>
                UnixOSProcessPlugin<br>
                VMProfileLinuxSupportPlugin)!<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config&gt;&gt;extraVMSettings: (in category &#39;squeak compatibility&#39;) -----<br>
+ extraVMSettings: maker<br>
+       self generateConfigH.<br>
+<br>
+<br>
+       &quot;output a fake version.c file&quot;<br>
+<br>
+       self write:<br>
+ &#39;int vm_serial= 1;<br>
+ char *vm_date= &quot;&lt;HERE IS SUPPOSED TO BE THE DATE&gt;&quot;;<br>
+ char *cc_version= &quot;&lt;HERE IS SUPPOSED TO BE gcc VERSION&gt;&quot;;<br>
+ char *ux_version= &quot;&lt;FAKE FROZEN VERSION FOR DEBUGGING PURPOSES&gt;&quot;;<br>
+ &#39;<br>
+       toFile: &#39;version.c&#39;.<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config&gt;&gt;generate (in category &#39;squeak compatibility&#39;) -----<br>
+ generate<br>
+       ^ CMakeVMGeneratorForSqueak generate: self !<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config&gt;&gt;generateConfigH (in category &#39;squeak compatibility&#39;) -----<br>
+ generateConfigH<br>
+       &quot;will fix that later&quot;<br>
+       self write: self configH toFile: &#39;config.h&#39;!<br>
<br>
Item was changed:<br>
  ----- Method: Linux32x86NewspeakSistaSpurConfig&gt;&gt;excludeFromBuild (in category &#39;cmake&#39;) -----<br>
  excludeFromBuild<br>
        &quot;over-ride to exclude yourself from a build&quot;<br>
+       ^true &quot;tty 2014.06.10 not implemented on gnu side&quot;!<br>
-       ^false!<br>
<br>
Item was changed:<br>
  ----- Method: Linux32x86NewspeakSistaV3Config&gt;&gt;excludeFromBuild (in category &#39;cmake&#39;) -----<br>
  excludeFromBuild<br>
        &quot;over-ride to exclude yourself from a build&quot;<br>
+       ^true &quot;tty 2014.06.10 not implemented on gnu side&quot;!<br>
-       ^false!<br>
<br>
Item was changed:<br>
  Object subclass: #SqueakCMakeVMMakerAbstractBuilder<br>
+       instanceVariableNames: &#39;buildTypeAndDirectoryInfo config&#39;<br>
-       instanceVariableNames: &#39;buildTypeAndDirectoryInfo&#39;<br>
        classVariableNames: &#39;&#39;<br>
        poolDictionaries: &#39;&#39;<br>
        category: &#39;CMakeVMMakerSqueak-Builder&#39;!<br>
  SqueakCMakeVMMakerAbstractBuilder class<br>
        instanceVariableNames: &#39;default&#39;!<br>
<br>
+ !SqueakCMakeVMMakerAbstractBuilder commentStamp: &#39;tty 6/10/2014 12:46&#39; prior: 0!<br>
- !SqueakCMakeVMMakerAbstractBuilder commentStamp: &#39;tty 6/8/2014 17:21&#39; prior: 0!<br>
  I am an abstract base class for various CMakeVMMakerSqueak builders.<br>
<br>
  I am a singleton.<br>
+ I am a facade to the various Squeak[Platform][WordSize][VM][MemoryManager]Config classes<br>
+ I provide facilities to query my configurations.<br>
+ I use the Visitor pattern in collecting information about my configurations.<br>
- I am a facade to the various Squeak[Platform][WordSize][VM][MemoryManager]Config classes that provide all the functionality.<br>
- I also act as a repository of common information for the various configurations.<br>
- Think of me as lipstick on a pig.<br>
<br>
+ Usage:<br>
+ -------------------------Using CMakeVMMakerSqueak-------------------------<br>
+ The easiest way to use this is to utilize one of the concrete Builders in category CMakeVMMakerSqueak-Builder.<br>
<br>
+ With a builder, you can query it for information and then invoke it to generate configurations and or source.<br>
- Each one of my subclasses manages the CMakeVMMakerSqueak configurations --------&gt;in a specific category&lt;-----.<br>
- Win32Builder handles the Win32 Smalltalk Category, IOSBuilder handles the Smalltalk IOS category.<br>
- Yes, its a limitation of the design, but so it goes.<br>
<br>
+ Printing or inspecting the following lines will give you a flavor of a typical work-flow.<br>
<br>
+ -------------Buildable/non-buildable configurations---------<br>
<br>
+ SqueakCMakeVMMakerAbstractBuilder showExcludeFromBuild:false    &quot;buildable configurations&quot;<br>
+ SqueakCMakeVMMakerAbstractBuilder showExcludeFromBuild:true.    &quot;edit that configs &#39;excludeFromBuild&#39; method to change&quot;<br>
+ SqueakCMakeVMMakerAbstractBuilder availableBuildTypes<br>
<br>
+ -------------------------Querying Builders and CMake Configurations---------------<br>
<br>
+ SqueakLinux32X86Builder configurationsCategory<br>
+ SqueakLinux32X86Builder buildDirectory<br>
+ SqueakLinux32X86Builder availableBuilds<br>
+ SqueakLinux32X86Builder availableBuildTypesFor:(SqueakLinux32X86Builder availableBuilds at:1)<br>
+ SqueakLinux32X86Builder availableBuildTypesFor: #Linux32x86SqueakStackSpurConfig<br>
+ SqueakLinux32X86Builder availableBuildTypesFor: #Linux32x86SqueakStackV3Config<br>
+ SqueakLinux32X86Builder sourceDirectoryFor:(SqueakLinux32X86Builder availableBuilds at:1)<br>
<br>
+ -------------------------Generating CMake files and/or Source code-------------------------<br>
<br>
+ SqueakLinux32X86Builder<br>
+       configureABuildFor: #Linux32x86SqueakCogV3Config withBuildType: #debug<br>
+       generate   &quot;generate only CMake config files&quot;<br>
<br>
+ SqueakLinux32X86Builder<br>
+       configureABuildFor: #Linux32x86SqueakCogV3Config withBuildType: #debug<br>
+       generateWithSources  &quot;generate configurations and invoke VMMaker to generate source code&quot;<br>
<br>
+ -------------------------Compiling Instructions-------------------------<br>
+ open a terminal and go to the configurations build directory for that configuration. (SqueakLinux32X86Builder buildDirectory)<br>
+ change into the build type subdirectory (build, build.assert, build.debug...etc)<br>
+ source build.sh will run the build process<br>
+ executable is placed in  /products folder.  (SqueakLinux32X86Builder ouputDirectory)<br>
<br>
  !<br>
  SqueakCMakeVMMakerAbstractBuilder class<br>
        instanceVariableNames: &#39;default&#39;!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class&gt;&gt;availableBuildTypes (in category &#39;queries&#39;) -----<br>
+ availableBuildTypes<br>
+       default ifNil:[default:= self new].<br>
+       ^default availableBuildTypes.!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class&gt;&gt;generate (in category &#39;building&#39;) -----<br>
+ generate<br>
+       default ifNil:[default:= self new].<br>
+       ^default  generate!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class&gt;&gt;generateWithSource (in category &#39;building&#39;) -----<br>
+ generateWithSource<br>
+       default ifNil:[default:= self new].<br>
+       ^default  generateWithSource!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder&gt;&gt;availableBuildTypes (in category &#39;queries&#39;) -----<br>
+ availableBuildTypes<br>
+       ^self buildTypeAndDirectoryInfo keys asSortedCollection<br>
+ !<br>
<br>
Item was changed:<br>
  ----- Method: SqueakCMakeVMMakerAbstractBuilder&gt;&gt;configureABuildFor:withBuildType: (in category &#39;building&#39;) -----<br>
  configureABuildFor: configSymbol withBuildType: typeSymbol<br>
+       | i |<br>
-       |config i |<br>
        &quot;Do some sanity checks, then set the internal state of a Configuration for a particular build type. &quot;<br>
        [<br>
        ((Smalltalk at: configSymbol)  category) =  (self configurationsCategory)  &quot;verify the class is handled by this concrete builder&quot;<br>
                ifTrue:[<br>
                                config := (Smalltalk at: configSymbol) new.                              &quot;verify this config can handle this build type.&quot;<br>
                                config excludeFromBuild                                                         &quot;has a developer excluded this build manually?&quot;<br>
                                        ifTrue:[^self userErrorConfigMarkedAsExcludeFromBuild: configSymbol].<br>
                                i:=config availableBuilds indexOf:typeSymbol<br>
                                                ifAbsent:[^self userErrorInvalidBuildType: typeSymbol &quot;this config does not support this build type&quot;<br>
                                                                                forConfiguration: configSymbol<br>
                                                                                hasTypes: config availableBuilds].<br>
                                config configureForBuildType: typeSymbol.                             &quot;config configure yourself&quot;<br>
+                               ^self]<br>
-                               ^config]<br>
                ifFalse:[^self userErrorInvalidTarget: configSymbol]<br>
        ] ifError:[^&#39;error configureABuildFor: &#39;&#39;&#39;, configSymbol].<br>
<br>
        ^nil.<br>
<br>
<br>
        !<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder&gt;&gt;generate (in category &#39;building&#39;) -----<br>
+ generate<br>
+       (config isKindOf: CPlatformConfig)<br>
+               ifTrue:[config generate]<br>
+               !<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder&gt;&gt;generateWithSource (in category &#39;building&#39;) -----<br>
+ generateWithSource<br>
+       (config isKindOf: CPlatformConfig)<br>
+               ifTrue:[config generateWithSource]<br>
+               !<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>