8 Replies Latest reply: Mar 1, 2011 7:24 AM by slap RSS

    Not able to install Gcc on Oracle Solaris-11-express

    820798
      Hi,

      I installed Solaris-11-express using live cd ans also text based cd on VM.
      In package manager I could see gcc package but its not getting installed . Its throwing me error .
      So I manually downloaded the gcc tar file and still not able to install. please help.
        • 1. Re: Not able to install Gcc on Oracle Solaris-11-express
          781486
          What's the error message? Try to bypass the GUI installer if it's not giving meaningful error messages.

          # uname -a
          SunOS sol-11-express-a 5.11 snv_151a i86pc i386 i86pc Solaris


          # pkg publisher
          PUBLISHER TYPE STATUS URI
          solaris (preferred) origin online http://pkg.oracle.com/solaris/release/


          # pkg install gcc-3
          Packages to install: 4
          Create boot environment: No
          DOWNLOAD PKGS FILES XFER (MB)
          Completed 4/4 2278/2278 33.7/33.7

          PHASE ACTIONS
          Install Phase 2831/2831

          PHASE ITEMS
          Package State Update Phase 4/4
          Image State Update Phase 2/2


          # gcc -v
          Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
          Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure prefix=/usr/sfw with-as=/usr/sfw/bin/gas with-gnu-as with-ld=/usr/ccs/bin/ld without-gnu-ld enable-languages=c,c++,f77,objc --enable-shared
          Thread model: posix
          gcc version 3.4.3 (csl-sol210-3_4-20050802)
          • 2. Re: Not able to install Gcc on Oracle Solaris-11-express
            820798
            Hi ,

            Thanks a lotttttttttt for the answer. This really really helped me out.
            • 3. Re: Not able to install Gcc on Oracle Solaris-11-express
              820798
              I am trying to install iozone, this requires gcc, now gcc is installed properly but iozone is not installing.I am pasting the error with this,

              root@solaris:~/iozone3_353/src/current# make Solaris10gcc-64

              Building iozone for Solaris10gcc-64

              gcc -O -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO -D__LP64__ \
              -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dsolaris \
              -m64 libbif.c -o libbif10-64.o
              gcc -O -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO -D__LP64__ \
              -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dsolaris \
              -DNAME='"Solaris10gcc-64"' -m64 libasync.c -o libasync10-64.o
              gcc -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO \
              -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dsolaris \
              -DNAME='"Solaris10gcc-64"' -m64 iozone.c -o iozone_solaris10gcc-64.o

              Building fileop for Solaris10gcc-64

              gcc -c -O -m64 fileop.c -o fileop_Solaris10gcc-64.o

              Building the pit_server

              cc -c pit_server.c -o pit_server.o
              gcc -O -m64 iozone_solaris10gcc-64.o libasync10-64.o libbif10-64.o \
                        -lthread -lpthread -lposix4 -lnsl -laio \
                        -lsocket -o iozone
              gcc -O -m64 fileop_Solaris10gcc-64.o -o fileop
              gcc -O -m64 pit_server.o -lthread -lpthread -lposix4 \
                        -lnsl -laio -lsocket -o pit_server
              ld: fatal: file pit_server.o: wrong ELF class: ELFCLASS32
              ld: fatal: file processing errors. No output written to pit_server
              collect2: ld returned 1 exit status
              make: *** [Solaris10gcc-64] Error 1

              Edited by: 817795 on Dec 9, 2010 11:03 PM
              • 4. Re: Not able to install Gcc on Oracle Solaris-11-express
                781486
                Edit the makefile and make sure you've the following lines:

                S10GCCFLAGS = -m64
                S10CCFLAGS = -m64
                FLAG64BIT = -m64

                Please remember to mark the correct answer if it was helpful. Thanks.
                • 5. Re: Not able to install Gcc on Oracle Solaris-11-express
                  820798
                  Done!!!!!!!! thanks a lot.............
                  • 6. Re: Not able to install Gcc on Oracle Solaris-11-express
                    820798
                    I have marked this as answered, pls inform me if its not reflecting
                    • 7. Re: Not able to install Gcc on Oracle Solaris-11-express
                      slap
                      Hi, I have the same issue installing the GCC.
                      Having a look to that post I tryed the manual way and I have the following message :
                      root@solaris:~# pkg install gcc-3
                      pkg: 0/1 catalogs successfully updated:

                      Unable to contact valid package repository
                      Encountered the following error(s):
                      Unable to contact any configured publishers.
                      This is likely a network configuration problem.
                      http protocol error: code: 407 reason: Proxy Authentication Required
                      URL: 'http://pkg.oracle.com/solaris/release'.

                      I tryed to configure the proxy throught the URL, and using export http_proxy variable, but it does not work.

                      any idea ?
                      • 8. Re: Not able to install Gcc on Oracle Solaris-11-express
                        slap
                        I managed to make it work by exporting http_proxy, but you need to use this format :

                        export http_proxy="http://domain\\username:password@proxy_url:proxy_port"

                        I hope this will help.