Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem with OS X /usr/bin/as

 
   Macintosh computer (Home) -> General Discussion RSS
Next:  Best video codec/format/size for G3/500 PowerBook..  
Author Message
r5

External


Since: Nov 12, 2003
Posts: 47



(Msg. 1) Posted: Wed Sep 29, 2004 8:26 pm
Post subject: Problem with OS X /usr/bin/as
Archived from groups: comp>sys>mac>programmer>misc, others (more info?)

Passing the --version argument to /usr/bin/as in OS X
causes it to hang:

% /usr/bin/as --version
Apple Computer, Inc. version cctools-498.obj~14, GNU assembler version 1.38
<hangs...>

Is there a fix for this? I came across this when trying to
configure glibc as part of building a cross-compiler:

% ../glibc-2.3.3/configure --prefix=/usr \
--build=powerpc-apple-darwin7.5.0 --host=mips-TiVo-linux \
--without-cvs --disable-sanity-checks \
--with-headers=/tivo/tmp/install/mips-TiVo-linux/include \
--enable-hacker-mode
checking build system type... powerpc-apple-darwin7.5.0
checking host system type... mips-TiVo-linux-gnu
<snip>
checking whether /usr/bin/as is GNU as... yes
checking whether ld is GNU ld... no
checking for /usr/bin/as... /usr/bin/as
checking version of /usr/bin/as...
<hangs...>

 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
Gregory Weston

External


Since: Jul 06, 2003
Posts: 1221



