Compiling cog 2363 in gentoo (amd 64)
So I hit the UUID problem that crashes VM and had to compile virtual machine from scratch to get rid of it. I assumed that to be easy job, but it took a while. To help others I document the steps I had to take to build revision 2363 of Cog vm on Gentoo (amd 64bit). 1) fetch sources from svn (svn export http://squeakvm.org/svn/squeak/branches/Cog cog-vm) 2) 32bit chroot environment. Just could not make it compile without it (http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=2) 3) emerge xorg-x11 to 32bit environment. One could probably emerge something smaller but thid did the trick for plugin(s) requiring OpenGL. 3) configure as the unixbuild/HowToBuild guides. 4) add #define HAVE_UUID_H to configure.h under bld-directory. 5) change platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c #include <uuid.h> -> #include <uuid/uuid.h> 6) make as the unixbuild/HowToBuild guides It is likely that these changes could (and should) be made to the source files and configuration script so that no manual steps would be required. However I did not have time to do it. But when I finnish all the pending tasks postponed by this sideroute I try to see if I could propose a patch. -- Panu
Thanks Panu. It is really nice when people spend time to document and share their findings. I cc'ed the VM mailing list. I don't know why but something tell me that the UUID was finally fixes in latest VMMaker (not sure at all. And even less sure in Cog). Thanks! mariano On Sun, Mar 6, 2011 at 6:25 PM, Panu Suominen <panu.suominen@iki.fi> wrote:
So I hit the UUID problem that crashes VM and had to compile virtual machine from scratch to get rid of it. I assumed that to be easy job, but it took a while. To help others I document the steps I had to take to build revision 2363 of Cog vm on Gentoo (amd 64bit). 1) fetch sources from svn (svn export http://squeakvm.org/svn/squeak/branches/Cog cog-vm) 2) 32bit chroot environment. Just could not make it compile without it (http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=2) 3) emerge xorg-x11 to 32bit environment. One could probably emerge something smaller but thid did the trick for plugin(s) requiring OpenGL. 3) configure as the unixbuild/HowToBuild guides. 4) add #define HAVE_UUID_H to configure.h under bld-directory. 5) change platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c #include <uuid.h> -> #include <uuid/uuid.h> 6) make as the unixbuild/HowToBuild guides
It is likely that these changes could (and should) be made to the source files and configuration script so that no manual steps would be required. However I did not have time to do it. But when I finnish all the pending tasks postponed by this sideroute I try to see if I could propose a patch.
-- Panu
It turned out that I had to alter the configuration statements also. It seems that network access caused seg fault when -O2 was used (gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5). This is most likely a gcc problem. But finally I seem to have working copy of Cog VM. As an after thought it might be possible to 3d section in HowToBuild guide might have done the trick without the chroot environment. Problems just piled up and I decided to make sure that everything is 32bit and thus never actually got so far on the guide. -- Panu
participants (2)
-
Mariano Martinez Peck -
Panu Suominen