Hi All,

�� �� 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's going on here?

On Tue, Jun 10, 2014 at 3:15 PM, <commits@source.squeak.org> wrote:

Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.43.mcz

==================== Summary ====================

Name: CMakeVMMakerSqueak-tty.43
Author: tty
Time: 10 June 2014, 6:15:54.458 pm
UUID: af66e1e9-4379-4938-98bd-0d4b36fcda1c
Ancestors: CMakeVMMakerSqueak-tty.42

Added SqueakCMakeVMMakerAbstractBuilder query for available build types.

Started (finally!) the actual build configuration construction.

This auto-generated image is missing B2DPlugin, so I will investigate that and return to the builds

=============== Diff against CMakeVMMakerSqueak-tty.42 ===============

Item was added:
+ ----- Method: Linux32x86Config>>configH (in category 'squeak compatibility') -----
+ configH
+ �� �� �� " right now its like ��that "
+ �� �� �� ^ '
+ #ifndef __sq_config_h
+ #define __sq_config_h
+
+ /* explicit image width */
+
+ #define HAVE_INTERP_H 1
+
+ /* package options */
+
+ #define USE_X11 1
+ #define USE_X11_GLX 1
+ /* #undef �� �� �� USE_QUARTZ */
+ /* #undef �� �� �� USE_QUARTZ_CGL */
+ /* #undef �� �� �� USE_RFB */
+
+ /* libraries */
+
+ /* #undef �� �� �� HAVE_LIBX11 */
+ #define HAVE_LIBXEXT 1
+ #define HAVE_LIBDL 1
+ /* #undef �� �� �� HAVE_DYLD */
+ /* #undef �� �� �� HAVE_LIBFFI */
+ /* #undef �� �� �� HAVE_ICONV */
+
+ /* #undef �� �� �� USE_AUDIO_NONE */
+ /* #undef �� �� �� USE_AUDIO_SUN */
+ /* #undef �� �� �� USE_AUDIO_NAS */
+ /* #undef �� �� �� USE_AUDIO_OSS */
+ /* #undef �� �� �� USE_AUDIO_MACOSX */
+ /* #undef �� �� �� OSS_DEVICE */
+
+ /* header files */
+
+ #define HAVE_UNISTD_H 1
+ /* #undef �� �� �� NEED_GETHOSTNAME_P */
+
+ #define HAVE_DIRENT_H 1
+ /* #undef �� �� �� HAVE_SYS_NDIR_H */
+ /* #undef �� �� �� HAVE_SYS_DIR_H */
+ /* #undef �� �� �� HAVE_NDIR_H */
+ #define HAVE_DLFCN_H 1
+ /* #undef �� �� �� HAVE_ICONV_H */
+
+ #define HAVE_SYS_TIME_H 1
+ #define TIME_WITH_SYS_TIME 1
+
+ #define HAVE_SYS_FILIO_H 1
+
+ /* #undef �� �� �� HAVE_SYS_AUDIOIO_H */
+ /* #undef �� �� �� HAVE_SUN_AUDIOIO_H */
+
+ /* #undef �� �� �� HAVE_PTY_H */
+ /* #undef �� �� �� HAVE_UTIL_H */
+ #define HAVE_LIBUTIL_H 1
+ /* #undef �� �� �� HAVE_STROPTS_H */
+
+ #define HAVE_GL_GL_H 1
+ /* #undef �� �� �� HAVE_OPENGL_GL_H */
+
+ /* #undef �� �� �� NEED_SUNOS_H */
+
+
+ #define HAVE_UUID_H
+ /* system calls/library functions */
+
+ #define AT_EXIT atexit
+
+ #define HAVE_TZSET 1
+
+ #define HAVE_OPENPTY 1
+ /* #undef �� �� �� HAVE_UNIX98_PTYS */
+
+ #define HAVE_SNPRINTF 1
+ /* #undef �� �� �� HAVE___SNPRINTF */
+
+ #define HAVE_MMAP 1
+
+ /* #undef �� �� �� HAVE_DYLD */
+
+ #define HAVE_LANGINFO_CODESET 1
+
+ #define HAVE_ALLOCA 1
+ /* #undef �� �� �� HAVE_ALLOCA_H */
+
+ #define HAVE_UNSETENV 1
+
+ #define HAVE_NANOSLEEP 1
+
+ /* widths of primitive types */
+
+ #define SIZEOF_INT 4
+ #define SIZEOF_LONG 4
+ #define SIZEOF_LONG_LONG 8
+ #define SIZEOF_VOID_P 4
+
+ /* structures */
+
+ #define HAVE_TM_GMTOFF 1
+ #define HAVE_TIMEZONE 1
+
+ /* typedefs */
+
+ /* #undef �� �� �� size_t */
+ /* #undef �� �� �� socklen_t */
+
+ #define squeakInt64 long long
+
+ /* architecture */
+
+ #define OS_TYPE "unix"
+
+ #define VM_HOST "i386-freebsd8.2"
+ #define VM_HOST_CPU "i386"
+ /* #undef �� �� �� VM_HOST_VENDOR */
+ #define VM_HOST_OS "freebsd8.2"
+ #define VM_BUILD_STRING "Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__
+
+ /* #undef �� �� �� WORDS_BIGENDIAN */
+ /* #undef �� �� �� DOUBLE_WORD_ALIGNMENT */
+
+ /* damage containment */
+
+ /* #undef �� �� �� DARWIN */
+
+ #ifdef NEED_SUNOS_H
+ # include "sunos.h"
+ #endif
+
+ /* other configured variables */
+
+ #define SQ_VERSION "3.9a-7024"
+ #define VM_VERSION "3.9-7"
+ #define VM_MODULE_PREFIX ""
+ /* #undef VM_DLSYM_PREFIX */
+ #define VM_X11DIR "/usr/X11R6/lib"
+
+ /* avoid dependencies on glibc2.3 */
+
+ /* #undef HAVE_FEATURES_H */
+
+ #if defined(HAVE_FEATURES_H)
+ # include "glibc.h"
+ #endif
+
+ #endif /* __sq_config_h */
+
+ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� '!

