Ad Widget

Collapse

Problem with GCC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bharathu
    Member
    • Dec 2005
    • 56

    #1

    Problem with GCC

    Hi,

    Can anyone please give me a link of a site where i get to install the GNU C-Compiler on Solaris 9 (SPARC)? I am not able to install Zabbix Server of my Solaris box because of the absence of this C compiler.

    I will be very grateful if anyone can give me some tips on a clean install of thsi C compiler. I already struggled for 2 weeks to get MySql 5 to work on Solaris 9.

    Regards,
    Bharadwaj
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings.

    The best site for stuff for SunOS and Solaris, for me anyway, has always been the Sun Freeware site, which is actually sponsored by SUN.
    Unofficial Zabbix Developer

    Comment

    • clahti
      Senior Member
      • Jan 2007
      • 126

      #3
      Have you tried http://sunfreeware.com/

      There are precompiled packages for Solaris SPARC for both gcc and mysql 5. This is the best place to get pre-rolled open source stuff for Solaris.

      /Christian

      Comment

      • Bharathu
        Member
        • Dec 2005
        • 56

        #4
        tried sunfreeware site itself

        Hi Guys,

        I had downloaded the TAR version of the gcc from the sunfreeware site itself. But i am not able to configure it with ./configure command. I am getting errors about "conftest.c" and something with "CC"

        this is the exact error I am getting

        ../configure: cc: not found

        *** The command 'cc -o conftest -g conftest.c' failed.

        *** You must set the environment variable CC to a working compiler.


        Do you recommend me to use the PKG version as Solaris has problems with untar?

        Until i sort this issue.... my zabbix server cannot be configured.... i am really eager to get the application up and running I already struggled 2 weeks to to get MySql work on Solaris ... learnt a lot of things...
        Last edited by Bharathu; 14-03-2007, 09:04.

        Comment

        • Bharathu
          Member
          • Dec 2005
          • 56

          #5
          Any Views/ Suggestions?

          Guys,

          Can you please gimme some valuable insights os overcoming this problem with GCC. I tried a lot searching in Google to solve the problem. So far no use

          Comment

          • James Wells
            Senior Member
            • Jun 2005
            • 664

            #6
            Originally posted by Bharathu
            Do you recommend me to use the PKG version as Solaris has problems with untar?
            I recommend using the PKG version of GCC, which you can find on the the Sun Freeware site.

            As of Solaris 2.2, SUN no longer bundles a compiler with their OS, as such, you either have to pay for their commercial developers package or use GCC. Unfortunately, the only GCC you can use initially is the pkg version as you do not have a C compiler. Once you install the pkg version, you have a compiler and can then rebuild GCC if you choose.
            Unofficial Zabbix Developer

            Comment

            • Bharathu
              Member
              • Dec 2005
              • 56

              #7
              Seeing progress

              Guys,

              I dont know wat i did..... i had a previous TAR version which was giving those errors..as shown in my previous post.

              I then used the #packadd -d <package name> with the PKG version

              I was not getting enough idea on wat to do next after the unpacking the PKG file. So I used the following things...

              #PATH=$PATH:/usr/local/bin
              #export PATH


              and then i went inside my original TARed GCC and tried to configure.... and it worked!! I dont know how

              # ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages-c,c++,f77

              Then i used
              # make

              I am now stuck in this command as it has been running for the last 40 mins ... i dont know wat's happeneing.....
              Last edited by Bharathu; 14-03-2007, 17:36. Reason: spelling mistakes

              Comment

              • Bharathu
                Member
                • Dec 2005
                • 56

                #8
                o/p of the never ending &quot;make&quot; command

                Hi,

                here is a sample o/p of the make command that has been running for quite some time...


                .3.2\" -DDEFAULT_TARGET_MACHINE=\"sparc-sun-solaris2.9\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
                -c ../../gcc/gccspec.c -o gccspec.o)
                gcc -O3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -o xgcc gcc.o gccspec.o intl.o \
                prefix.o version.o ./intl/libintl.a ../libiberty/libiberty.a
                gcc -c -O3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/cppspec.c -o cppspec.o
                gcc -O3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -o cpp gcc.o cppspec.o intl.o \
                prefix.o version.o ./intl/libintl.a ../libiberty/libiberty.a
                /export/home/zabbix/gcc-3.3.2/objdir/gcc/xgcc -B/export/home/zabbix/gcc-3.3.2/objdir/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -dumpspecs > tmp-specs
                mv tmp-specs specs
                if [ -f /usr/include/limits.h ] ; then \
                cat ../../gcc/limitx.h ../../gcc/glimits.h ../../gcc/limity.h > tmp-xlimits.h; \
                else \
                cat ../../gcc/glimits.h > tmp-xlimits.h; \
                fi
                mv tmp-xlimits.h xlimits.h
                (SHLIB_LINK='/export/home/zabbix/gcc-3.3.2/objdir/gcc/xgcc -B/export/home/zabbix/gcc-3.3.2/objdir/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,-h,@[email protected] -Wl,-z,text -Wl,-z,defs -Wl,-M,@shlib_map_file@ -o @shlib_dir@@[email protected] @multilib_flags@ @shlib_objs@ -lc && rm -f @[email protected] && ln -s @shlib_dir@@[email protected] @[email protected]' \
                SHLIB_MULTILIB=''; \
                gcc -c -O3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"3.3.2\" -DDEFAULT_TARGET_MACHINE=\"sparc-sun-solaris2.9\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
                -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/cp/g++spec.c)
                gcc -O3 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CO
                NFIG_H -o g++ \


                I dont know where i am heading to.... the execution of the make is not ending!!

                Comment

                • James Wells
                  Senior Member
                  • Jun 2005
                  • 664

                  #9
                  Originally posted by Bharathu
                  I dont know where i am heading to.... the execution of the make is not ending!!
                  Just give it time, you are re-compiling GCC. On my dual core 2G machine it takes about 45 minutes to compile GCC, when the machine is doing nothing else. Last time I tried it on a SUN box it took about 2 hours. That is just to get the compiler build correctly and is pretty much a one time cost.
                  Unofficial Zabbix Developer

                  Comment

                  • Bharathu
                    Member
                    • Dec 2005
                    • 56

                    #10
                    Hi,

                    Thanks for you reply... i shall wait then i guess by that time i will have my dinner and come back

                    So i shud run "make install" after this right? Any more settings to be done after this?

                    Until GCC is setup i cant run ./configure for zabbix server .... waiting for ur reply ....

                    Comment

                    • James Wells
                      Senior Member
                      • Jun 2005
                      • 664

                      #11
                      Originally posted by Bharathu
                      So i shud run "make install" after this right? Any more settings to be done after this?
                      Yes, otherwise you will continue to use the current compiler, which is fine, but if you are going through the work of re-building it, you might as well take advantage of it.

                      Until GCC is setup i cant run ./configure for zabbix server
                      You can, and you can even start the make afterwards, as long as you understand it will use the PKG version of the compiler to build with. As I said above, that is fine, but the choice is really yours.
                      Unofficial Zabbix Developer

                      Comment

                      • Bharathu
                        Member
                        • Dec 2005
                        • 56

                        #12
                        failed to install

                        The make command finally finished.... but it showed a few errors...but i carried on with "make install" command... and i got this o/p at the end after lot of other stuff

                        sh: ../../gcc/../install-sh: not found
                        *** Error code 1
                        make: Fatal error: Command failed for target `install-exec'
                        Current working directory /export/home/zabbix/gcc-3.3.2/objdir/gcc/intl
                        *** Error code 1
                        make: Fatal error: Command failed for target `intl.install'
                        Current working directory /export/home/zabbix/gcc-3.3.2/objdir/gcc
                        *** Error code 1
                        make: Fatal error: Command failed for target `install-gcc'


                        any tips? is anyone having a proper set of steps for installing GCC for a specific version?

                        Comment

                        • Bharathu
                          Member
                          • Dec 2005
                          • 56

                          #13
                          Which GCC is being used?

                          Hi,

                          How can I know which GCC is being used?

                          I tried configure & make & make install now for zabbix server and it worked fine

                          but wen i am going thru the installation steps from the manual.. I am not able to find /etc/zabbix/zabbix_server.conf .. so i copied from /misc files of source directory and copied it to /etc/zabbix...

                          i tried starting my server from /usr/local/bin/zabbix_server --> and it fired up well...

                          now i need to figure out apache installation for the frontend.... thanks so much for all ur help guys!! I will come back if i stumble across more problems!!

                          I wonder why my installation is so messed up
                          Last edited by Bharathu; 14-03-2007, 19:30. Reason: new updates

                          Comment

                          Working...