SUMMARY as/as pt2

From: Sajjad Ahmed (
Date: Fri Jul 12 1996 - 06:53:19 CDT

Hello Sun-managers.
Please accept my apologies for not posting this earlier, a lot has been going on!

Many thanks to the following, if i've missed anyone, sorry!

 Rahul Roy <> (Markus Weber)
 Ken Teh <> (George Goffe) (Roderick W. Failing III)
 Casper Dik <casper@holland.Sun.COM>
 Rasana P. Atreya <>

As usual Casper Dik's suggestion was accurate. The SUN assembler from the CD was re-
installed. The following errors actually occurred because of a faulty makefile, rather than
operating system gafs, but i've included the answers, as they provided good pointers for
further analysis. Also i think other people have had problems with GNU make also...beware!
I WILL ( :) )be upgrading to 2.5.1....thanks you guys.

original postings.....

>Hello sun-managers,
>I get the following response trying to compile from gcc (old & new versions)
>*unknown*: Assembler messages:
>*unknown*:0: Warning: /usr/ccs/bin/as: I don't understand 'Q' flag.
>*unknown*:0: Warning: /usr/ccs/bin/as: I don't understand 's' flag.
>/usr/tmp/cca000hr.s:3: Error: Unknown pseudo-op: `.section'
>i'm running a ss20 under sol2.3 (no patches). The program being compiled has compiled on
similar setups. The machine has recently been recovered from a crash.
Casper Dik:
Someone has replaced /usr/ccs/bin/as (Sun's assembler) with GNU as.

Try and recover a working version of the assembler (GNU as fails at times)

> Hello sun-managers,
> This is a follow up to the last question concerning "as" problems. Many
> thanks to Casper Dik who suggested replacing the GNU as
> assembler with the original as (SUN sol2.3 cdrom).
> The following now occurs when compiling with gcc>gcc foo.c
> Undefined first referenced
> symbol in file
> init_matrix /usr/tmp/cca001Yh1.o
> main_menu /usr/tmp/cca001Yh1.o
> fill_chartab /usr/tmp/cca001Yh1.o
> ckalloc /usr/tmp/cca001Yh1.o
> parse_params /usr/tmp/cca001Yh1.o
> init_amenu /usr/tmp/cca001Yh1.o
> ld: fatal: Symbol referencing errors. No output written to a.out
Rasana P. Atreya

Error: ld: fatal: Symbol referencing errors. Env SHOULD be /usr/lib
 /usr/ccs/lib Many of the network functions and definitions that were
present in the BSD libc are now in and Thus
networking code will generally need to be linked with -lsocket -lnsl.
 Since requires (it is NEEDED), you must specify
them in this order. Note that you need for functions like

Incidently, you can look at selected parts of an object file using dump(1),

% dump -Lv /usr/lib/

This helps when you get undefined symbol messages so you realise you need to
link in some libraries from /usr/lib

Rahul Roy :
You are running Solaris 2.3 without any patches ??? The only suggestion
is to go to Solaris 2.5 which is much more stable ....IMHO, Solaris 2.3
was one of Sun's worst operating systems....the jumbo kernel patch for
2.3 is in the 78th revision or something close to that !!!!!!!

regards and good luck with Solaris 2.3 !!!!!

Markus Weber:
You are missing a lib or some .o files. They should be a local ones.

Ken Teh:
What you are seeing are linker errors, nothing to do with the assembler.
I actually tried to send you a response the first time around, but the
mail bounced!

The best way to diagnose this problem is to compile with the verbose
option on, ie, gcc --verbose

It will show you what it is doing. You need to look for the lines that
indicate which libraries it is linking against. Offhand, I don't
recognize any of the objects in your list.

I'm a little surprised by the behavior of gcc. They are all
configuration problems, not compiler problems. It's almost as if you
copied the compiler from somewhere else. Did you build it yourself?

Typically, if you build gcc from scratch, the build process analyzes the
system you are on and prepares the correct configuration files. There
is even a build phase which copies the system header files and corrects
them for non-GNU and non-ANSI compatibilities.

 George Goffe:
Have you "visited" the sunsite lately? Have you seen how many patches there
are for 2.3? Ugh!!! If you have the option you ought to go solaris 2.5. The
problem you have is that the code is using functions that it can't find. You
need to find out where they are and use them with the -l or is it -L operand
in the gcc command.

Roderick W. Failing III:
The file /usr/tmp/cca001Yh1.o has references to the undefined symbols. To fix
this you may need to:

A) re-compile /usr/tmp/cca001Yh1.o with the current compiler. This will
   change the symbol names. You may have symbol names from the old compiler.


B) Add libraries to your link (ld) line. gcc may not by default add the
   correct system libraries to support the undefined symbols.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:05 CDT