(Msg. 2) Posted: Wed Sep 29, 2004 9:32 pm
Post subject: Re: Problem with OS X /usr/bin/as [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<r5ahhj-BFACD6.18283729092004 RemoveThis @newssvr30-ext.news.prodigy.com>,
r5 <r5ahhj RemoveThis @r5ahhj.bounceme.net> wrote:

 > Passing the --version argument to /usr/bin/as in OS X
 > causes it to hang:
 >
 > % /usr/bin/as --version
 > Apple Computer, Inc. version cctools-498.obj~14, GNU assembler version 1.38
 > <hangs...>
 >
 > Is there a fix for this? I came across this when trying to
 > configure glibc as part of building a cross-compiler:
 >
 > % ../glibc-2.3.3/configure --prefix=/usr \
 > --build=powerpc-apple-darwin7.5.0 --host=mips-TiVo-linux \
 > --without-cvs --disable-sanity-checks \
 > --with-headers=/tivo/tmp/install/mips-TiVo-linux/include \
 > --enable-hacker-mode
 > checking build system type... powerpc-apple-darwin7.5.0
 > checking host system type... mips-TiVo-linux-gnu
 > <snip>
 > checking whether /usr/bin/as is GNU as... yes
 > checking whether ld is GNU ld... no
 > checking for /usr/bin/as... /usr/bin/as
 > checking version of /usr/bin/as...
 > <hangs...>

It appears that the version of "as" included with OS X (10.3.5 here)
_needs_ input and does not support the --version argument that's
supposed to cancel that need. I would suggest that the proper way to
execute the command for the behavior you want is:

/usr/bin/as -v < /dev/null

How does the configurator determine that it's GNU as?

G

--
Standard output is like your butt. Everyone has one. When using a bathroom,
they all default to going into a toilet. However, a person can redirect his
"standard output" to somewhere else, if he so chooses. - Jeremy Nixon<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
Paul Russell

External


Since: Dec 16, 2003
Posts: 312



(Msg. 3) Posted: Wed Sep 29, 2004 9:32 pm
Post subject: Re: Problem with OS X /usr/bin/as [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

r5 wrote:

 > Passing the --version argument to /usr/bin/as in OS X
 > causes it to hang:
 >
 > % /usr/bin/as --version
 > Apple Computer, Inc. version cctools-498.obj~14, GNU assembler version 1.38
 > <hangs...>
 >
 > Is there a fix for this? I came across this when trying to
 > configure glibc as part of building a cross-compiler:
 >
 > % ../glibc-2.3.3/configure --prefix=/usr \
 > --build=powerpc-apple-darwin7.5.0 --host=mips-TiVo-linux \
 > --without-cvs --disable-sanity-checks \
 > --with-headers=/tivo/tmp/install/mips-TiVo-linux/include \
 > --enable-hacker-mode
 > checking build system type... powerpc-apple-darwin7.5.0
 > checking host system type... mips-TiVo-linux-gnu
 > <snip>
 > checking whether /usr/bin/as is GNU as... yes
 > checking whether ld is GNU ld... no
 > checking for /usr/bin/as... /usr/bin/as
 > checking version of /usr/bin/as...
 > <hangs...>

Two things:

(a) you need to use -v rather than --version

(b) you need to supply an EOF

% /usr/bin/as -v < /dev/null
Apple Computer, Inc. version cctools-525.obj~1, GNU assembler version 1.38
%

Paul<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
r5

External


Since: Nov 12, 2003
Posts: 47



(Msg. 4) Posted: Wed Sep 29, 2004 9:32 pm
Post subject: Re: Problem with OS X /usr/bin/as [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston <gwestonREMOVE RemoveThis @CAPSattbi.com> wrote:
 > How does the configurator determine that it's GNU as?

Thanks for the rapid responses. Looking at line 3723 of
glibc-2.3.3/configure shows that it is passing --version
to as:

| ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`

Inserting '< /dev/null' does the trick. Thanks.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
Ian Gregory1

External


Since: May 04, 2004
Posts: 348



(Msg. 5) Posted: Wed Sep 29, 2004 9:32 pm
Post subject: Re: Problem with OS X /usr/bin/as [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

r5 wrote:
 > Passing the --version argument to /usr/bin/as in OS X
 > causes it to hang:
 >
 > % /usr/bin/as --version
 > Apple Computer, Inc. version cctools-498.obj~14, GNU assembler version 1.38
 ><hangs...>
 >
 > Is there a fix for this?

First of all, in my case it produces an error (using bash):

dune:~ iang$ /usr/bin/as --version
/usr/libexec/gcc/darwin/ppc/as: I don't understand '-' flag!
Apple Computer, Inc. version cctools-495.obj~4, GNU assembler version 1.38

But then "--version" is not a documented option so using "-v":

dune:~ iang$ /usr/bin/as -v
Apple Computer, Inc. version cctools-495.obj~4, GNU assembler version 1.38

Admittedly it appears to hang at that point, but in fact it is not
really hung. The man page points out that if no files are specified
it reads from stdin, so in fact it is just waiting for you to indicate
EOF by typing ctrl-D. It seems that "-v" means "print version before
starting assembly". Try this:

dune:~ iang$ /usr/bin/as -v < /dev/null
Apple Computer, Inc. version cctools-495.obj~4, GNU assembler version 1.38
dune:~ iang$

--
Ian Gregory
<a style='text-decoration: underline;' href="http://www.zenatode.org.uk/ian/" target="_blank">http://www.zenatode.org.uk/ian/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
Gregory Weston

External


Since: Jul 06, 2003
Posts: 1221



(Msg. 6) Posted: Wed Sep 29, 2004 9:32 pm
Post subject: Re: Problem with OS X /usr/bin/as [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<r5ahhj-9AA660.19424629092004.RemoveThis@newssvr30-ext.news.prodigy.com>,
r5 <r5ahhj.RemoveThis@r5ahhj.bounceme.net> wrote:

 > Gregory Weston <gwestonREMOVE.RemoveThis@CAPSattbi.com> wrote:
  > > How does the configurator determine that it's GNU as?
 >
 > Thanks for the rapid responses. Looking at line 3723 of
 > glibc-2.3.3/configure shows that it is passing --version
 > to as:
 >
 > | ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.*
 > | \([0-9]*\.[0-9.]*\).*$/\1/p'`
 >
 > Inserting '< /dev/null' does the trick. Thanks.

Glad it worked. The question I was asking would be a few lines up from
where you were. I wasn't looking for the version command, but how it
determined that it was looking at a GNU build before it even tried to
get the version. The first line in what you posted:

 > <snip>
 > checking whether /usr/bin/as is GNU as... yes
 > checking whether ld is GNU ld... no
 > checking for /usr/bin/as... /usr/bin/as
 > checking version of /usr/bin/as...
 > <hangs...>

--
Standard output is like your butt. Everyone has one. When using a bathroom,
they all default to going into a toilet. However, a person can redirect his
"standard output" to somewhere else, if he so chooses. - Jeremy Nixon<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Problem with OS X /usr/bin/as 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Facing problem on MAC OSX 10.3 - Hi all, I am using MAC OSX 10.3 OS. I installed my USB modem driver in 10.3. I made the driver in 10.1.x MAC OSX. This driver worked in 10.1.x,10.2.x series. i.e., The Driver,application made in 10.1.x is compatble with 10.1.x & 10.2.x series. When...

Problem with archiver (/usr/bin/ar) - I am having a strange problem with /usr/bin/ar on Mac-OSX 10.3.1. On a local filesystem on the Mac it works fine: [360spider:~/temp] epics% cc -c -o hello.o hello.c [360spider:~/temp] epics% ar -rc hello.a hello.o The archiver created hello.a with no..

PRoblem with archiving - Hallo, I do not find my failure. I have a cocoa-document-application. When I open a saved document I get this error: 2003-12-11 14:26:37.442 fsRune[964] *** NSUnarchiver: inconsistency between written and read data for object 0x3e3690 My MyDocument....

Problem with Toolbar - Hello, I want to have it easy with the toolbar: - (NSToolbarItem *)toolbar:(NSToolbar *)tb itemForItemIdentifier:(NSString *)tbit willBeInsertedIntoToolbar:(BOOL)flag { NSToolbarItem *tbi; NSImage *image; NSString *path; ...

Tech problem - Hi, I am using a G3 Mac system 9.2. I am experiencing what I call slow motion typing once in a while. As I type the letters appear slowly on the screen. I am not even a fast typer and yet it takes forever for the computer to keep up with me. What may be....
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]