Cog on FreeBSD (Re: [Vm-dev] Re: [squeak-dev] Re: Cog on linux)

Frank Shearar frank.shearar at angband.za.org
Thu Jul 15 12:30:02 UTC 2010


On 2010/07/14 23:29, Levente Uzonyi wrote:
>
> On Wed, 14 Jul 2010, Frank Shearar wrote:
>
>> On 2010/07/13 23:04, Levente Uzonyi wrote:
>>> On Tue, 13 Jul 2010, Rob Withers wrote:
>>>
>>>> Thanks Levente. Unfortunately it did not work:
>>>>
>>>> ./lib/squeak/3.9-7/squeak: /lib/libc.so.6: version `GLIBC_2.11' not
>>>> found (required by ./lib/squeak/3.9-7/squeak)
>>>
>>> Seems like you have to build it yourself. Fortunately it's very easy,
>>> since Eliot commits the generated sources to the svn repo. So you can
>>> build a CogVM/StackVM without VMMaker. Here is how:
>>>
>>> "How to build the Cog Croquet VM on Unix
>>> -------------------------------
>>> 1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt
>>> source))
>>> 2. Check out the following sources from svn (if you haven't already - if
>>> you're
>>> reading this in unixbuild its likely you've already got the sources)
>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms
>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src
>>> svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild
>>> 3. Open a shell, cd into the unixbuild/bld directory and execute
>>> ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2
>>> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1
>>> -DCOGMTVM=0" LIBS=-lpthread
>>> make install prefix=WhereYouWantTheVmToGo
>>> 4. At the end of it you'll get a new VM in the path provided via
>>> -prefix"
>>
>> Are there any additional requirements like gcc version, for instance?
>>
>> I ask because I get errors on the above instructions, on FreeBSD 6.4,
>> running gcc 3.4.6. I can attach configure's output and whatnot, if
>> you're interested.
>
> If configure failed, then please attach the output and continue this
> thread on the vm-dev list.

I didn't expect the instructions to work, since FreeBSD isn't Linux. So 
having said that, I've attached the output from configure (which looks 
fine, to my untrained eye) and the output from make install (which 
generates errors).

That first error:

In file included from /usr/home/frank/temp/src/vm/gcc3x-cointerp.c:21:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced 
by <stdlib.h>"

is probably the culprit, I suppose?

frank

>
>
> Levente
>
>>
>> frank
>>
>>> Levente
>>>
>>>>
>>>> Rob
>>>>
>>>>
>>>>
>>>> ________________________________
>>>> From: Levente Uzonyi <leves at elte.hu>
>>>> To: The general-purpose Squeak developers list
>>>> <squeak-dev at lists.squeakfoundation.org>
>>>> Sent: Tue, July 13, 2010 3:21:43 PM
>>>> Subject: Re: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in
>>>> Squeak 4.1)
>>>>
>>>> On Tue, 13 Jul 2010, Rob Withers wrote:
>>>>
>>>>> --------------------------------------------------
>>>>> From: "Levente Uzonyi" <leves at elte.hu>
>>>>> Sent: Tuesday, July 13, 2010 12:46 PM
>>>>> To: "The general-purpose Squeak developers list"
>>>>> <squeak-dev at lists.squeakfoundation.org>
>>>>> Subject: Cog on linux (was: Re: [squeak-dev] Re: UI lockup in Squeak
>>>>> 4.1)
>>>>>
>>>>>> On Tue, 13 Jul 2010, Rob Withers wrote:
>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------
>>>>>>> From: "Andreas Raab" <andreas.raab at gmx.de>
>>>>>>> Sent: Tuesday, July 13, 2010 11:29 AM
>>>>>>> To: "The general-purpose Squeak developers list"
>>>>>>> <squeak-dev at lists.squeakfoundation.org>
>>>>>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1
>>>>>>>
>>>>>>>> On 7/13/2010 6:39 AM, Rob Withers wrote:
>>>>>>>>> The low-space watcher is running, at least before the problem
>>>>>>>>> starts. I
>>>>>>>>> do eventually run out of memory, but the uninterruptable state
>>>>>>>>> happens
>>>>>>>>> before this.
>>>>>>>>
>>>>>>>> In which case you want to do the following:
>>>>>>>> * Launch your app and wait until it's in the "growing state"
>>>>>>>> * Hit F2 and from the VM's preference menu choose "Debug" and then
>>>>>>>> "Print all processes"
>>>>>>>>
>>>>>>>> This will dump a list of all the call stacks of all processes. One
>>>>>>>> of them is the culprit consuming memory and you'll probably be
>>>>>>>> able to tell quickly from just looking at it (if not, you can
>>>>>>>> email the output here but it typically takes a domain expert to
>>>>>>>> understand what's going wrong).
>>>>>>>>
>>>>>>>
>>>>>>> Thanks for this pointer, Andreas.
>>>>>>>
>>>>>>> This time it was a Cog VM which spasmed, which I use for my client
>>>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to
>>>>>>> compile a linux Cog vm: would love if someone posted one that could
>>>>>>> be launched headless for my webhost).
>>>>>>
>>>>>> Cog works, but i think you're trying to use the -headless switch,
>>>>>> which (is deprecated) and tells the vm to use the X11 display, but
>>>>>> with no window. Servers usually don't have X11, so it won't work.
>>>>>> You better use -vm-display-null (and -vm-sound-null). Try squeak
>>>>>> --help for further useful options (like tuning Cog).
>>>>>>
>>>>>
>>>>> I am trying to use the -headless switch. Good to know it is
>>>>> deprecated. So you happen to have a Cog for linux binary (version 17
>>>>> - 20), which I could use?
>>>>
>>>> I have one, but I'm not sure it will work on your server. You can find
>>>> it here: http://leves.web.elte.hu/squeak/cog17.tar.gz . It's built on
>>>> ubuntu 10.04 and is optimized for core2.
>>>>
>>>>
>>>> Levente
>>>>
>>>>>
>>>>> Thanks,
>>>>> Rob
>>>>>
>>>>>>
>>>>>> Levente
>>>>>>
>>>>>>>
>>>>>>> It started running at 100% and I did your F2 -> Debug Options ->
>>>>>>> Print all processes. It started dumping a LOT to the Debug Console,
>>>>>>> then it froze, still at 100%, but no increase in memory now and it
>>>>>>> went (Not Responding) and greyed out the window.
>>>>>>>
>>>>>>> Luckily, I was able to see enough of the stack that was causing
>>>>>>> problems. It is infinitely looping in this method:
>>>>>>>
>>>>>>> LanguageEnvironment class>>#localeID: localeID
>>>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID:
>>>>>>> (LocaleID isoLanguage: 'en')]
>>>>>>>
>>>>>>> This has nothing to do with my code, except I must be calling
>>>>>>> something that enters this loop. It happens in both Cog (Windows)
>>>>>>> and Squeak4.1 (Linux <headless> and Windows).
>>>>>>>
>>>>>>> Not sure how to fix this.
>>>>>>>
>>>>>>> Rob
>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> - Andreas
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>
>>
>>
>
>

-------------- next part --------------
Script started on Thu Jul 15 14:21:52 2010
/usr/home/frank/temp/src
checking sanity of generated src directory... okay
checking build system type... i386-unknown-freebsd7.3
checking host system type... i386-unknown-freebsd7.3

Configuring Squeak 3.9-7 (3.9a-7024) for i386-freebsd7.3

checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for as... as
checking for GNU as... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for BSD-compatible nm... /usr/bin/nm -B
checking for ln... ln
checking "size of int"... "okay"
checking "size of double"... "okay"
checking for 64-bit integer type... long long
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for void *... yes
checking size of void *... 4
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f77 accepts -g... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd7.3 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd7.3 ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f77 option to produce PIC... -fPIC
checking if f77 PIC flag -fPIC works... yes
checking if f77 static flag -static works... yes
checking if f77 supports -c -o file.o... yes
checking whether the f77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd7.3 ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/filio.h usability... yes
checking sys/filio.h presence... yes
checking for sys/filio.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking features.h usability... no
checking features.h presence... no
checking for features.h... no
checking alloca.h usability... no
checking alloca.h presence... no
checking for alloca.h... no
checking whether time.h and sys/time.h may both be included... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for socklen_t in sys/socket.h... yes
checking for atexit or on_exit... atexit
checking for tzset... yes
checking for gmtoff in struct tm... yes
checking for timezone and daylight variables... yes
checking for gethostname in unistd.h... yes
checking for yp_bind in -lnsl... no
checking for socket in -lsocket... no
checking for sin in -lm... yes
checking for pthread_create in -lpthread... yes
checking for _dyld_present... no
checking for dlfcn.h... (cached) yes
checking for dlopen... yes
checking for snprintf... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for working alloca.h... no
checking for alloca... yes
checking for i386 optimisation flags... (none)
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether we can compile gcc3x-cointerp.c... yes
checking for prefix to use for loadable modules... (none)
checking for compiler flags to force 32-bit addresses... 
checking whether byte ordering is bigendian... no
checking whether unaligned access to doubles is ok... yes
checking iconv.h usability... no
checking iconv.h presence... no
checking for iconv.h... no
checking for _dyld_present... (cached) no
checking for iconv_open in -liconv... no
checking for libiconv_open in -liconv... no
checking for nl_langinfo and CODESET... yes
checking for nanosleep... yes
checking for custom display support... no
******** disabling vm-display-custom
checking linux/fb.h usability... no
checking linux/fb.h presence... no
checking for linux/fb.h... no
******** disabling vm-display-fbdev
******** disabling vm-display-Quartz
checking for X... libraries /usr/local/lib, headers /usr/local/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glIsEnabled in -lGL... no
checking for Advanced Linux Sound Architecture... no
******** disabling vm-sound-ALSA
checking for custom sound support... no
******** disabling vm-sound-custom
checking for Mac OS X CoreAudio... no
******** disabling vm-sound-MacOSX
checking for Network Audio System... no
******** disabling vm-sound-NAS
checking for Open Sound System... no
******** disabling vm-sound-OSS
checking for SunOS/Solaris audio... no
******** disabling vm-sound-Sun
checking for MIDI support via ALSA... no
******** disabling MIDIPlugin
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking libutil.h usability... yes
checking libutil.h presence... yes
checking for libutil.h... yes
checking pty.h usability... no
checking pty.h presence... no
checking for pty.h... no
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking for library containing openpty... -lutil
******** disabling PyBridge
checking for FFI support... requires libffi
checking ffi.h usability... no
checking ffi.h presence... no
checking for ffi.h... no
******** disabling SqueakFFIPrims
checking for unsetenv... yes
checking for UUID support... no
******** disabling UUIDPlugin
checking for XOpenDisplay in -lX11... (cached) yes
******** disabling vm-sound-OSS
******** disabling vm-display-fbdev
configure: creating ./config.status
config.status: creating mkconfig
config.status: creating make.cfg
config.status: creating make.int
config.status: creating make.ext
config.status: creating make.prg
config.status: creating inisqueak
config.status: creating squeak.sh
config.status: creating bin.squeak.sh
config.status: creating Makefile
config.status: creating config.h
config.status: executing default commands
creating vm/Makefile
creating vm-display-X11/Makefile
creating vm-display-null/Makefile
creating vm-sound-null/Makefile
creating ADPCMCodecPlugin/Makefile
creating AsynchFilePlugin/Makefile
creating B2DPlugin/Makefile
creating BitBltPlugin/Makefile
creating BMPReadWriterPlugin/Makefile
creating CroquetPlugin/Makefile
creating ZipPlugin/Makefile
creating DropPlugin/Makefile
creating DSAPrims/Makefile
creating FFTPlugin/Makefile
creating FileCopyPlugin/Makefile
creating FilePlugin/Makefile
creating FloatArrayPlugin/Makefile
creating FloatMathPlugin/Makefile
creating IA32ABI/Makefile
creating JoystickTabletPlugin/Makefile
creating JPEGReaderPlugin/Makefile
creating JPEGReadWriter2Plugin/Makefile
creating Klatt/Makefile
creating LargeIntegers/Makefile
creating Matrix2x3Plugin/Makefile
creating MiscPrimitivePlugin/Makefile
creating Mpeg3Plugin/Makefile
creating RePlugin/Makefile
creating SecurityPlugin/Makefile
creating SerialPlugin/Makefile
creating SocketPlugin/Makefile
creating SoundCodecPrims/Makefile
creating SoundGenerationPlugin/Makefile
creating SoundPlugin/Makefile
creating StarSqueakPlugin/Makefile
creating SurfacePlugin/Makefile
creating B3DAcceleratorPlugin/Makefile
creating LocalePlugin/Makefile
creating UnixOSProcessPlugin/Makefile

Script done on Thu Jul 15 14:22:13 2010
-------------- next part --------------
Script started on Thu Jul 15 14:24:28 2010
"Makefile", line 270: warning: duplicate script for target "cogit.o" ignored
gcc -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1  -DHAVE_CONFIG_H  -DSQUEAK_BUILTIN_PLUGIN  -I/usr/home/frank/temp/unixbuild/bld -I/usr/home/frank/temp/unixbuild/bld -I/usr/home/frank/temp/platforms/unix/vm -I/usr/home/frank/temp/platforms/Cross/vm -I/usr/home/frank/temp/src/vm -I/usr/home/frank/temp/platforms/Cross/vm -I/usr/home/frank/temp/platforms/unix/vm -I/usr/home/frank/temp/src/vm   -I/usr/home/frank/temp/platforms/Cross/plugins/FilePlugin  -I/usr/home/frank/temp/platforms/unix/plugins/B3DAcceleratorPlugin  -I/usr/home/frank/temp/unixbuild/bld -I/usr/home/frank/temp/unixbuild/bld -I/usr/home/frank/temp/platforms/unix/vm -I/usr/home/frank/temp/platforms/Cross/vm -I/usr/home/frank/temp/src/vm -I/usr/local/include   -c -o gcc3x-cointerp.o /usr/home/frank/temp/src/vm/gcc3x-cointerp.c
In file included from /usr/home/frank/temp/src/vm/gcc3x-cointerp.c:21:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1340: warning: initialization from incompatible pointer type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1439: warning: initialization from incompatible pointer type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1457: warning: initialization from incompatible pointer type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1490: warning: initialization from incompatible pointer type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c: In function 'interpret':
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1869: warning: ignoring asm-specifier for non-static local variable 'currentBytecode'
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1871: warning: ignoring asm-specifier for non-static local variable 'localIP'
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:1873: warning: ignoring asm-specifier for non-static local variable 'localSP'
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c: In function 'callbackEnter':
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:10545: warning: assignment discards qualifiers from pointer target type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:10546: warning: assignment discards qualifiers from pointer target type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c: In function 'highBit':
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:17392: warning: left shift count >= width of type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:17393: warning: right shift count >= width of type
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c: In function 'primitiveClockLogAddresses':
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:24289: warning: passing argument 1 of 'positive32BitIntegerFor' makes integer from pointer without a cast
/usr/home/frank/temp/src/vm/gcc3x-cointerp.c:24290: warning: passing argument 1 of 'positive32BitIntegerFor' makes integer from pointer without a cast
*** Error code 1

Stop in /usr/home/frank/temp/unixbuild/bld/vm.
*** Error code 1

Stop in /usr/home/frank/temp/unixbuild/bld.

Script done on Thu Jul 15 14:24:29 2010


More information about the Vm-dev mailing list