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
- 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.
Levente
frank
Levente
Rob
From: Levente Uzonyi leves@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu Sent: Tuesday, July 13, 2010 12:46 PM To: "The general-purpose Squeak developers list" squeak-dev@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@gmx.de Sent: Tuesday, July 13, 2010 11:29 AM To: "The general-purpose Squeak developers list" squeak-dev@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 >
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
- 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@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu Sent: Tuesday, July 13, 2010 12:46 PM To: "The general-purpose Squeak developers list" squeak-dev@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@gmx.de > Sent: Tuesday, July 13, 2010 11:29 AM > To: "The general-purpose Squeak developers list" > squeak-dev@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 >> > >
Linux version 2.6.33-5.19.BHsmp (kernel@bluehost.com) (gcc version 4.1.2 2008070 4 (Red Hat 4.1.2-48))
I have attached the error from make install...
/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm/sqUnixHeartbeat.c:161:3: error: #error "no high res clock defined"
Rob
-------------------------------------------------- From: "Frank Shearar" frank.shearar@angband.za.org Sent: Thursday, July 15, 2010 8:30 AM To: vm-dev@lists.squeakfoundation.org Subject: Cog on FreeBSD (Re: [Vm-dev] Re: [squeak-dev] Re: Cog on linux)
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
- 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@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu Sent: Tuesday, July 13, 2010 12:46 PM To: "The general-purpose Squeak developers list" squeak-dev@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@gmx.de >> Sent: Tuesday, July 13, 2010 11:29 AM >> To: "The general-purpose Squeak developers list" >> squeak-dev@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 >>> >> >> >
On Thu, Jul 15, 2010 at 5:57 AM, Rob Withers reefedjib@yahoo.com wrote:
Linux version 2.6.33-5.19.BHsmp (kernel@bluehost.com) (gcc version 4.1.2 2008070 4 (Red Hat 4.1.2-48))
I have attached the error from make install...
/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm/sqUnixHeartbeat.c:161:3: error: #error "no high res clock defined"
If you look at the code the error is pointing you at:
#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__) \ || defined(i486) || defined(__i486) || defined (__i486__) \ || defined(intel) || defined(x86) || defined(i86pc) ) __asm__ __volatile__ ("rdtsc" : "=A"(value)); #else # error "no high res clock defined" #endif
you'll see the system expects an x86. Are you on an x86-64? If so you need to specify something like -m32 in the CFLAGS and/or supply a flag with te same semantics to configure.
HTH Eliot
Rob
From: "Frank Shearar" frank.shearar@angband.za.org Sent: Thursday, July 15, 2010 8:30 AM To: vm-dev@lists.squeakfoundation.org Subject: Cog on FreeBSD (Re: [Vm-dev] Re: [squeak-dev] Re: Cog on linux)
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
- 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@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu > Sent: Tuesday, July 13, 2010 12:46 PM > To: "The general-purpose Squeak developers list" > squeak-dev@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@gmx.de >>> Sent: Tuesday, July 13, 2010 11:29 AM >>> To: "The general-purpose Squeak developers list" >>> squeak-dev@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 >>>> >>>> >>> >>> >> > >
Eliot,
I am on 8 of these puppies. I'll try -m32 in the CFLAGS and let you know....after my doc appt. Rob
processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz stepping : 7 cpu MHz : 2000.252 cache size : 4096 KB physical id : 1 siblings : 4 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow bogomips : 3999.45 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
From: Eliot Miranda Sent: Thursday, July 15, 2010 2:52 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
--------------------------------------------------------------------------------
On Thu, Jul 15, 2010 at 5:57 AM, Rob Withers reefedjib@yahoo.com wrote:
Linux version 2.6.33-5.19.BHsmp (kernel@bluehost.com) (gcc version 4.1.2 2008070 4 (Red Hat 4.1.2-48))
I have attached the error from make install...
/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm/sqUnixHeartbeat.c:161:3: error: #error "no high res clock defined"
If you look at the code the error is pointing you at:
#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__) \ || defined(i486) || defined(__i486) || defined (__i486__) \ || defined(intel) || defined(x86) || defined(i86pc) ) __asm__ __volatile__ ("rdtsc" : "=A"(value)); #else # error "no high res clock defined" #endif
you'll see the system expects an x86. Are you on an x86-64? If so you need to specify something like -m32 in the CFLAGS and/or supply a flag with te same semantics to configure.
HTH Eliot
Rob
-------------------------------------------------- From: "Frank Shearar" frank.shearar@angband.za.org Sent: Thursday, July 15, 2010 8:30 AM To: vm-dev@lists.squeakfoundation.org Subject: Cog on FreeBSD (Re: [Vm-dev] Re: [squeak-dev] Re: Cog on linux)
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@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu Sent: Tuesday, July 13, 2010 12:46 PM To: "The general-purpose Squeak developers list" squeak-dev@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@gmx.de Sent: Tuesday, July 13, 2010 11:29 AM To: "The general-purpose Squeak developers list" squeak-dev@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
On Thu, Jul 15, 2010 at 12:03 PM, Rob Withers reefedjib@yahoo.com wrote:
Eliot,
I am on 8 of these puppies. I'll try -m32 in the CFLAGS and let you know....after my doc appt. Rob
you'll also want -m32 in all link commands.
processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU E5335 @ 2.00GHz stepping : 7 cpu MHz : 2000.252 cache size : 4096 KB physical id : 1 siblings : 4 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow bogomips : 3999.45 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
*From:* Eliot Miranda eliot.miranda@gmail.com *Sent:* Thursday, July 15, 2010 2:52 PM *To:* Squeak Virtual Machine Development Discussionvm-dev@lists.squeakfoundation.org *Subject:* Re: [Vm-dev] Cog on linux
On Thu, Jul 15, 2010 at 5:57 AM, Rob Withers reefedjib@yahoo.com wrote:
Linux version 2.6.33-5.19.BHsmp (kernel@bluehost.com) (gcc version 4.1.2 2008070 4 (Red Hat 4.1.2-48))
I have attached the error from make install...
/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm/sqUnixHeartbeat.c:161:3: error: #error "no high res clock defined"
If you look at the code the error is pointing you at:
#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__) \ || defined(i486) || defined(__i486) || defined (__i486__) \ || defined(intel) || defined(x86) || defined(i86pc) ) __asm__ __volatile__ ("rdtsc" : "=A"(value)); #else # error "no high res clock defined" #endif
you'll see the system expects an x86. Are you on an x86-64? If so you need to specify something like -m32 in the CFLAGS and/or supply a flag with te same semantics to configure.
HTH Eliot
Rob
From: "Frank Shearar" frank.shearar@angband.za.org Sent: Thursday, July 15, 2010 8:30 AM To: vm-dev@lists.squeakfoundation.org Subject: Cog on FreeBSD (Re: [Vm-dev] Re: [squeak-dev] Re: Cog on linux)
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
- 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@elte.hu > To: The general-purpose Squeak developers list > squeak-dev@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@elte.hu >> Sent: Tuesday, July 13, 2010 12:46 PM >> To: "The general-purpose Squeak developers list" >> squeak-dev@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@gmx.de >>>> Sent: Tuesday, July 13, 2010 11:29 AM >>>> To: "The general-purpose Squeak developers list" >>>> squeak-dev@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 >>>>> >>>>> >>>> >>>> >>> >> >>
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
Hi Levente,
can you edit unixbuild/HowToBuild with this info? Err on the expansive side and feel free to include a good URL if you know of one.
TIA
On Thu, Jul 15, 2010 at 12:38 PM, Levente Uzonyi leves@elte.hu wrote:
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
On Thu, 15 Jul 2010, Eliot Miranda wrote:
(Pine can't quote your mail, because the first part is empty.)
" can you edit unixbuild/HowToBuild with this info? Err on the expansive side and feel free to include a good URL if you know of one."
This is what I came up with: http://leves.web.elte.hu/squeak/HowToBuild
Levente
Thanks, Levente. Its been integrated. I added CXX="g++ -m32" to the instructions too as there's potentially the Bochs plugin which is c++.
2010/7/21 Levente Uzonyi leves@elte.hu
On Thu, 15 Jul 2010, Eliot Miranda wrote:
(Pine can't quote your mail, because the first part is empty.)
" can you edit unixbuild/HowToBuild with this info? Err on the expansive side and feel free to include a good URL if you know of one."
This is what I came up with: http://leves.web.elte.hu/squeak/HowToBuild
Levente
(I am having trouble quoting Eliot's email as well. Plain text is best)
I finally figured out how to specify to configure to use -m32 on the CFLAGS entries. It is a part of the invocation of configure.
../../platforms/unix/config/configure CFLAGS="-m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
I seem to have gotten past the problem with sqUnixHeartbeat.c and now I have a new problem:
vm/vm.a(sqExternalSemaphores.o): In function `doSignalExternalSemaphores': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:198: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:213: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:184: undefined reference to `sqLowLevelMFence' vm/vm.a(sqExternalSemaphores.o): In function `signalSemaphoreWithIndex': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:130: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:131: undefined reference to `sqAtomicAddConst' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:147: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:148: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:152: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:153: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:135: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:136: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:140: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:141: undefined reference to `sqCompareAndSwap' vm/vm.a(sqTicker.o): In function `checkHighPriorityTickees': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:211: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:217: undefined reference to `sqCompareAndSwapRes' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:227: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:185: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `ioSynchronousCheckForEvents': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:128: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' collect2: ld returned 1 exit status make: *** [squeak] Error 1
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu Sent: Thursday, July 15, 2010 3:38 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
On Thu, Jul 15, 2010 at 2:54 PM, Rob Withers reefedjib@yahoo.com wrote:
(I am having trouble quoting Eliot's email as well. Plain text is best)
OK.
I finally figured out how to specify to configure to use -m32 on the CFLAGS entries. It is a part of the invocation of configure.
../../platforms/unix/config/configure CFLAGS="-m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
I seem to have gotten past the problem with sqUnixHeartbeat.c and now I have a new problem:
vm/vm.a(sqExternalSemaphores.o): In function `doSignalExternalSemaphores': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:198: undefined reference to `sqLowLevelMFence'
gcc -E -dM should print predefined macros. e.g.
McStalker.oscogvm$ gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1 McStalker.oscogvm$ gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1
You'll then see what names are given to define x86/IA32 on your system. You can then edit the following incantation to include your configuration (and let me know what it is).
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))
HTH Eliot
/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:213:
undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:184: undefined reference to `sqLowLevelMFence' vm/vm.a(sqExternalSemaphores.o): In function `signalSemaphoreWithIndex': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:130: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:131: undefined reference to `sqAtomicAddConst' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:147: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:148: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:152: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:153: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:135: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:136: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:140: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:141: undefined reference to `sqCompareAndSwap' vm/vm.a(sqTicker.o): In function `checkHighPriorityTickees': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:211: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:217: undefined reference to `sqCompareAndSwapRes' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:227: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:185: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `ioSynchronousCheckForEvents': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:128: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' collect2: ld returned 1 exit status make: *** [squeak] Error 1
From: "Levente Uzonyi" leves@elte.hu Sent: Thursday, July 15, 2010 3:38 PM To: "Squeak Virtual Machine Development Discussion" < vm-dev@lists.squeakfoundation.org>
Subject: Re: [Vm-dev] Cog on linux
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
I get the following:
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC_PATCHLEVEL__ 2 #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_RH_RELEASE__ 48 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __GNUC_RH_RELEASE__ 48 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 2 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1
It looks like I match the incantation, as both 32 and 64. Not sure what to change.
Rob
From: Eliot Miranda Sent: Thursday, July 15, 2010 6:27 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
--------------------------------------------------------------------------------
On Thu, Jul 15, 2010 at 2:54 PM, Rob Withers reefedjib@yahoo.com wrote:
(I am having trouble quoting Eliot's email as well. Plain text is best)
OK.
I finally figured out how to specify to configure to use -m32 on the CFLAGS entries. It is a part of the invocation of configure.
../../platforms/unix/config/configure CFLAGS="-m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
I seem to have gotten past the problem with sqUnixHeartbeat.c and now I have a new problem:
vm/vm.a(sqExternalSemaphores.o): In function `doSignalExternalSemaphores': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:198: undefined reference to `sqLowLevelMFence'
gcc -E -dM should print predefined macros. e.g.
McStalker.oscogvm$ gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1 McStalker.oscogvm$ gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1
You'll then see what names are given to define x86/IA32 on your system. You can then edit the following incantation to include your configuration (and let me know what it is).
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))
HTH Eliot
/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:213: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:184: undefined reference to `sqLowLevelMFence' vm/vm.a(sqExternalSemaphores.o): In function `signalSemaphoreWithIndex': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:130: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:131: undefined reference to `sqAtomicAddConst' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:147: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:148: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:152: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:153: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:135: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:136: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:140: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:141: undefined reference to `sqCompareAndSwap' vm/vm.a(sqTicker.o): In function `checkHighPriorityTickees': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:211: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:217: undefined reference to `sqCompareAndSwapRes' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:227: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:185: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `ioSynchronousCheckForEvents': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:128: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' collect2: ld returned 1 exit status make: *** [squeak] Error 1
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu
Sent: Thursday, July 15, 2010 3:38 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org
Subject: Re: [Vm-dev] Cog on linux
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
On Thu, Jul 15, 2010 at 4:49 PM, Rob Withers reefedjib@yahoo.com wrote:
I get the following:
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC_PATCHLEVEL__ 2 #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_RH_RELEASE__ 48 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __GNUC_RH_RELEASE__ 48 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 2 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1 It looks like I match the incantation, as both 32 and 64. Not sure what to change.
You need to figure out why, when sqMemoryFence.h is included by sqExternalSemaphores.c and sqTicker.c, the following macro in sqMemoryFence.h is not being defined or not being expanded:
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_)) # if defined(__MINGW32__) && !__SSE2__ /* Andreas is fond of the gcc 2.95 MINGW but it lacks sse2 support */ # define sqLowLevelMFence() asm volatile (".byte 0x0f;.byte 0xae;.byte 0xf0") # else # define sqLowLevelMFence() asm volatile ("mfence") # endif #else # if !defined(sqLowLevelMFence) extern void sqLowLevelMFence(void); # endif #endif
i.e. from the above # define sqLowLevelMFence() asm volatile ("mfence") should be live and hence in sqExternalSemaphores.c and sqTicker.c sqLowLevelMFence() should expand to asm volatile ("mfence").
gcc -E or gcc -P will run the preprocessor, so run the make capturing the compile commands for these two and retry the command deleting -c thefile and adding -E. Then look at the output and see what files are included (is sqMemoryFence.h being included?) and then if it is find out why, if as the -dM output above indicates, the macro isn't being defined given the above tests for both __GNUC__ and __i386__.
HTH Eliot
Rob
*From:* Eliot Miranda eliot.miranda@gmail.com *Sent:* Thursday, July 15, 2010 6:27 PM *To:* Squeak Virtual Machine Development Discussionvm-dev@lists.squeakfoundation.org *Subject:* Re: [Vm-dev] Cog on linux
On Thu, Jul 15, 2010 at 2:54 PM, Rob Withers reefedjib@yahoo.com wrote:
(I am having trouble quoting Eliot's email as well. Plain text is best)
OK.
I finally figured out how to specify to configure to use -m32 on the CFLAGS entries. It is a part of the invocation of configure.
../../platforms/unix/config/configure CFLAGS="-m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
I seem to have gotten past the problem with sqUnixHeartbeat.c and now I have a new problem:
vm/vm.a(sqExternalSemaphores.o): In function `doSignalExternalSemaphores': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:198: undefined reference to `sqLowLevelMFence'
gcc -E -dM should print predefined macros. e.g.
McStalker.oscogvm$ gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1 McStalker.oscogvm$ gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1
You'll then see what names are given to define x86/IA32 on your system. You can then edit the following incantation to include your configuration (and let me know what it is).
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))
HTH Eliot
/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:213:
undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:184: undefined reference to `sqLowLevelMFence' vm/vm.a(sqExternalSemaphores.o): In function `signalSemaphoreWithIndex': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:130: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:131: undefined reference to `sqAtomicAddConst' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:147: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:148: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:152: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:153: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:135: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:136: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:140: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:141: undefined reference to `sqCompareAndSwap' vm/vm.a(sqTicker.o): In function `checkHighPriorityTickees': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:211: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:217: undefined reference to `sqCompareAndSwapRes' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:227: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:185: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `ioSynchronousCheckForEvents': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:128: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' collect2: ld returned 1 exit status make: *** [squeak] Error 1
From: "Levente Uzonyi" leves@elte.hu Sent: Thursday, July 15, 2010 3:38 PM To: "Squeak Virtual Machine Development Discussion" < vm-dev@lists.squeakfoundation.org>
Subject: Re: [Vm-dev] Cog on linux
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
Eliot, note that I can provide you access to this box if you have the time to take a look.
I get the sqLowLevelMFence()...
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog/unixbuild/bld]# gcc -m32 -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/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/plugins/FilePlugin -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/plugins/B3DAcceleratorPlugin -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -E -dM /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c | egrep "86|GLIBC|Fence" #define M_SQRT1_2 0.70710678118654752440 #define VM_HOST_CPU "x86_64" #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC__ 2 #define __GLIBC_HAVE_LONG_LONG 1 #define __DBL_MAX__ 1.7976931348623157e+308 #define M_SQRT1_2l 0.7071067811865475244008443621048490L #define __i386 1 #define VM_HOST "x86_64-linux-gnu" #define i386 1 #define __i386__ 1 #define M_1_PIl 0.3183098861837906715377675267450287L #define __GLIBC_MINOR__ 5 #define M_1_PI 0.31830988618379067154 #define sqLowLevelMFence() asm volatile ("mfence")
and
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog/unixbuild/bld]# gcc -m32 -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/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/plugins/FilePlugin -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/plugins/B3DAcceleratorPlugin -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -E -dM /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c | egrep "86|GLIBC|Fence" #define M_SQRT1_2 0.70710678118654752440 #define VM_HOST_CPU "x86_64" #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC__ 2 #define __GLIBC_HAVE_LONG_LONG 1 #define __DBL_MAX__ 1.7976931348623157e+308 #define M_SQRT1_2l 0.7071067811865475244008443621048490L #define __i386 1 #define VM_HOST "x86_64-linux-gnu" #define i386 1 #define __i386__ 1 #define M_1_PIl 0.3183098861837906715377675267450287L #define __GLIBC_MINOR__ 5 #define M_1_PI 0.31830988618379067154 #define sqLowLevelMFence() asm volatile ("mfence")
Now I am getting a different error and this error like the last one is when building squeak itself, the last step.
gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -o squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a ADPCMCodecPlugin/ADPCMCodecPlugin.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a BMPReadWriterPlugin/BMPReadWriterPlugin.a CroquetPlugin/CroquetPlugin.a ZipPlugin/ZipPlugin.a DropPlugin/DropPlugin.a DSAPrims/DSAPrims.a FFTPlugin/FFTPlugin.a FileCopyPlugin/FileCopyPlugin.a FilePlugin/FilePlugin.a FloatArrayPlugin/FloatArrayPlugin.a FloatMathPlugin/FloatMathPlugin.a IA32ABI/IA32ABI.a JoystickTabletPlugin/JoystickTabletPlugin.a JPEGReaderPlugin/JPEGReaderPlugin.a JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.a Klatt/Klatt.a LargeIntegers/LargeIntegers.a Matrix2x3Plugin/Matrix2x3Plugin.a MIDIPlugin/MIDIPlugin.a MiscPrimitivePlugin/MiscPrimitivePlugin.a Mpeg3Plugin/Mpeg3Plugin.a RePlugin/RePlugin.a SecurityPlugin/SecurityPlugin.a SerialPlugin/SerialPlugin.a SocketPlugin/SocketPlugin.a SoundCodecPrims/SoundCodecPrims.a SoundGenerationPlugin/SoundGenerationPlugin.a SoundPlugin/SoundPlugin.a StarSqueakPlugin/StarSqueakPlugin.a SurfacePlugin/SurfacePlugin.a -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a -Wl,--rpath -Wl,/usr/local/lib /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(gcc3x-cointerp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(cogit.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqNamedPrims.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqVirtualMachine.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqHeapMap.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(aio.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(debug.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(osExports.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixMemory.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixCharConv.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixVMProfile.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(FloatMathPlugin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(acos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(acosh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(asin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(asinh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atan.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atan2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atanh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(cos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(cosh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(exp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(expm1.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(fmod.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(hypot.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_cos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_sin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(ldexp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log10.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log1p.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(modf.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(pow.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(rem_pio2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(scalbn.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sinh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sqrt.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(tan.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(tanh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(finite.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_rem_pio2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_tan.o)' is incompatible with i386 output
text data bss dec hex filename 952169 44560 297284 1294013 13bebd squeak
make: *** [squeak] Segmentation fault make: *** Deleting file `squeak'
Rob
From: Eliot Miranda Sent: Thursday, July 15, 2010 9:04 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
--------------------------------------------------------------------------------
On Thu, Jul 15, 2010 at 4:49 PM, Rob Withers reefedjib@yahoo.com wrote:
I get the following:
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC_PATCHLEVEL__ 2 #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_RH_RELEASE__ 48 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog]# gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __GNUC_RH_RELEASE__ 48 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 2 #define __GNUC_MINOR__ 1 #define __GNUC_GNU_INLINE__ 1
It looks like I match the incantation, as both 32 and 64. Not sure what to change.
You need to figure out why, when sqMemoryFence.h is included by sqExternalSemaphores.c and sqTicker.c, the following macro in sqMemoryFence.h is not being defined or not being expanded:
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_)) # if defined(__MINGW32__) && !__SSE2__ /* Andreas is fond of the gcc 2.95 MINGW but it lacks sse2 support */ # define sqLowLevelMFence() asm volatile (".byte 0x0f;.byte 0xae;.byte 0xf0") # else # define sqLowLevelMFence() asm volatile ("mfence") # endif #else # if !defined(sqLowLevelMFence) extern void sqLowLevelMFence(void); # endif #endif
i.e. from the above # define sqLowLevelMFence() asm volatile ("mfence") should be live and hence in sqExternalSemaphores.c and sqTicker.c sqLowLevelMFence() should expand to asm volatile ("mfence").
gcc -E or gcc -P will run the preprocessor, so run the make capturing the compile commands for these two and retry the command deleting -c thefile and adding -E. Then look at the output and see what files are included (is sqMemoryFence.h being included?) and then if it is find out why, if as the -dM output above indicates, the macro isn't being defined given the above tests for both __GNUC__ and __i386__.
HTH Eliot
Rob
From: Eliot Miranda Sent: Thursday, July 15, 2010 6:27 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
------------------------------------------------------------------------------
On Thu, Jul 15, 2010 at 2:54 PM, Rob Withers reefedjib@yahoo.com wrote:
(I am having trouble quoting Eliot's email as well. Plain text is best)
OK.
I finally figured out how to specify to configure to use -m32 on the CFLAGS entries. It is a part of the invocation of configure.
../../platforms/unix/config/configure CFLAGS="-m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
I seem to have gotten past the problem with sqUnixHeartbeat.c and now I have a new problem:
vm/vm.a(sqExternalSemaphores.o): In function `doSignalExternalSemaphores': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:198: undefined reference to `sqLowLevelMFence'
gcc -E -dM should print predefined macros. e.g.
McStalker.oscogvm$ gcc -m32 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __i386 1 #define i386 1 #define __i386__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1 McStalker.oscogvm$ gcc -m64 -E -dM platforms/Cross/vm/sqMemoryFence.h | egrep "86|GNUC" #define __GNUC__ 4 #define __DBL_MAX__ 1.7976931348623157e+308 #define __x86_64 1 #define __x86_64__ 1 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_MINOR__ 2 #define __GNUC_GNU_INLINE__ 1
You'll then see what names are given to define x86/IA32 on your system. You can then edit the following incantation to include your configuration (and let me know what it is).
#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))
HTH Eliot
/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:213: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:184: undefined reference to `sqLowLevelMFence' vm/vm.a(sqExternalSemaphores.o): In function `signalSemaphoreWithIndex': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:130: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:131: undefined reference to `sqAtomicAddConst' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:147: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:148: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:152: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:153: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:135: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:136: undefined reference to `sqCompareAndSwap' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:140: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c:141: undefined reference to `sqCompareAndSwap' vm/vm.a(sqTicker.o): In function `checkHighPriorityTickees': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:211: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:217: undefined reference to `sqCompareAndSwapRes' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:227: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:185: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `ioSynchronousCheckForEvents': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:128: undefined reference to `sqLowLevelMFence' vm/vm.a(sqTicker.o): In function `addHighPriorityTickee': /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c:193: undefined reference to `sqLowLevelMFence' collect2: ld returned 1 exit status make: *** [squeak] Error 1
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu
Sent: Thursday, July 15, 2010 3:38 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org
Subject: Re: [Vm-dev] Cog on linux
On Thu, 15 Jul 2010, Rob Withers wrote:
(Pine is unable to quote your mail...)
The question is: is your OS 32 or 64-bit? The CPU doesn't matter here. If your OS is 64-bit then you'll probably need the gcc-multilibs package (or equivalent for your platform) and as Eliot suggested the -m32 switch for compilation and linking. To run the resulting VM, you'll need the ia32-libs package (or equivalent for your platform), but you already have that if you can run the prebuilt SqueakVM.
Levente
Hi Rob,
Am 16.07.2010 um 11:20 schrieb Rob Withers:
Eliot, note that I can provide you access to this box if you have the time to take a look.
I get the sqLowLevelMFence()...
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog/unixbuild/bld]# gcc -m32 -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/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/plugins/FilePlugin -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/plugins/B3DAcceleratorPlugin -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -E -dM /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqExternalSemaphores.c | egrep "86|GLIBC|Fence" #define M_SQRT1_2 0.70710678118654752440 #define VM_HOST_CPU "x86_64" #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC__ 2 #define __GLIBC_HAVE_LONG_LONG 1 #define __DBL_MAX__ 1.7976931348623157e+308 #define M_SQRT1_2l 0.7071067811865475244008443621048490L #define __i386 1 #define VM_HOST "x86_64-linux-gnu" #define i386 1 #define __i386__ 1 #define M_1_PIl 0.3183098861837906715377675267450287L #define __GLIBC_MINOR__ 5 #define M_1_PI 0.31830988618379067154 #define sqLowLevelMFence() asm volatile ("mfence")
and
vawhigso@vawhigs.org [~/public_html/squeakelib/Cog/unixbuild/bld]# gcc -m32 -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/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/plugins/FilePlugin -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/plugins/B3DAcceleratorPlugin -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -E -dM /home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm/sqTicker.c | egrep "86|GLIBC|Fence" #define M_SQRT1_2 0.70710678118654752440 #define VM_HOST_CPU "x86_64" #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC__ 2 #define __GLIBC_HAVE_LONG_LONG 1 #define __DBL_MAX__ 1.7976931348623157e+308 #define M_SQRT1_2l 0.7071067811865475244008443621048490L #define __i386 1 #define VM_HOST "x86_64-linux-gnu" #define i386 1 #define __i386__ 1 #define M_1_PIl 0.3183098861837906715377675267450287L #define __GLIBC_MINOR__ 5 #define M_1_PI 0.31830988618379067154 #define sqLowLevelMFence() asm volatile ("mfence")
Now I am getting a different error and this error like the last one is when building squeak itself, the last step.
gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -o squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a ADPCMCodecPlugin/ADPCMCodecPlugin.a AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a BMPReadWriterPlugin/BMPReadWriterPlugin.a CroquetPlugin/CroquetPlugin.a ZipPlugin/ZipPlugin.a DropPlugin/DropPlugin.a DSAPrims/DSAPrims.a FFTPlugin/FFTPlugin.a FileCopyPlugin/FileCopyPlugin.a FilePlugin/FilePlugin.a FloatArrayPlugin/FloatArrayPlugin.a FloatMathPlugin/FloatMathPlugin.a IA32ABI/IA32ABI.a JoystickTabletPlugin/JoystickTabletPlugin.a JPEGReaderPlugin/JPEGReaderPlugin.a JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.a Klatt/Klatt.a LargeIntegers/LargeIntegers.a Matrix2x3Plugin/Matrix2x3Plugin.a MIDIPlugin/MIDIPlugin.a MiscPrimitivePlugin/MiscPrimitivePlugin.a Mpeg3Plugin/Mpeg3Plugin.a RePlugin/RePlugin.a SecurityPlugin/SecurityPlugin.a SerialPlugin/SerialPlugin.a SocketPlugin/SocketPlugin.a SoundCodecPrims/SoundCodecPrims.a SoundGenerationPlugin/SoundGenerationPlugin.a SoundPlugin/SoundPlugin.a StarSqueakPlugin/StarSqueakPlugin.a SurfacePlugin/SurfacePlugin.a -lutil -ldl -lpthread -lm -lnsl -lpthread vm/vm.a -Wl,--rpath -Wl,/usr/local/lib /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(gcc3x-cointerp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(cogit.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqNamedPrims.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqVirtualMachine.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqHeapMap.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(aio.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(debug.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(osExports.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixMemory.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixCharConv.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `vm/vm.a(sqUnixVMProfile.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(FloatMathPlugin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(acos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(acosh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(asin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(asinh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atan.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atan2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(atanh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(cos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(cosh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(exp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(expm1.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(fmod.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(hypot.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_cos.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_sin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(ldexp.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log10.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(log1p.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(modf.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(pow.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(rem_pio2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(scalbn.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sin.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sinh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(sqrt.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(tan.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(tanh.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(finite.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_rem_pio2.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `FloatMathPlugin/FloatMathPlugin.a(k_tan.o)' is incompatible with i386 output
For me this looks like you are still mixing 32 and 64 Bit. When I do my compilations I have a separate build folder (IIRC that is recommended in the one of the readme's) that I can clean easily. So maybe your problem is due to partly old compiled code (without -m32 flag).
Regards Andreas
That's possible. Unfortunately there is no 'clean' target for make. I'll remove the .o files for vm.a by hand and retry it.
Thanks, Rob
From: Andreas Wacknitz Sent: Friday, July 16, 2010 5:58 AM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
For me this looks like you are still mixing 32 and 64 Bit. When I do my compilations I have a separate build folder (IIRC that is recommended in the one of the readme's) that I can clean easily. So maybe your problem is due to partly old compiled code (without -m32 flag).
Regards Andreas
Am 16.07.2010 um 12:00 schrieb Rob Withers:
That's possible. Unfortunately there is no 'clean' target for make. I'll remove the .o files for vm.a by hand and retry it.
I don't have many experiences with the Cog branch but the "old" VM build system allows for a separate build folder and thus cleaning is very easily done by removing all files and subfolders. I haven't seen this for the Cog VM yet but I only compiled it once for my Mac and it went flawlessly.
Regards, Andreas
I deleted all the *.o and *.a files from the build tree.
I received LOTS of errors, of the 'undefined reference' variety.
Ultimately failed with " sqUnixX11.lo:(.data.rel+0x110): undefined reference to `shortImageName' collect2: ld returned 1 exit status ".
Rob
From: Andreas Wacknitz Sent: Friday, July 16, 2010 6:06 AM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
--------------------------------------------------------------------------------
Am 16.07.2010 um 12:00 schrieb Rob Withers:
That's possible. Unfortunately there is no 'clean' target for make. I'll remove the .o files for vm.a by hand and retry it.
I don't have many experiences with the Cog branch but the "old" VM build system allows for a separate build folder and thus cleaning is very easily done by removing all files and subfolders. I haven't seen this for the Cog VM yet but I only compiled it once for my Mac and it went flawlessly.
Regards, Andreas
Am 16.07.2010 um 12:34 schrieb Rob Withers:
I deleted all the *.o and *.a files from the build tree.
I received LOTS of errors, of the 'undefined reference' variety.
Ultimately failed with " sqUnixX11.lo:(.data.rel+0x110): undefined reference to `shortImageName' collect2: ld returned 1 exit status ".
Rob
I can't follow what you are doing because I don't have a Linux installation. From what I can see, the HowToBuild in the unixbuild folder asks you to go to the bld folder and issue a configure. After the initial svn co there are only two files in the bld folder: plugins.ext and plugins.int. So you can remove every file and folder under bld despite of these two files. Did you do that or where there some other remnants from a former build?
Andreas
On Fri, 16 Jul 2010, Rob Withers wrote:
(Pine still can't quote your mail...)
Now I remember why I used the nasty trick to define CC as "gcc -m32" when I compiled the 32-bit SqueakVM on 64-bit OS. The problem is that there are places where CC is used without the CFLAGS. For example FloatMathPlugin uses LIBM_CFLAGS, which doesn't include CFLAGS. I still wonder why it has to be compiled with -O, but that's another story. This trick solves it, so add CC="gcc -m32" to the arguments of configure and see if it works for you.
Levente
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 8:17 AM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
(Pine still can't quote your mail...)
(Is this better? Hopefully)
Now I remember why I used the nasty trick to define CC as "gcc -m32" when I compiled the 32-bit SqueakVM on 64-bit OS. The problem is that there are places where CC is used without the CFLAGS. For example FloatMathPlugin uses LIBM_CFLAGS, which doesn't include CFLAGS. I still wonder why it has to be compiled with -O, but that's another story. This trick solves it, so add CC="gcc -m32" to the arguments of configure and see if it works for you.
Where do you define CC? Is it in make.cfg?
Rob
Levente
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 8:17 AM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
(Pine still can't quote your mail...)
(Is this better? Hopefully)
Now I remember why I used the nasty trick to define CC as "gcc -m32" when I compiled the 32-bit SqueakVM on 64-bit OS. The problem is that there are places where CC is used without the CFLAGS. For example FloatMathPlugin uses LIBM_CFLAGS, which doesn't include CFLAGS. I still wonder why it has to be compiled with -O, but that's another story. This trick solves it, so add CC="gcc -m32" to the arguments of configure and see if it works for you.
Where do you define CC? Is it in make.cfg?
The same place where CFLAGS is defined: ../../platforms/unix/config/configure CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
Levente
Rob
Levente
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 3:57 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 8:17 AM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
(Pine still can't quote your mail...)
(Is this better? Hopefully)
Now I remember why I used the nasty trick to define CC as "gcc -m32" when I compiled the 32-bit SqueakVM on 64-bit OS. The problem is that there are places where CC is used without the CFLAGS. For example FloatMathPlugin uses LIBM_CFLAGS, which doesn't include CFLAGS. I still wonder why it has to be compiled with -O, but that's another story. This trick solves it, so add CC="gcc -m32" to the arguments of configure and see if it works for you.
Where do you define CC? Is it in make.cfg?
The same place where CFLAGS is defined: ../../platforms/unix/config/configure CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
Woohoo! I made progress. Thanks! Now it is crashing on sound:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
Levente
Rob
Levente
Am 16.07.2010 um 22:25 schrieb Rob Withers:
Woohoo! I made progress. Thanks! Now it is crashing on sound:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
This looks like a missing library (Iibasound). You should try to find something like libasound and/or libasound-dev for your distribution. And of course It must be 32 bits.
Andreas
CogVM is working just fine as far as OpenGL is not an issue. Although there is a B3DAcceleratorPlugin in .../cog/lib/squeak/3.9-7 it just cannot find direct rendering for NVIDIA FX9600 (plugin crashes) and it also complains about #boundingBox in:
BitBlt>>setDestForm: df | bb | bb := df boundingBox. destForm := df. clipX := bb left. clipY := bb top. clipWidth := bb width. clipHeight := bb height
I think you just need libasound
On Jul 16, 2010, at 1:25 PM, "Rob Withers" reefedjib@yahoo.com wrote:
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 3:57 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 8:17 AM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
(Pine still can't quote your mail...)
(Is this better? Hopefully)
Now I remember why I used the nasty trick to define CC as "gcc -m32" when I compiled the 32-bit SqueakVM on 64-bit OS. The problem is that there are places where CC is used without the CFLAGS. For example FloatMathPlugin uses LIBM_CFLAGS, which doesn't include CFLAGS. I still wonder why it has to be compiled with -O, but that's another story. This trick solves it, so add CC="gcc -m32" to the arguments of configure and see if it works for you.
Where do you define CC? Is it in make.cfg?
The same place where CFLAGS is defined: ../../platforms/unix/config/configure CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
Woohoo! I made progress. Thanks! Now it is crashing on sound:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
Levente
Rob
Levente
-------------------------------------------------- From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Thanks, Rob
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
Levente
Thanks, Rob
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 6:44 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes --target=i386-linux'
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Cheers, Rob
Levente
Thanks, Rob
-------------------------------------------------- From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 6:44 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes --target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 6:44 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes
--target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Try ./configure --help or check if you can pass a parameter to make. If none of those work, check if you can change it by setting an environment variable. I think it's better if you build the VM without sound first. And if you have spare time then try to build a plugin for sound playback.
Levente
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
On Fri, Jul 16, 2010 at 4:37 PM, Rob Withers reefedjib@yahoo.com wrote:
From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM
To: "Squeak Virtual Machine Development Discussion" < vm-dev@lists.squeakfoundation.org> Subject: Re: [Vm-dev] Cog on linux
From: "Levente Uzonyi" leves@elte.hu Sent: Friday, July 16, 2010 6:44 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes
--target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is
spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Try configuring Cog without libalsa. e.g.
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
and if you have problems with OSS sound you can disable that too
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
that will leave you with vm-sound-null which is fine for a server.
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
Eliot,
It is still giving me an ALSA error. Here is my call to configure and make:
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
make install prefix=/home1/vawhigso/public_html/squeakelib/Cog/Cog
I find it best to delete the entire unixbuild directory and untar it fresh from the tarball.
Thanks, Rob
Error:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
From: Eliot Miranda Sent: Saturday, July 17, 2010 2:00 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
On Fri, Jul 16, 2010 at 4:37 PM, Rob Withers reefedjib@yahoo.com wrote:
-------------------------------------------------- From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu
Sent: Friday, July 16, 2010 6:44 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
-------------------------------------------------- From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes --target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Try configuring Cog without libalsa. e.g.
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
and if you have problems with OSS sound you can disable that too
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
that will leave you with vm-sound-null which is fine for a server.
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
Hi Eliot,
I got this output from configure. There is no line "******** disabling vm-sound-ALSA"
Rob
checking for custom display support... no ******** disabling vm-display-custom checking linux/fb.h usability... yes checking linux/fb.h presence... yes checking for linux/fb.h... yes ******** disabling vm-display-Quartz checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... no 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... yes 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... yes checking for SunOS/Solaris audio... no ******** disabling vm-sound-Sun checking for MIDI support via ALSA... yes checking util.h usability... no checking util.h presence... no checking for util.h... no checking libutil.h usability... no checking libutil.h presence... no checking for libutil.h... no checking pty.h usability... yes checking pty.h presence... yes checking for pty.h... yes checking stropts.h usability... yes checking stropts.h presence... yes checking for stropts.h... yes 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... yes checking for uuid_generate in -luuid... yes checking for XOpenDisplay in -lX11... (cached) yes ******** disabling vm-sound-OSS ******** disabling vm-display-fbdev
-------------------------------------------------- From: "Rob Withers" reefedjib@yahoo.com Sent: Saturday, July 17, 2010 2:18 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
Eliot,
It is still giving me an ALSA error. Here is my call to configure and make:
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
make install prefix=/home1/vawhigso/public_html/squeakelib/Cog/Cog
I find it best to delete the entire unixbuild directory and untar it fresh from the tarball.
Thanks, Rob
Error:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
From: Eliot Miranda Sent: Saturday, July 17, 2010 2:00 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
On Fri, Jul 16, 2010 at 4:37 PM, Rob Withers reefedjib@yahoo.com wrote:
From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
From: "Levente Uzonyi" leves@elte.hu
Sent: Friday, July 16, 2010 6:44 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes --target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Try configuring Cog without libalsa. e.g.
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
and if you have problems with OSS sound you can disable that too
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
that will leave you with vm-sound-null which is fine for a server.
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
Rob,
my understanding is that if you configure without ALSA it should not attempt to compile sqUnixSoundALSA.c. So something must be screwed up. Try make reallyclean, then repeat the configure carefully. The configure should not produce a vm-sound-ALSA directory, and there should be no mention of vm-sound-ALSA in the generated Makefile. If it does you're either going to have to debug configure or manually edit the generated Makefile to remove mention of vm-sound-ALSA.
cheers Eliot
On Sat, Jul 17, 2010 at 11:18 AM, Rob Withers reefedjib@yahoo.com wrote:
Eliot,
It is still giving me an ALSA error. Here is my call to configure and make:
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
make install prefix=/home1/vawhigso/public_html/squeakelib/Cog/Cog
I find it best to delete the entire unixbuild directory and untar it fresh from the tarball.
Thanks, Rob
Error:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound /usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
From: Eliot Miranda Sent: Saturday, July 17, 2010 2:00 PM
To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
On Fri, Jul 16, 2010 at 4:37 PM, Rob Withers reefedjib@yahoo.com wrote:
From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM
To: "Squeak Virtual Machine Development Discussion" < vm-dev@lists.squeakfoundation.org> Subject: Re: [Vm-dev] Cog on linux
From: "Levente Uzonyi" leves@elte.hu
Sent: Friday, July 16, 2010 6:44 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes
--target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Try configuring Cog without libalsa. e.g.
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
and if you have problems with OSS sound you can disable that too
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
that will leave you with vm-sound-null which is fine for a server.
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
SUCCESS!!
configure did generate vm-sound-ALSA target and mkdir. I deleted the directory and the two entries for it in the root Makefile. Ran make install. It compiled like a champ and is now running as a daemon.
Thanks for all the help Eliot/everyone! Rob
From: Eliot Miranda Sent: Saturday, July 17, 2010 3:14 PM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] Cog on linux
--------------------------------------------------------------------------------
Rob,
my understanding is that if you configure without ALSA it should not attempt to compile sqUnixSoundALSA.c. So something must be screwed up. Try make reallyclean, then repeat the configure carefully. The configure should not produce a vm-sound-ALSA directory, and there should be no mention of vm-sound-ALSA in the generated Makefile. If it does you're either going to have to debug configure or manually edit the generated Makefile to remove mention of vm-sound-ALSA.
cheers Eliot
On Sat, Jul 17, 2010 at 11:18 AM, Rob Withers reefedjib@yahoo.com wrote:
Eliot,
It is still giving me an ALSA error. Here is my call to configure and make:
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak CC="gcc -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
make install prefix=/home1/vawhigso/public_html/squeakelib/Cog/Cog
I find it best to delete the entire unixbuild directory and untar it fresh from the tarball.
Thanks, Rob
Error:
/bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=compile gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c -o sqUnixSoundALSA.lo /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm -I/home1/vawhigso/public_html/squeakelib/Cog/platforms/Cross/vm -I/home1/vawhigso/public_html/squeakelib/Cog/src/vm -c /home1/vawhigso/public_html/squeakelib/Cog/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c -fPIC -DPIC -DPIC -o sqUnixSoundALSA.o mv -f sqUnixSoundALSA.o sqUnixSoundALSA.lo /bin/sh /home1/vawhigso/public_html/squeakelib/Cog/unixbuild/bld/libtool --mode=link gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -msse -DLSB_FIRST=1 -avoid-version -module -rpath /home1/vawhigso/public_html/squeakelib/Cog/Cog/lib/squeak/3.9-7 -o vm-sound-ALSA.la sqUnixSoundALSA.lo -lasound mkdir .libs rm -fr .libs/vm-sound-ALSA.la .libs/vm-sound-ALSA.* .libs/vm-sound-ALSA.* (cd . && ln -s sqUnixSoundALSA.lo sqUnixSoundALSA.o) gcc -m32 -shared sqUnixSoundALSA.lo -lasound -Wl,-soname -Wl,vm-sound-ALSA -o .libs/vm-sound-ALSA
/usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
/usr/bin/ld: cannot find -lasound collect2: ld returned 1 exit status make[1]: *** [vm-sound-ALSA.la] Error 1 make: *** [vm-sound-ALSA.la] Error 2
From: Eliot Miranda Sent: Saturday, July 17, 2010 2:00 PM
To: Squeak Virtual Machine Development Discussion
Subject: Re: [Vm-dev] Cog on linux
On Fri, Jul 16, 2010 at 4:37 PM, Rob Withers reefedjib@yahoo.com wrote:
-------------------------------------------------- From: "Rob Withers" reefedjib@yahoo.com Sent: Friday, July 16, 2010 7:08 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
-------------------------------------------------- From: "Levente Uzonyi" leves@elte.hu
Sent: Friday, July 16, 2010 6:44 PM
To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
On Fri, 16 Jul 2010, Rob Withers wrote:
-------------------------------------------------- From: "Casey Ransberger" casey.obrien.r@gmail.com Sent: Friday, July 16, 2010 5:10 PM To: "Squeak Virtual Machine Development Discussion" vm-dev@lists.squeakfoundation.org Subject: Re: [Vm-dev] Cog on linux
I think you just need libasound
Ok guys, I am working on it with my webhost. I am not sure how I can install an RPM on their box, so I submitted a ticket.
Actually I don't think that any sound plugin would work, because the 32-bit binaries will not be available. But you don't need sound at all on a server, do you?
You lost me on 32-bit binaries not being available. I found alsa-lib-1.0.13.tar.bz2 and I am preparing to build it.
My error said: /usr/bin/ld: skipping incompatible /usr/lib64/libasound.so when searching for -lasound /usr/bin/ld: skipping incompatible /usr/lib64/libasound.a when searching for -lasound
So it looks like I need a .so and a .a file. As rusty as I am on building for unix, are these static libs or shared libs? I do need to figure out how to cross compile to a 32bit system. I am researching this for the right target. I need i386-linux or something. I am attaching the config.guess file they use for this. Can anyone give me a helpful hand what I should specify doing ...
'./configure --enable-shared=no --enable-static=yes --target=i386-linux'
Damn! I can't figure out how to change the install path to other than /usr/include, etc. I can't write to those directories. I am stuck.
Regarding your observation that I don't need sound on a server, that is spot on. It may be too entangled for the time being.
Is it possible to unentangle sound?
Try configuring Cog without libalsa. e.g.
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
and if you have problems with OSS sound you can disable that too
../../platforms/unix/config/configure --without-vm-sound-ALSA --without-vm-sound-OSS --without-vm-display-fbdev --without-npsqueak -prefix=/home/qwaq/qwaqvm/ CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread
that will leave you with vm-sound-null which is fine for a server.
Thanks, Rob
Cheers, Rob
Levente
Thanks, Rob
On 2010/07/15 14:30, Frank Shearar wrote:
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
- 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?
Yes, maybe I'll learn to hack a bit first. If I manually edit gcc3x-cointerp.c and replace malloc.h with stdlib.h, compilation does indeed proceed much further. Then it fails with this:
/usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in /usr/include does. I'll investigate further!
frank
frank
Levente
frank
Levente
Rob
From: Levente Uzonyi leves@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu Sent: Tuesday, July 13, 2010 12:46 PM To: "The general-purpose Squeak developers list" squeak-dev@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@gmx.de >> Sent: Tuesday, July 13, 2010 11:29 AM >> To: "The general-purpose Squeak developers list" >> squeak-dev@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 >>> >> >> >
"Frank" == Frank Shearar frank.shearar@angband.za.org writes:
Frank> /usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: Frank> PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
Frank> FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in Frank> /usr/include does. I'll investigate further!
Ewww. Why do people presume everything's Linux like that?
I've seen some tun/tap code like that too. Yup, tun/tap have been ported everywhere (even works on my OSX box), but then people use Linux'isms on top of that, and I can't use it (yes, I'm looking at you, "socat").
2010/7/15 Randal L. Schwartz merlyn@stonehenge.com
"Frank" == Frank Shearar frank.shearar@angband.za.org writes:
Frank> /usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: Frank> PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
Frank> FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in Frank> /usr/include does. I'll investigate further!
Ewww. Why do people presume everything's Linux like that?
Because Smalltalkers are happy to be immune to this kind of detail behind their vm? Because documentations about standards are not that cheap for unpaid people? Because there is not enough manpower and such community project has to work by gradual error/correction cycles rather than planned development?
Nicolas
I've seen some tun/tap code like that too. Yup, tun/tap have been ported everywhere (even works on my OSX box), but then people use Linux'isms on top of that, and I can't use it (yes, I'm looking at you, "socat").
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
On 7/15/2010 11:09 AM, Nicolas Cellier wrote:
2010/7/15 Randal L. Schwartz <merlyn@stonehenge.com mailto:merlyn@stonehenge.com> >>>>> "Frank" == Frank Shearar <frank.shearar@angband.za.org mailto:frank.shearar@angband.za.org> writes:
Frank> /usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: Frank> PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function) Frank> FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in Frank> /usr/include does. I'll investigate further! Ewww. Why do people presume everything's Linux like that?
Because Smalltalkers are happy to be immune to this kind of detail behind their vm? Because documentations about standards are not that cheap for unpaid people? Because there is not enough manpower and such community project has to work by gradual error/correction cycles rather than planned development?
[x] None of the above.
Correct answer: Because all of the servers at Teleplace run on RHEL 5.3 and that's the only thing we've tested Cog on. You should expect more Linuxisms (and even RHELisms) as people try to compile run Cog on other Unixens. That's the expected state at this stage of the project.
Cheers, - Andreas
2010/7/15 Andreas Raab andreas.raab@gmx.de
On 7/15/2010 11:09 AM, Nicolas Cellier wrote:
2010/7/15 Randal L. Schwartz <merlyn@stonehenge.com mailto:merlyn@stonehenge.com>
>>>>> "Frank" == Frank Shearar <frank.shearar@angband.za.org
mailto:frank.shearar@angband.za.org> writes:
Frank> /usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: Frank> PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
Frank> FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in Frank> /usr/include does. I'll investigate further!
Ewww. Why do people presume everything's Linux like that?
Because Smalltalkers are happy to be immune to this kind of detail behind their vm? Because documentations about standards are not that cheap for unpaid people? Because there is not enough manpower and such community project has to work by gradual error/correction cycles rather than planned development?
[x] None of the above.
Correct answer: Because all of the servers at Teleplace run on RHEL 5.3 and that's the only thing we've tested Cog on. You should expect more Linuxisms (and even RHELisms) as people try to compile run Cog on other Unixens. That's the expected state at this stage of the project.
Cheers,
- Andreas
Hehe, I was not speculating on Teleplace policy ! 1) was a joke 2) was applicable for indivuduals rather than Teleplace and 3) I was more an invitation to enhance the code by ourselves now that it is in our hands
Nicolas
On 7/15/2010 12:50 PM, Nicolas Cellier wrote:
Hehe, I was not speculating on Teleplace policy !
I didn't think you were. But since people were effectively asking the question about "gee, why doesn't this compile out of the box on all the flavors that a regular Squeak VM compiles on" I thought it worthwhile to point out what the reality of the current situation is and that people should really expect these issues at this point. It's a normal part of the process.
Cheers, - Andreas
- was a joke
- was applicable for indivuduals rather than Teleplace
and 3) I was more an invitation to enhance the code by ourselves now that it is in our hands
Nicolas
"Andreas" == Andreas Raab andreas.raab@gmx.de writes:
Andreas> I didn't think you were. But since people were effectively Andreas> asking the question about "gee, why doesn't this compile out of Andreas> the box on all the flavors that a regular Squeak VM compiles Andreas> on" I thought it worthwhile to point out what the reality of Andreas> the current situation is and that people should really expect Andreas> these issues at this point. It's a normal part of the process.
I wasn't asking that directly. Just more lamenting the fact that a *lot* of software is written with the theory that "all the Unix world is Linux", even though Linux is a tiny minority of Unix-like installations out there.
Hi Frank,
On Thu, Jul 15, 2010 at 6:18 AM, Frank Shearar <frank.shearar@angband.za.org
wrote:
On 2010/07/15 14:30, Frank Shearar wrote:
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
- 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?
Yes, maybe I'll learn to hack a bit first. If I manually edit gcc3x-cointerp.c and replace malloc.h with stdlib.h, compilation does indeed proceed much further.
Then the code needs to read something like
StackInterpreter>>declareCVarsIn: aCCodeGenerator aCCodeGenerator addHeaderFile:'#if _MSC_VER# include <malloc.h> /* for alloca under MSVC */#else# include <stdlib.h>#endif' withCRs;
Anyone with info on what's the right header file for alloca under MSVC versions please speak up.
Then it fails with this:
/usr/home/frank/temp/platforms/unix/vm/sqUnixHeartbeat.c:383: error: 'PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
FreeBSD's pthread.h doesn't contain this #define. In fact, nothing in /usr/include does. I'll investigate further!
So the code needs to read something like
#if defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP) # define THE_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP #else # define THE_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #endif static pthread_mutex_t yield_sync = THE_MUTEX_INITIALIZER; static pthread_mutex_t yield_mutex = THE_MUTEX_INITIALIZER;
It is only by trying to compile on various systems that we discover how they vary. Its not a matter of using linuxisms or not. Its a matter of wanting debuggability and only having linux and Mac OS X available. Its all fixable. Don't take it personally :)
HTH Eliot
frank
frank
Levente
frank
Levente
Rob
From: Levente Uzonyi leves@elte.hu To: The general-purpose Squeak developers list squeak-dev@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@elte.hu > Sent: Tuesday, July 13, 2010 12:46 PM > To: "The general-purpose Squeak developers list" > squeak-dev@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@gmx.de >>> Sent: Tuesday, July 13, 2010 11:29 AM >>> To: "The general-purpose Squeak developers list" >>> squeak-dev@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 >>>> >>>> >>> >>> >> > >
vm-dev@lists.squeakfoundation.org