GCC compiler check!
Hi Every one,
can someone tell me how i can check whether there is a valid C compiler ! thanks |
Code:
shell# $(which gcc) --version Sasha |
thanks Sacha,
i 've run the cmd that u posted but i've got a command not found response ! Additional information i am facing the problem on Solaris ! |
I have requested that this thread be moved to the /Solaris forum, so that it gets the attention it deserves.
Sasha |
A common case with Solaris is that there is a valid C compiler installed (or even more) but none is available on the PATH.
Usual locations to look for are: Code:
/opt/*/bin/cc |
thanks, i found the files at the Locations u suggested but when i am trying to run a C compiled script i get the"configure: error: no acceptable C compiler found in $PATH", Any Help ! thanks
|
Did you update your PATH before running "configure" ?
|
hi , I am not able to find the "path= " in the configure file !any Idea? thans
|
PATH is not something you'll find in the configure script but an environment variable you set and export in your shell before running configure.
|
hi , i updated the path but still i am not getting any success! Note: the added path were : /usr/sfw/bin/gcc and /usr/local/bin/gcc (there were only available) thanks!
|
So did you add the gcc path or the directory GCC is in?
PATH=$PATH:/usr/sfw/bin |
Thanks i found that i had add the whole path not the Directory is in ! after adding the "PATH=$PATH:/usr/sfw/bin" i was able to compile but later on when i run the commande make i got the resuldts bellow, thanks for your help !:
gcc: language strconst not recognized gcc: check_mysql.c: linker input file unused because linking not done mv -f .deps/check_mysql-check_mysql.Tpo .deps/check_mysql-check_mysql.Po mv: cannot access .deps/check_mysql-check_mysql.Tpo *** Error code 2 make: Fatal error: Command failed for target `check_mysql-check_mysql.o' Current working directory /tmp/nagios-plugins-1.4.14/plugins *** Error code 1 The following command caused the error: failcom='exit 1'; \ for f in x $MAKEFLAGS; do \ case $f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo all-recursive | sed s/-recursive//`; \ list='gl tap lib plugins plugins-scripts plugins-root po'; for subdir in $list; do \ echo "Making $target in $subdir"; \ if test "$subdir" = "."; then \ dot_seen=yes; \ local_target="$target-am"; \ else \ local_target="$target"; \ fi; \ (cd $subdir && make $local_target) \ || eval $failcom; \ done; \ if test "$dot_seen" = "no"; then \ make "$target-am" || exit 1; \ fi; test -z "$fail" make: Fatal error: Command failed for target `all-recursive' Current working directory /tmp/nagios-plugins-1.4.14 *** Error code 1 make: Fatal error: Command failed for target `all' |
Any i dea on how i can successful the command "make all" refering on the error i posted above! thanks
|
This is getting a bit complicated, because you aren't giving much detail at any given point, so the questions and answers are stretching out over many posts.
I would suggest a couple of things. First, tell us what it is that you are trying to do and why. Give us some background on where you are starting from -- the system you have and your own background. Then, I would probably suggest that you go to http://www.sunfreeware.com and get packages from there unless you have some particular reason you want/need to build your own. If you do need to build your own, then you might start by getting all the build tools you need from Sunfreeware. This also has the advantage that the entries there will tell you all the dependencies so that you know what other things you have to get and install. Finally, if you do get into building your own stuff from source, you will want to have a proper environment. This will depend on your particular system and needs. I have some E250s running Solaris 9, and I have a file /usr/local/src/env that contains the following: Code:
#!/bin/ksh $ . /usr/local/src/env That syntax (note that there is a space after the dot) makes it execute that code in place in your current environment rather than making a subprocess. Thus, the environment variables are set. I have some other systems that are T5220s running Solaris 10, and I'm using the Sun CoolTools gccfss compiler. That build environment is a bit more complex and the env file is different. I need to build things there that will tap the unique capabilities of the T2 chip and get me into the crypto accelerators if I'm building something that needs them. Also, for whatever you are building, the Makefile should tell you what environment variables it respects -- for example, certain values for CPPFLAGS. Check that if you need to. But, be sure to look at the files README and/or INSTALL that come along with the source. HTH |
Dear r_titino,
I agree with choogendyk, and is this your code or is it a download in the first place? and what are you checking on mysql ? if you want to check if it is running: # ptree | grep mysql ( I do this for sybase). Jiliagre, I am working on Solaris 8, and it was there when i came, i dont know its history, how can i know if gcc is installed (its is not found on the paths you mentioned above) # > man gcc doesn't give anything. I have cc in /usr/ucb/cc do i download gcc, compile it with cc then use it ? |
mn35,
Simple, brute force: # find / -type f -name gcc If it isn't there, go to http://www.sunfreeware.com and get it. You should also get the gnu tools that go with it -- make (the gnu version), automake, autoconf, and whatever dependencies they call for. |
Quote:
Quote:
Quote:
|
I dont have it. :S
Thanks |
All times are GMT -5. The time now is 12:15 AM. |