gcc3 not working and other question
Hello all,
I have a ultra 2 with a fresh isntall of Solaris 10 (72 I think it is)
things seem to be going well except for one problem, I can't compile anything using GCC3.
I get this problem........
-
# ./configure
Welcome to the BitchX-1.1-final configuration
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
that is from BitchX
here is php 4.3.10
--
# ./configure
loading cache ./config.cache
checking host system type... sparc-sun-solaris2.10
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
-
I know I can just install the packages but I want to be able to compile stuff that either ain't in a package of is a diferent version of the availalble package.
the way I installed GCC3 is using pkg-get install gcc3
it took a while and it downloaded ALOT I then set the path.
I also tried removing it and then followed the instructions for gcc3 on www.sunfreeware.com (including the mkheaders thing)
second question...
is there any sun tools I can use WITHOUT monitor? like sun management console or something? I do not have a monitor on it and do not use X windows.
I have Webmin I am wondering about Sun tools
third and last
how can I get Top to display both cpu information? or is there another tool I Can use to make sure both cpu's are working?
thank you very much in advance
Luma
[1668 byte] By [
LumaM] at [2007-11-26 0:44:57]

# 1
Try the following test and make sure your gcc compiler is able
to compile / build a working program from a C source file:
% echo 'int main(int argc, char **argv) { printf("hello, world\n"); }' > hello.c
% gcc -o hello hello.c
% ./hello
hello, world
# 2
Hello,I tried as you said and got the following output...# gcc -o hello hello.cgcc: installation problem, cannot exec `as': No such file or directory#thank youLuc
LumaM at 2007-7-5 19:40:26 >

# 3
I guess this gcc was built to use Sun's assembler, /usr/ccs/bin/as
Make sure that you have the SunOS package "SUNWsprot"
installed, it includes /usr/ccs/bin/as.
You can find "SUNWsprot" on the Solaris 10 GA DVD, in
.../Solaris_10/Product/SUNWsprot/... Install it with
pkgadd -d /cdrom/cdrom0/s2/Solaris_10/Product SUNWsprot
I'm not sure if this gcc is searching for "as" using the above absolute
path, or if it is looking for any "as" binary in $PATH - so after
installing SUNWsprot you should make sure that you PATH includes
the /usr/ccs/bin directory.
# 4
AH that makes sence. do you know on which CD it is on? there are 4 cds.I Thank you VERY much and will reply with resultsLuc
LumaM at 2007-7-5 19:40:26 >

# 5
ok I found that package and installed it
I then went to the /usr/ccs/bin to make sure things where in there and they where.
I then tried this again and got the following output
# gcc -o hello hello.c
ld: fatal: file values-Xa.o: open failed: No such file or directory
ld: fatal: File processing errors. No output written to hello
collect2: ld returned 1 exit status
# ls
hello.clost+foundsparc
#
Thank you for the help.
Luc
LumaM at 2007-7-5 19:40:26 >

# 6
any ideas what this last error could be caused by and how I could fix it?thank youLuc
LumaM at 2007-7-5 19:40:26 >

# 7
> # gcc -o hello hello.c> ld: fatal: file values-Xa.o: open failed: No such> file or directoryAnother missing package: SUNWarcSUNWarc contains /usr/ccs/lib/values-Xa.o and/usr/lib/values-Xa.o
# 8
That has worked!
thank you Very much.
after I installed it I got another Error but from what I learned in this thread and help from a friend of mine amazing use of google we found the packages needed. then I ran into a problem with make but that was easily fixed by searching google again found the solution on this forum (mkheaders) I had ran mkheaders before but after installing packages I guess I had to rerun it. after that I was able to configure, make and make install a problem and it runs very nicely :)
thank you again
Luc
LumaM at 2007-7-5 19:40:26 >

# 9
gah I found another problem, this one has me stumped.
I tried to compile Apache from source. I did a ./configure with prefix,
It reported no errors.
I then ran gmake (tried make as well both report same error)
# gmake
===> src
gmake[1]: Entering directory `/home/luma/apache_1.3.33'
gmake[2]: Entering directory `/home/luma/apache_1.3.33/src'
===> src/regex
gmake[3]: Entering directory `/home/luma/apache_1.3.33/src/regex'
rm -f libregex.a
ar cr libregex.a regcomp.o regexec.o regerror.o regfree.o
gmake[3]: ar: Command not found
gmake[3]: *** [libregex.a] Error 127
gmake[3]: Leaving directory `/home/luma/apache_1.3.33/src/regex'
gmake[2]: *** [subdirs] Error 1
gmake[2]: Leaving directory `/home/luma/apache_1.3.33/src'
gmake[1]: *** [build-std] Error 2
gmake[1]: Leaving directory `/home/luma/apache_1.3.33'
gmake: *** [build] Error 2
--
I know its AR related (or so I think) but what I don't understand is that SUNWarc is installed. and I was able to compile a few other programs and make them.
I looked for the AR file and found it in one spot but could not move it to the proper location,
any suggestions?
thank you
Luc
LumaM at 2007-7-5 19:40:26 >

# 10
I figured it outseems I had fubared my /usr/bin/arit was dead would not execute.I deleted it, and reinstalled the SUNWbtool package and now it works like a charm :)Luc
LumaM at 2007-7-5 19:40:26 >

# 11
Glad to hear you're able to compile.For future reference, the best thing to do when installing Solarison a machine meant for development is to choose the"Developer" metacluster or higher.
# 12
I've been hi & lo for the solution to a similar problem I'm encountering in my efforts to compile/install a SIP module on SOL.10.
The GNU 3.4.3 coplier faithfully compiles the module via a "gmake all cmd". Howver, when it comes to the next step ... ie. "gmake install" ... the system blurts out the following message RIGHT @ the end of the process .....
>
cd utils/serunix; gmake all
gmake[1]: Entering directory `/zafar/ser-0.9.0/utils/serunix'
gcc -O2 serunix.o-lfl -ldl -lresolv -L/usr/local/lib -lfl -lxnet -lnsl -lrt -o serunix
Undefinedfirst referenced
symbolin file
yylex/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../libfl.so
ld: fatal: Symbol referencing errors. No output written to serunix
collect2: ld returned 1 exit status
gmake[1]: *** [serunix] Error 1
gmake[1]: Leaving directory `/zafar/ser-0.9.0/utils/serunix'
gmake: *** [utils/serunix/serunix] Error 2
end>
Now i'm pretty sure this is a trival and careless oversight on my part ... LD_LIBRARY=/usr/sfw/lib:/usr/local/lib:/usr/lib ... seems to be fine (I think..) ... my path VARS are pointing to the usual suspects ie. /usr/lib ... /usr/ccs/bin ... etc ... my ar works ... i checked the packages ... no fault there either ...
Appreciate if someone could point out my oversight?
Thank you.
zc
