Forwarded: [squeak-dev] Re: Problems building squeak VM (Fedora core 11)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Forwarded: [squeak-dev] Re: Problems building squeak VM (Fedora core 11)

David T. Lewis
 
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 <[hidden email]> -----

Date: Thu, 25 Jun 2009 00:16:06 -0300
From: Casimiro de Almeida Barreto <[hidden email]>
To: The general-purpose Squeak developers list <[hidden email]>
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 -----
Reply | Threaded
Open this post in threaded view
|

Re: Forwarded: [squeak-dev] Re: Problems building squeak VM (Fedora core 11)

Bert Freudenberg
 
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 <[hidden email]
> > -----
>
> Date: Thu, 25 Jun 2009 00:16:06 -0300
> From: Casimiro de Almeida Barreto <[hidden email]>
> To: The general-purpose Squeak developers list <[hidden email]
> >
> 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 -----



Reply | Threaded
Open this post in threaded view
|

renaming dprintf

Bert Freudenberg
 
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 <[hidden email]
>> > -----
>>
>> Date: Thu, 25 Jun 2009 00:16:06 -0300
>> From: Casimiro de Almeida Barreto <[hidden email]>
>> To: The general-purpose Squeak developers list <[hidden email]
>> >
>> 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 -----
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: renaming dprintf

Bert Freudenberg
 

On 13.08.2009, at 23:45, Ian Piumarta wrote:

> On Aug 13, 2009, at 2:16 PM, Bert Freudenberg wrote:
>
>> We could rename the Balloon3D DPRINTF to DPRINTF3D and the regular  
>> dprintf to DPRINTF.
>
> Yes, we could.  Nonetheless...
>
> I thought dprintf, being a GNU extension, would have absolutely no  
> right to pollute the global namespace unless specifically requested  
> by #define _GNU_SOURCE before inclusion of any header file?  Sounds  
> like a serious bug in glibc and/or the config of gcc on fedora 11 to  
> me.  Renaming every application function as/when gnu decides they  
> own the name is not a scalable solution.  I hope someone with a  
> fedora on which they can make a small test case is reporting this to  
> the relevant people.


Actually, it seems to be POSIX:

http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: renaming dprintf

Andrew Gaylard
In reply to this post by Bert Freudenberg

On Thu, Aug 13, 2009 at 11:16 PM, Bert Freudenberg<[hidden email]> 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).
Reply | Threaded
Open this post in threaded view
|

Spaces in file names (was: renaming dprintf)

Bert Freudenberg
 
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 -


Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

David Farber
 

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

Reply | Threaded
Open this post in threaded view
|

Re: renaming dprintf

Eliot Miranda-2
In reply to this post by Andrew Gaylard
 


On Fri, Aug 14, 2009 at 12:11 AM, Andrew Gaylard <[hidden email]> wrote:

On Thu, Aug 13, 2009 at 11:16 PM, Bert Freudenberg<[hidden email]> 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).
Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

Eliot Miranda-2
In reply to this post by David Farber
 


On Fri, Aug 14, 2009 at 10:38 AM, David Farber <[hidden email]> 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



crscripts.tar.gz (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

David T. Lewis
In reply to this post by David Farber
 
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

Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

Eliot Miranda-2
 


On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

Bert Freudenberg
 
On 16.08.2009, at 01:27, Eliot Miranda wrote:

>> On Sat, Aug 15, 2009 at 9:34 AM, David T. Lewis  
>> <[hidden email]> 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 -


Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names (was: renaming dprintf)

David T. Lewis
 
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  
> >><[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names

Andreas.Raab
 
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  
>>>> <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Spaces in file names

johnmci
 
Oh, well http://en.wikipedia.org/wiki/Foobar
must 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 <[hidden email]> 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]
--
===========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================