<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi Eliot.<br></div><div><br></div><div><br></div><div><br></div><div>I have a theory on the Pharo CMakeVMaker configH method. </div><div><br></div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>CogUnixConfig 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></div><div><br></div><div>....</div><div><br></div></blockquote> </div><div><br></div><div>based on my work getting the oscogvm/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c... to compile.</div><div>Working from the C source up to configuration then to Squeak....we start with the source code for sqUnixUUID.c</div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div><div>#include "config.h"<br><br>#if defined(HAVE_SYS_UUID_H)<br># include <sys/types.h><br># include <sys/uuid.h><br>#elif defined(HAVE_UUID_UUID_H)<br># include <uuid/uuid.h><br>#elif defined(HAVE_UUID_H)<br># include <uuid.h><br>#else<br># error cannot find a uuid.h to include<br>#endif<br></div></div></blockquote> <br><div>On my platform, I needed that HAVE_UUID_H define set. </div><div>To do that, I modified the acinclude.m4 file to check for the <uuid.h> (my changes in Bold--I emailed you this previously)</div><div><br></div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>AC_MSG_CHECKING([for UUID support uuid/uuid.h] and uuid_generate)<br>AC_TRY_COMPILE([#include <uuid/uuid.h>],[uuid_generate;],[<br> AC_MSG_RESULT(yes)<br> AC_CHECK_LIB(uuid, uuid_generate, LIB_UUID="-luuid")],[<br> AC_MSG_RESULT(no)<br><blockquote> <strong>AC_MSG_CHECKING([for UUID support uuid and uuidgen] )<br></strong></blockquote><blockquote><strong> AC_TRY_COMPILE([#include <uuid.h>],[uuidgen;],[<br></strong></blockquote><blockquote><strong> AC_MSG_RESULT(yes)<br></strong></blockquote><blockquote><strong> AC_CHECK_LIB(uuid, uuidgen, LIB_UUID="-luuid" )],[<br></strong></blockquote><blockquote><strong> AC_MSG_RESULT(no)</strong><br></blockquote><blockquote> <strong>AC_PLUGIN_DISABLE<br></strong></blockquote><blockquote><strong> ])</strong><br></blockquote>])<br><br>AC_SUBST(LIB_UUID)<br><br> </div></blockquote><br><br>For the source code to see it, the config.h file needs to be in place with that HAVE_UUID_H flag*, so in Squeak, I over-ride the configH method to include that define flag:<br></div><div><br></div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>configH<br>        ^ '<br><br><strong>#define HAVE_UUID_H 1 <br>#define HAVE_UUIDGEN 1</strong><br><br>#ifndef __sq_config_h</div></blockquote> <br></div><div>The CMakeVMMakerSqueak 'generate' message to a builder dumps that config.h to the build directory.</div><div>running the build.sh generated script invokes<br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>cmake .</div></blockquote> <br> command which looks in the specified source/config directory to configure the GNU-Makefile to look for that source code and pairs it with the generated config.h</div><div><br></div><div>The CMake generate GNU-Make system then uses those source/build artifacts to put the output in the oscogvm/products directory.</div><div><br></div><div><br></div><div>So, let me summarize.</div><div><br></div><div>1. We know that the plugins depend on config.h</div><div>2. Ideally, that config.h should be incrementally build by the Squeak plugins themselves or the CMakeVMMaker configurations. How? I don't know yet. Looking at it, the UUIDPlugin class would have to contribute its configuration information.</div><div> this is non-trivial.</div><div>3. So, in the meantime, CMakeVMMakerSqueak configurations are classes that encapsulate a <drum roll please> Configuration.</div><div>4. It seems reasonable to make this part of the configuration setup process.</div><div>5. I will/have documented in in the HelpBrowser HelpTopic for the system.</div><div><br></div><div>My apologies for the long-winded explanation. </div><div><br></div><div>HTH.</div><div><br></div><div>tty</div><div><br></div><div>*I just noticed the sys/uuid in the sqUnixUUID.c code, that implies a further nesting in the .m4 file Let me know if you want me to write it for you.</div></div></body></html>