Item was changed:
�� ----- Method: Linux32x86Config>>defaultExternalPlugins (in category 'plugins') -----
�� defaultExternalPlugins
+ " tty 2014.06.10 ��cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.ext"
+ �� �� �� ^ #(B3DAcceleratorPlugin
+ �� �� �� �� �� �� �� BochsIA32Plugin
+ �� �� �� �� �� �� �� SqueakFFIPrims
+ �� �� �� �� �� �� �� SqueakSSL
+ �� �� �� �� �� �� �� LocalePlugin
+ �� �� �� �� �� �� �� UnixOSProcessPlugin
+ �� �� �� �� �� �� �� UUIDPlugin)!
- �� �� �� ^ #(SqueakSSL �� )!

Item was changed:
�� ----- Method: Linux32x86Config>>defaultInternalPlugins (in category 'plugins') -----
�� defaultInternalPlugins
+ " tty 2014.06.10 ��cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int"
- " cut-n-paste from Cog/build.linux32x86/newspeak.cog.v3/build"
�� �� �� �� ^ #(
�� �� �� �� �� �� �� �� AsynchFilePlugin
�� �� �� �� �� �� �� �� BMPReadWriterPlugin
�� �� �� �� �� �� �� �� B2DPlugin
�� �� �� �� �� �� �� �� BitBltPlugin
�� �� �� �� �� �� �� �� DSAPrims
�� �� �� �� �� �� �� �� DropPlugin
�� �� �� �� �� �� �� �� FileCopyPlugin
�� �� �� �� �� �� �� �� FilePlugin
�� �� �� �� �� �� �� �� FloatArrayPlugin
�� �� �� �� �� �� �� �� FloatMathPlugin
�� �� �� �� �� �� �� �� ZipPlugin
�� �� �� �� �� �� �� �� JPEGReadWriter2Plugin
�� �� �� �� �� �� �� �� JPEGReaderPlugin
�� �� �� �� �� �� �� �� LargeIntegers
�� �� �� �� �� �� �� �� Matrix2x3Plugin
�� �� �� �� �� �� �� �� MiscPrimitivePlugin
�� �� �� �� �� �� �� �� IA32ABI
�� �� �� �� �� �� �� �� RePlugin
�� �� �� �� �� �� �� �� SecurityPlugin
�� �� �� �� �� �� �� �� SocketPlugin
�� �� �� �� �� �� �� �� SurfacePlugin
�� �� �� �� �� �� �� �� UUIDPlugin
�� �� �� �� �� �� �� �� UnixOSProcessPlugin
�� �� �� �� �� �� �� �� VMProfileLinuxSupportPlugin)!

