作者 主題: how to install GCC compiler on solaris 8  (閱讀 15886 次)

0 會員 與 1 訪客 正在閱讀本文。

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 於: 2002-02-14 20:54 »
every BIG BROTHER,

Help me!!!!!

how to install GCC compiler on solaris 8 as i download to my solaris server but i don't know how to make it work.
How to compile, any command recommand to me.

Thanks very much

Kinux

Anonymous

  • 訪客
how to install GCC compiler on solaris 8
« 回覆 #1 於: 2002-02-17 23:55 »
i hope i could help, but i am sorry that i've never touched solaris~~  :sad:

VBird

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 1516
    • 檢視個人資料
    • http://linux.vbird.org
how to install GCC compiler on solaris 8
« 回覆 #2 於: 2002-02-18 20:08 »
Hi Kinux:

basicly, the installation method of sofeware in the Unix and Linux system is similar! ( I mean tarball method )

you can easily using the following commands to install sofeware on your solaris:
引用
./configure
make
make install
I think you should view the INSTALL or README file in your umcompressed directory.  Good Luck !

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #3 於: 2002-02-19 09:11 »
Hi Vbird,

Thank you for your teaching & encouragement.
I will try it later.

Keep in touch.

Kinux

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #4 於: 2002-02-19 10:43 »

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #5 於: 2002-02-19 11:00 »
Hi Vbird,

I have tried but it doesn't work.
I download the compiler gcc-2.95.3.tar.gz
then i gunzip gcc-2.95.3.tar.gz and tar xvf gcc-2.95.3.tar.
Then i run "./configure" the result.
# ./configure
Configuring for a i386-pc-solaris2.8 host.
Created "Makefile" in /usr/gcc-2.95.3 using "mh-frag"
./configure: cc: not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
then run "make" the result
# make
make: not found
What I can do.

Thanks
Kinux

VBird

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 1516
    • 檢視個人資料
    • http://linux.vbird.org
how to install GCC compiler on solaris 8
« 回覆 #6 於: 2002-02-19 11:24 »
引用

在 2002-02-19 11:00, kinux 寫了:
./configure: cc: not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
Are there any cc compiler in your solaris system?
you can use: " find / -name cc " to find out the cc compiler !
because Linux and Unix are written by c language! thus, many systems have c compiler.  i think there should have cc in your system, and you should find it!  can you tell me: how do you install solaris?
by the way, you must put the path way of cc when you install your gcc software.

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #7 於: 2002-02-20 13:50 »
Hi Vbird,

Thank you first.

I've tried to find the "cc" with command "find /-name cc"
the result:
# find /-name cc
find: cannot open /-name: No such file or directory
find: cannot open cc: No such file or directory

But i guess the path of the cc file maybe
"/usr/ccs" and in "ccs" there are two files "bin & lib" and lots of files in these two files.

What can i do to put the path way of cc to install GCC.

BR

Kinux


VBird

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 1516
    • 檢視個人資料
    • http://linux.vbird.org
how to install GCC compiler on solaris 8
« 回覆 #8 於: 2002-02-20 14:10 »
Hi!
This command {find / -name cc}, there have a space between [/] and [-name].

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #9 於: 2002-02-20 15:24 »

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #10 於: 2002-02-20 15:25 »
Hi,

Ifind it.

# find / -name cc
/usr/ucb/cc

What is the next.

thanks


VBird

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 1516
    • 檢視個人資料
    • http://linux.vbird.org
how to install GCC compiler on solaris 8
« 回覆 #11 於: 2002-02-20 16:00 »
Oh!

you may add the path to your PATHway:
PATH="/usr/ucb:$PATH"

or link this software in /bin:
ln -s /usr/ucb/cc /bin/cc

and then try ./configure again!

kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #12 於: 2002-02-21 09:06 »
Hi,

How to add the path. To which file?  I mean config which file?

thanks


kinux

  • 活潑的大學生
  • ***
  • 文章數: 211
    • 檢視個人資料
how to install GCC compiler on solaris 8
« 回覆 #13 於: 2002-02-21 09:47 »
Hi,

# ln -s /usr/ucb/cc /bin/cc
ln: cannot create /bin/cc: File exists
# ls
bin         dev         export      lib         mnt         opt         sbin        usr         xfn
boot        devices     home        lost+found  net         platform    tmp         var
core        etc         kernel      Mail        nsmail      proc        TT_DB       vol
# cd /usr
# ls
5bin            dict            java1.1         net             preserve        spool           X
adm             dt              java1.2         news            proc            src             xpg4
apache          games           kernel          oasys           pub             tmp
aset            gcc-2.95.3      kvm             old             sadm            ucb
bin             gcc-2.95.3.tar  lib             openwin         sbin            ucbinclude
ccs             include         mail            perl5           share           ucblib
demo            java            man             platform        snadm           vmsys
# cd gcc-2.95.3
# ls
ChangeLog           configure.in        gcc                 libf2c              MAINTAINERS         README
config              contrib             i386-pc-solaris2.8  libiberty           Makefile            symlink-tree
config-ml.in        COPYING             include             libio               Makefile.in         texinfo
config.guess        COPYING.LIB         INSTALL             libobjc             mh-frag             ylwrap
config.if           etc                 install             libstdc++           missing
config.sub          FAQ                 install-sh          ltconfig            mkinstalldirs
configure           faq.html            libchill            ltmain.sh           move-if-change
# ./configure
Configuring for a i386-pc-solaris2.8 host.
Created "Makefile" in /usr/gcc-2.95.3 using "mh-frag"
/usr/ucb/cc:  language optional software package not installed
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

Still the same after add the link.
????

thanks

VBird

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 1516
    • 檢視個人資料
    • http://linux.vbird.org
how to install GCC compiler on solaris 8
« 回覆 #14 於: 2002-02-21 11:52 »
Hi:

You should find a "working c language".  Because your error message shows the /usr/ucb/cc can't work in your system.  I don't know why??