<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'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"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></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>>configH (in category 'squeak compatibility') -----<br>
+ configH<br>
+ " right now its like that "<br>
+ ^ '<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 "unix"<br>
+<br>
+ #define VM_HOST "i386-freebsd8.2"<br>
+ #define VM_HOST_CPU "i386"<br>
+ /* #undef VM_HOST_VENDOR */<br>
+ #define VM_HOST_OS "freebsd8.2"<br>
+ #define VM_BUILD_STRING "Unix built on "__DATE__ " "__TIME__" Compiler: "__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 "sunos.h"<br>
+ #endif<br>
+<br>
+ /* other configured variables */<br>
+<br>
+ #define SQ_VERSION "3.9a-7024"<br>
+ #define VM_VERSION "3.9-7"<br>
+ #define VM_MODULE_PREFIX ""<br>
+ /* #undef VM_DLSYM_PREFIX */<br>
+ #define VM_X11DIR "/usr/X11R6/lib"<br>
+<br>
+ /* avoid dependencies on glibc2.3 */<br>
+<br>
+ /* #undef HAVE_FEATURES_H */<br>
+<br>
+ #if defined(HAVE_FEATURES_H)<br>
+ # include "glibc.h"<br>
+ #endif<br>
+<br>
+ #endif /* __sq_config_h */<br>
+<br>
+ '!<br>
<br>
Item was changed:<br>
----- Method: Linux32x86Config>>defaultExternalPlugins (in category 'plugins') -----<br>
defaultExternalPlugins<br>
+ " tty 2014.06.10 cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.ext"<br>
+ ^ #(B3DAcceleratorPlugin<br>
+ BochsIA32Plugin<br>
+ SqueakFFIPrims<br>
+ SqueakSSL<br>
+ LocalePlugin<br>
+ UnixOSProcessPlugin<br>
+ UUIDPlugin)!<br>
- ^ #(SqueakSSL )!<br>
<br>
Item was changed:<br>
----- Method: Linux32x86Config>>defaultInternalPlugins (in category 'plugins') -----<br>
defaultInternalPlugins<br>
+ " 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>"<br>
- " cut-n-paste from Cog/build.linux32x86/newspeak.cog.v3/build"<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>>extraVMSettings: (in category 'squeak compatibility') -----<br>
+ extraVMSettings: maker<br>
+ self generateConfigH.<br>
+<br>
+<br>
+ "output a fake version.c file"<br>
+<br>
+ self write:<br>
+ 'int vm_serial= 1;<br>
+ char *vm_date= "<HERE IS SUPPOSED TO BE THE DATE>";<br>
+ char *cc_version= "<HERE IS SUPPOSED TO BE gcc VERSION>";<br>
+ char *ux_version= "<FAKE FROZEN VERSION FOR DEBUGGING PURPOSES>";<br>
+ '<br>
+ toFile: 'version.c'.<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config>>generate (in category 'squeak compatibility') -----<br>
+ generate<br>
+ ^ CMakeVMGeneratorForSqueak generate: self !<br>
<br>
Item was added:<br>
+ ----- Method: Linux32x86Config>>generateConfigH (in category 'squeak compatibility') -----<br>
+ generateConfigH<br>
+ "will fix that later"<br>
+ self write: self configH toFile: 'config.h'!<br>
<br>
Item was changed:<br>
----- Method: Linux32x86NewspeakSistaSpurConfig>>excludeFromBuild (in category 'cmake') -----<br>
excludeFromBuild<br>
"over-ride to exclude yourself from a build"<br>
+ ^true "tty 2014.06.10 not implemented on gnu side"!<br>
- ^false!<br>
<br>
Item was changed:<br>
----- Method: Linux32x86NewspeakSistaV3Config>>excludeFromBuild (in category 'cmake') -----<br>
excludeFromBuild<br>
"over-ride to exclude yourself from a build"<br>
+ ^true "tty 2014.06.10 not implemented on gnu side"!<br>
- ^false!<br>
<br>
Item was changed:<br>
Object subclass: #SqueakCMakeVMMakerAbstractBuilder<br>
+ instanceVariableNames: 'buildTypeAndDirectoryInfo config'<br>
- instanceVariableNames: 'buildTypeAndDirectoryInfo'<br>
classVariableNames: ''<br>
poolDictionaries: ''<br>
category: 'CMakeVMMakerSqueak-Builder'!<br>
SqueakCMakeVMMakerAbstractBuilder class<br>
instanceVariableNames: 'default'!<br>
<br>
+ !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 6/10/2014 12:46' prior: 0!<br>
- !SqueakCMakeVMMakerAbstractBuilder commentStamp: 'tty 6/8/2014 17:21' 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 -------->in a specific category<-----.<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 "buildable configurations"<br>
+ SqueakCMakeVMMakerAbstractBuilder showExcludeFromBuild:true. "edit that configs 'excludeFromBuild' method to change"<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 "generate only CMake config files"<br>
<br>
+ SqueakLinux32X86Builder<br>
+ configureABuildFor: #Linux32x86SqueakCogV3Config withBuildType: #debug<br>
+ generateWithSources "generate configurations and invoke VMMaker to generate source code"<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: 'default'!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>availableBuildTypes (in category 'queries') -----<br>
+ availableBuildTypes<br>
+ default ifNil:[default:= self new].<br>
+ ^default availableBuildTypes.!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>generate (in category 'building') -----<br>
+ generate<br>
+ default ifNil:[default:= self new].<br>
+ ^default generate!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder class>>generateWithSource (in category 'building') -----<br>
+ generateWithSource<br>
+ default ifNil:[default:= self new].<br>
+ ^default generateWithSource!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>availableBuildTypes (in category 'queries') -----<br>
+ availableBuildTypes<br>
+ ^self buildTypeAndDirectoryInfo keys asSortedCollection<br>
+ !<br>
<br>
Item was changed:<br>
----- Method: SqueakCMakeVMMakerAbstractBuilder>>configureABuildFor:withBuildType: (in category 'building') -----<br>
configureABuildFor: configSymbol withBuildType: typeSymbol<br>
+ | i |<br>
- |config i |<br>
"Do some sanity checks, then set the internal state of a Configuration for a particular build type. "<br>
[<br>
((Smalltalk at: configSymbol) category) = (self configurationsCategory) "verify the class is handled by this concrete builder"<br>
ifTrue:[<br>
config := (Smalltalk at: configSymbol) new. "verify this config can handle this build type."<br>
config excludeFromBuild "has a developer excluded this build manually?"<br>
ifTrue:[^self userErrorConfigMarkedAsExcludeFromBuild: configSymbol].<br>
i:=config availableBuilds indexOf:typeSymbol<br>
ifAbsent:[^self userErrorInvalidBuildType: typeSymbol "this config does not support this build type"<br>
forConfiguration: configSymbol<br>
hasTypes: config availableBuilds].<br>
config configureForBuildType: typeSymbol. "config configure yourself"<br>
+ ^self]<br>
- ^config]<br>
ifFalse:[^self userErrorInvalidTarget: configSymbol]<br>
] ifError:[^'error configureABuildFor: ''', configSymbol].<br>
<br>
^nil.<br>
<br>
<br>
!<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>generate (in category 'building') -----<br>
+ generate<br>
+ (config isKindOf: CPlatformConfig)<br>
+ ifTrue:[config generate]<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: SqueakCMakeVMMakerAbstractBuilder>>generateWithSource (in category 'building') -----<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>