Item was added:
+ ----- Method: Linux32x86Config>>extraVMSettings: (in category 'squeak compatibility') -----
+ extraVMSettings: maker
+ �� �� �� self generateConfigH.
+
+
+ �� �� �� "output a fake version.c file"
+
+ �� �� �� self write:
+ 'int vm_serial= 1;
+ char *vm_date= "<HERE IS SUPPOSED TO BE THE DATE>";
+ char *cc_version= "<HERE IS SUPPOSED TO BE gcc VERSION>";
+ char *ux_version= "<FAKE FROZEN VERSION FOR DEBUGGING PURPOSES>";
+ '
+ �� �� �� toFile: 'version.c'.
+ !

Item was added:
+ ----- Method: Linux32x86Config>>generate (in category 'squeak compatibility') -----
+ generate
+ �� �� �� ^ CMakeVMGeneratorForSqueak generate: self !

Item was added:
+ ----- Method: Linux32x86Config>>generateConfigH (in category 'squeak compatibility') -----
+ generateConfigH
+ �� �� �� "will fix that later"
+ �� �� �� self write: self configH toFile: 'config.h'!

Item was changed:
�� ----- Method: Linux32x86NewspeakSistaSpurConfig>>excludeFromBuild (in category 'cmake') -----
�� excludeFromBuild
�� �� �� �� "over-ride to exclude yourself from a build"
+ �� �� �� ^true "tty 2014.06.10 not implemented on gnu side"!
- �� �� �� ^false!

Item was changed:
�� ----- Method: Linux32x86NewspeakSistaV3Config>>excludeFromBuild (in category 'cmake') -----
�� excludeFromBuild
�� �� �� �� "over-ride to exclude yourself from a build"
+ �� �� �� ^true "tty 2014.06.10 not implemented on gnu side"!
- �� �� �� ^false!

Item was changed:
�� Object subclass: #SqueakCMakeVMMakerAbstractBuilder
+ �� �� �� instanceVariableNames: 'buildTypeAndDirectoryInfo config'
- �� �� �� instanceVariableNames: 'buildTypeAndDirectoryInfo'
�� �� �� �� classVariableNames: ''
�� �� �� �� poolDictionaries: ''
�� �� �� �� category: 'CMakeVMMakerSqueak-Builder'!
�� SqueakCMakeVMMakerAbstractBuilder class
�� �� �� �� instanceVariableNames: 'default'!

+ !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 6/10/2014 12:46' prior: 0!
- !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 6/8/2014 17:21' prior: 0!
�� I am an abstract base class for various CMakeVMMakerSqueak builders.

�� I am a singleton.
+ I am a facade to the various Squeak[Platform][WordSize][VM][MemoryManager]Config classes
+ I provide facilities to query my configurations.
+ I use the Visitor pattern in collecting information about my configurations.
- I am a facade to the various Squeak[Platform][WordSize][VM][MemoryManager]Config classes that provide all the functionality.
- I also act as a repository of common information for the various configurations.
- Think of me as lipstick on a pig.

+ Usage:
+ -------------------------Using CMakeVMMakerSqueak-------------------------
+ The easiest way to use this is to utilize one of the concrete Builders in category CMakeVMMakerSqueak-Builder.

+ With a builder, you can query it for information and then invoke it to generate configurations and or source.
- Each one of my subclasses manages the CMakeVMMakerSqueak configurations -------->in a specific category<-----.
- Win32Builder handles the Win32 Smalltalk Category, IOSBuilder handles the Smalltalk IOS category.
- Yes, its a limitation of the design, but so it goes.

+ Printing or inspecting the following lines will give you a flavor of a typical work-flow.

+ -------------Buildable/non-buildable configurations---------

+ SqueakCMakeVMMakerAbstractBuilder showExcludeFromBuild:false �� ��"buildable configurations"
+ SqueakCMakeVMMakerAbstractBuilder showExcludeFromBuild:true. �� ��"edit that configs 'excludeFromBuild' method to change"
+ SqueakCMakeVMMakerAbstractBuilder availableBuildTypes

+ -------------------------Querying Builders and CMake Configurations---------------

