FYI for folks building VMs on Linux, the following is from the squeak-dev list. See the list archives for background.
Dave
----- Forwarded message from Casimiro de Almeida Barreto casimiro.barreto@gmail.com -----
Date: Thu, 25 Jun 2009 00:16:06 -0300 From: Casimiro de Almeida Barreto casimiro.barreto@gmail.com To: The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org Subject: [squeak-dev] Re: Problems building squeak VM (Fedora core 11) Precedence: list
Problem is Fedora rel 11 compiler is botched. Made a copy of /usr/include/stdio.h in $ROOT/platforms/unix/vm/stdio.h Edited this file removing dprintf (starting line 399) Changed: #include <stdio.h> to: #include "stdio.h" whenever had problem.
in file debug.c included line #include <stdlib.h>
Dirty work. But fix things... :(
----- End forwarded message -----
Ian,
would be good to have this fixed in the next release, too. It gets reported more often:
http://bugs.squeak.org/view.php?id=7331
- Bert -
On 25.06.2009, at 13:19, David T. Lewis wrote:
FYI for folks building VMs on Linux, the following is from the squeak-dev list. See the list archives for background.
Dave
----- Forwarded message from Casimiro de Almeida Barreto <casimiro.barreto@gmail.com
Date: Thu, 25 Jun 2009 00:16:06 -0300 From: Casimiro de Almeida Barreto casimiro.barreto@gmail.com To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org
Subject: [squeak-dev] Re: Problems building squeak VM (Fedora core 11) Precedence: list
Problem is Fedora rel 11 compiler is botched. Made a copy of /usr/include/stdio.h in $ROOT/platforms/unix/vm/stdio.h Edited this file removing dprintf (starting line 399) Changed: #include <stdio.h> to: #include "stdio.h" whenever had problem.
in file debug.c included line #include <stdlib.h>
Dirty work. But fix things... :(
----- End forwarded message -----
We could rename the Balloon3D DPRINTF to DPRINTF3D and the regular dprintf to DPRINTF. This seems to get the job done:
svn update ... cd platforms grep -rl DPRINTF . \ | egrep '(B3D|X11)' \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/DPRINTF/DPRINTF3D/g grep -rl dprintf . \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/dprintf/DPRINTF/g svn diff | less
This changes all platforms, but should not be a problem right? Anyone opposed?
- Bert -
On 13.08.2009, at 21:35, Bert Freudenberg wrote:
Ian,
would be good to have this fixed in the next release, too. It gets reported more often:
http://bugs.squeak.org/view.php?id=7331
- Bert -
On 25.06.2009, at 13:19, David T. Lewis wrote:
FYI for folks building VMs on Linux, the following is from the squeak-dev list. See the list archives for background.
Dave
----- Forwarded message from Casimiro de Almeida Barreto <casimiro.barreto@gmail.com
Date: Thu, 25 Jun 2009 00:16:06 -0300 From: Casimiro de Almeida Barreto casimiro.barreto@gmail.com To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org
Subject: [squeak-dev] Re: Problems building squeak VM (Fedora core 11) Precedence: list
Problem is Fedora rel 11 compiler is botched. Made a copy of /usr/include/stdio.h in $ROOT/platforms/unix/vm/ stdio.h Edited this file removing dprintf (starting line 399) Changed: #include <stdio.h> to: #include "stdio.h" whenever had problem.
in file debug.c included line #include <stdlib.h>
Dirty work. But fix things... :(
----- End forwarded message -----
On Thu, Aug 13, 2009 at 11:16 PM, Bert Freudenbergbert@freudenbergs.de wrote:
We could rename the Balloon3D DPRINTF to DPRINTF3D and the regular dprintf to DPRINTF. This seems to get the job done:
svn update ... cd platforms grep -rl DPRINTF . \ | egrep '(B3D|X11)' \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/DPRINTF/DPRINTF3D/g grep -rl dprintf . \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/dprintf/DPRINTF/g svn diff | less
This changes all platforms, but should not be a problem right? Anyone opposed?
Looks good to me. It's a good idea to have macros in upper-case anyway. Thanks for sorting this out.
- Andrew
PS: is there any particular reason why we have filenames with spaces in them? It makes find/xargs painful to use (as in the 'tr' above).
On 14.08.2009, at 09:11, Andrew Gaylard wrote:
PS: is there any particular reason why we have filenames with spaces in them? It makes find/xargs painful to use (as in the 'tr' above).
Spaces in file names are natural to Mac users. They only occur in the "platforms/Mac OS" subtree. I usually only check out the "platforms/ Cross" and "platforms/unix" directories. Then you can easily use your regular unix tools.
- Bert -
On Aug 14, 2009, at 1:26 AM, Bert Freudenberg wrote:
Spaces in file names are natural to Mac users. They only occur in the "platforms/Mac OS" subtree. I usually only check out the "platforms/Cross" and "platforms/unix" directories. Then you can easily use your regular unix tools.
Spaces in file names are natural to Mac users (I'm a Mac user) but, in my opinion, they are best left to the "casual users" and the GUI side of the OS. If I'm working with documents in the regular GUI apps (Text Edit, Word, the Finder, etc) I will use spaces in file names.
But if I am on the "unix" side of the OS (using Terminal, using emacs, using unix tools, doing development, etc) I do not use spaces in file names.
My preference would be to remove spaces from the file names in the Mac OS subtree.
And, while we are on the subject of regular unix tools and preferences, I would *very* much like to change Squeak's line ending from lf to cr. grep, diff, less, and company are unusable with lf- delimited files.
David
On Fri, Aug 14, 2009 at 10:38 AM, David Farber dfarber@numenor.com wrote:
On Aug 14, 2009, at 1:26 AM, Bert Freudenberg wrote:
Spaces in file names are natural to Mac users. They only occur in the
"platforms/Mac OS" subtree. I usually only check out the "platforms/Cross" and "platforms/unix" directories. Then you can easily use your regular unix tools.
Spaces in file names are natural to Mac users (I'm a Mac user) but, in my opinion, they are best left to the "casual users" and the GUI side of the OS. If I'm working with documents in the regular GUI apps (Text Edit, Word, the Finder, etc) I will use spaces in file names.
But if I am on the "unix" side of the OS (using Terminal, using emacs, using unix tools, doing development, etc) I do not use spaces in file names.
My preference would be to remove spaces from the file names in the Mac OS subtree.
And, while we are on the subject of regular unix tools and preferences, I would *very* much like to change Squeak's line ending from lf to cr. grep, diff, less, and company are unusable with lf-delimited files.
Try the attached. They take away the pain. I wrote most of them. Use them for what you will. The cr prefixes should be self-explanatory. findassign looks for assigns in C files. finddefine looks for defines in C files.
Another thing to do is to change your IFS (see sh (1)) to be lf & tab instead of lf, tab & space.
David
On Fri, Aug 14, 2009 at 11:38:22AM -0600, David Farber wrote:
Spaces in file names are natural to Mac users (I'm a Mac user) but, in my opinion, they are best left to the "casual users" and the GUI side of the OS. If I'm working with documents in the regular GUI apps (Text Edit, Word, the Finder, etc) I will use spaces in file names.
But if I am on the "unix" side of the OS (using Terminal, using emacs, using unix tools, doing development, etc) I do not use spaces in file names.
My preference would be to remove spaces from the file names in the Mac OS subtree.
If you are working from a Terminal, try something like this to scan for all C source and header files that contain the string 'foobar':
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} ;
Dave
On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis lewis@mail.msen.com wrote:
On Fri, Aug 14, 2009 at 11:38:22AM -0600, David Farber wrote:
Spaces in file names are natural to Mac users (I'm a Mac user) but, in my opinion, they are best left to the "casual users" and the GUI side of the OS. If I'm working with documents in the regular GUI apps (Text Edit, Word, the Finder, etc) I will use spaces in file names.
But if I am on the "unix" side of the OS (using Terminal, using emacs, using unix tools, doing development, etc) I do not use spaces in file names.
My preference would be to remove spaces from the file names in the Mac OS subtree.
If you are working from a Terminal, try something like this to scan for all C source and header files that contain the string 'foobar':
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} ;
If there are spaces in the filename then you need to put quotes around the file name expansion, i.e.
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar "{}" ;
Dave
On 16.08.2009, at 01:27, Eliot Miranda wrote:
On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis lewis@mail.msen.com wrote:
My preference would be to remove spaces from the file names in the Mac OS subtree.
If you are working from a Terminal, try something like this to scan for all C source and header files that contain the string 'foobar':
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} ;
If there are spaces in the filename then you need to put quotes around the file name expansion, i.e.
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar "{}" ;
No you don't. This is not expanded by the shell.
- Bert -
On Sun, Aug 16, 2009 at 01:45:26AM +0200, Bert Freudenberg wrote:
On 16.08.2009, at 01:27, Eliot Miranda wrote:
On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis lewis@mail.msen.com wrote:
My preference would be to remove spaces from the file names in the Mac OS subtree.
If you are working from a Terminal, try something like this to scan for all C source and header files that contain the string 'foobar':
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} ;
If there are spaces in the filename then you need to put quotes around the file name expansion, i.e.
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar "{}" ;
No you don't. This is not expanded by the shell.
BTW, I was greatly surprised to find that the string 'foobar' exists only in the "*.[ch]" files of the Mac OS tree. I'm completely at a loss to explain this, but my sense of balance was restored by doing
find * -name '*.[ch]' -exec grep -li fuck {} ;
which finds hits in the unix, win32, and RiscOS directories, and nothing at all in the Mac OS tree.
;)
Dave
ROTFL! You just made my day. I've been falling out of my chair here.
Thank you so much for this insightful observation ;-))))
Cheers, - Andreas
David T. Lewis wrote:
On Sun, Aug 16, 2009 at 01:45:26AM +0200, Bert Freudenberg wrote:
On 16.08.2009, at 01:27, Eliot Miranda wrote:
On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis lewis@mail.msen.com wrote:
My preference would be to remove spaces from the file names in the Mac OS subtree.
If you are working from a Terminal, try something like this to scan for all C source and header files that contain the string 'foobar':
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar {} ;
If there are spaces in the filename then you need to put quotes around the file name expansion, i.e.
$ find 'Mac OS' -name '*.[ch]' -exec grep -l foobar "{}" ;
No you don't. This is not expanded by the shell.
BTW, I was greatly surprised to find that the string 'foobar' exists only in the "*.[ch]" files of the Mac OS tree. I'm completely at a loss to explain this, but my sense of balance was restored by doing
find * -name '*.[ch]' -exec grep -li fuck {} ;
which finds hits in the unix, win32, and RiscOS directories, and nothing at all in the Mac OS tree.
;)
Dave
Oh, well http://en.wikipedia.org/wiki/Foobarmust be from
char gSqueakUntrustedDirectoryName[PATH_MAX] = "/foobar/tooBar/forSqueak/bogus/";
char gSqueakTrustedDirectoryName[PATH_MAX] = "/foobar/tooBar/forSqueak/bogus/";
Oddly there is a bug where if the conditions are just right it actually creates the directories on the root volume, which I've never tracked down how that happens.
On Sat, Aug 15, 2009 at 8:17 PM, Andreas Raab andreas.raab@gmx.de wrote:
ROTFL! You just made my day. I've been falling out of my chair here.
Thank you so much for this insightful observation ;-))))
Cheers,
- Andreas]
On Fri, Aug 14, 2009 at 12:11 AM, Andrew Gaylard ag@computer.org wrote:
On Thu, Aug 13, 2009 at 11:16 PM, Bert Freudenbergbert@freudenbergs.de wrote:
We could rename the Balloon3D DPRINTF to DPRINTF3D and the regular
dprintf
to DPRINTF. This seems to get the job done:
svn update ... cd platforms grep -rl DPRINTF . \ | egrep '(B3D|X11)' \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/DPRINTF/DPRINTF3D/g grep -rl dprintf . \ | grep -v '/.svn/' \ | tr '\n' '\000' \ | xargs -0 sed -i '' s/dprintf/DPRINTF/g svn diff | less
This changes all platforms, but should not be a problem right? Anyone opposed?
Looks good to me. It's a good idea to have macros in upper-case anyway. Thanks for sorting this out.
- Andrew
PS: is there any particular reason why we have filenames with spaces in them? It makes find/xargs painful to use (as in the 'tr' above).
I think it is because on Mac OS Smalltalk getSystemAttribute: 1001 answers 'Mac OS' and fixing this would cause too much pain (I think).
vm-dev@lists.squeakfoundation.org