+ SqueakLinux32X86Builder configurationsCategory
+ SqueakLinux32X86Builder buildDirectory
+ SqueakLinux32X86Builder availableBuilds
+ SqueakLinux32X86Builder availableBuildTypesFor:(SqueakLinux32X86Builder availableBuilds at:1)
+ SqueakLinux32X86Builder availableBuildTypesFor: #Linux32x86SqueakStackSpurConfig
+ SqueakLinux32X86Builder availableBuildTypesFor: #Linux32x86SqueakStackV3Config
+ SqueakLinux32X86Builder sourceDirectoryFor:(SqueakLinux32X86Builder availableBuilds at:1)

+ -------------------------Generating CMake files and/or Source code-------------------------

+ SqueakLinux32X86Builder
+ �� �� �� configureABuildFor: #Linux32x86SqueakCogV3Config withBuildType: #debug
+ �� �� �� generate �� "generate only CMake config files"

+ SqueakLinux32X86Builder
+ �� �� �� configureABuildFor: #Linux32x86SqueakCogV3Config withBuildType: #debug
+ �� �� �� generateWithSources ��"generate configurations and invoke VMMaker to generate source code"

+ -------------------------Compiling Instructions-------------------------
+ open a terminal and go to the configurations build directory for that configuration. (SqueakLinux32X86Builder buildDirectory)
+ change into the build type subdirectory (build, build.assert, build.debug...etc)
+ source build.sh will run the build process
+ executable is placed in ��/products folder. ��(SqueakLinux32X86Builder ouputDirectory)

�� !
�� SqueakCMakeVMMakerAbstractBuilder class
�� �� �� �� instanceVariableNames: 'default'!

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>availableBuildTypes (in category 'queries') -----
+ availableBuildTypes
+ �� �� �� default ifNil:[default:= self new].
+ �� �� �� ^default availableBuildTypes.!

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>generate (in category 'building') -----
+ generate
+ �� �� �� default ifNil:[default:= self new].
+ �� �� �� ^default ��generate!

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>generateWithSource (in category 'building') -----
+ generateWithSource
+ �� �� �� default ifNil:[default:= self new].
+ �� �� �� ^default ��generateWithSource!

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>availableBuildTypes (in category 'queries') -----
+ availableBuildTypes
+ �� �� �� ^self buildTypeAndDirectoryInfo keys asSortedCollection
+ !

Item was changed:
�� ----- Method: SqueakCMakeVMMakerAbstractBuilder>>configureABuildFor:withBuildType: (in category 'building') -----
�� configureABuildFor: configSymbol withBuildType: typeSymbol
+ �� �� �� | i |
- �� �� �� |config i |
�� �� �� �� "Do some sanity checks, then set the internal state of a Configuration for a particular build type. "
�� �� �� �� [
�� �� �� �� ((Smalltalk at: configSymbol) ��category) = ��(self configurationsCategory) ��"verify the class is handled by this concrete builder"
�� �� �� �� �� �� �� �� ifTrue:[
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� config := (Smalltalk at: configSymbol) new. �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��"verify this config can handle this build type."
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� config excludeFromBuild �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� "has a developer excluded this build manually?"
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ifTrue:[^self userErrorConfigMarkedAsExcludeFromBuild: configSymbol].
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� i:=config availableBuilds indexOf:typeSymbol
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ifAbsent:[^self userErrorInvalidBuildType: typeSymbol "this config does not support this build type"
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� forConfiguration: configSymbol
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� hasTypes: config availableBuilds].
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� config configureForBuildType: typeSymbol. �� �� �� �� �� �� �� �� �� �� �� �� �� �� "config configure yourself"
+ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ^self]
- �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ^config]
�� �� �� �� �� �� �� �� ifFalse:[^self userErrorInvalidTarget: configSymbol]
�� �� �� �� ] ifError:[^'error configureABuildFor: ''', configSymbol].

�� �� �� �� ^nil.


�� �� �� �� !

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>generate (in category 'building') -----
+ generate
+ �� �� �� (config isKindOf: CPlatformConfig)
+ �� �� �� �� �� �� �� ifTrue:[config generate]
+ �� �� �� �� �� �� �� !

Item was added:
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>generateWithSource (in category 'building') -----
+ generateWithSource
+ �� �� �� (config isKindOf: CPlatformConfig)
+ �� �� �� �� �� �� �� ifTrue:[config generateWithSource]
+ �� �� �� �� �� �� �� !




--
best,
Eliot