11 Replies Latest reply on Feb 28, 2011 10:23 AM by Ehsan

    icc8 link error

    Ehsan

      When I try to compile a file on the management console with the icc8 compiler, I get this weird error:

      ld:  /proj/MCEMU/modules/crosstool/0.42.1/gcc-3.4.5-glibc-2.3.6/i386-unknown-linux-gnu/lib/gcc/i386-unknown-linux-gnu/3.4.5/crtbegin.o:  No such file: No such file or directory

      This path seem to be hard coded into the compiler because /proj doesn't even exit on the machine.

      I was able to compile and run other files on the machine before.

      The command is: icc -i_dynamic -rdynamic -mcpu=pentium -i-static -gcc-version=340 -cxxlib-icc -L/opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/lib -L/opt/i386-unknown-linux-gnu/lib/gcc/i386-unknown-linux-gnu/3.4.5 -o charmrun-notify charmrun.o -L../../bin/../lib -lm

      I removed all the options except -cxxlib-icc and the problem remains.

      Can anyone give me a clue?

       

      Bests,

      -Ehsan

        • 1. Re: icc8 link error
          tedk

          This looks very strange to me. I'm suspecting just a path/environment issue.

          Have you built a custom Linux on this machine? Sometimes the path/environment set up for a Linux build is not the same as for building appplications.

           

          Can you do a "which icc" and a "which gcc"? Typically, this is what we want to see

           

          tekubasx@marc101:~$ which icc
          /opt/icc-8.1.038/bin/icc
          tekubasx@marc101:~$ which gcc
          /opt/i386-unknown-linux-gnu/bin/gcc
          tekubasx@marc101:~$

           

          tekubasx@marc101:~$ gcc --version
          gcc (GCC) 3.4.5
          Copyright (C) 2004 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions.  There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

           

          tekubasx@marc101:~$ icc -V
          Intel(R) C Compiler for 32-bit applications, Version 8.1    Build 20060606Z Package ID: l_cc_pc_8.1.038
          Copyright (C) 1985-2006 Intel Corporation.  All rights reserved.

           

          tekubasx@marc101:~$

          tekubasx@marc101:~$ env |grep LD_L
          LD_LIBRARY_PATH=/opt/icc-8.1.038/lib:/opt/i386-unknown-linux-gnu/lib::/opt/sccKit/lib
          tekubasx@marc101:~$

           

          Can you compile and run a simple "hello world"? Do you use RCCE? Does the RCCE stress test run?

          • 2. Re: icc8 link error
            Ehsan

            The linux is not custom built. I'm able to compile other programs. RCCE programs compile too.

            I have this error while trying to build charm++. grep doesn't show this path in the source code of charm++ or other files of the system and we never had this problem before (I'm with the charm group).

            Here is my output of the commands:

             

            totoni2@scc:~$ which icc
            /opt/icc-8.1.038/bin/icc
            totoni2@scc:~$ which gcc
            /opt/i386-unknown-linux-gnu/bin/gcc
            totoni2@scc:~$ gcc --version
            gcc (GCC) 3.4.5
            Copyright (C) 2004 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

             

            totoni2@scc:~$ icc -V
            Intel(R) C Compiler for 32-bit applications, Version 8.1    Build 20060606Z Package ID: l_cc_pc_8.1.038
            Copyright (C) 1985-2006 Intel Corporation.  All rights reserved.

             

            totoni2@scc:~$ env| grep LD_L
            LD_LIBRARY_PATH=/opt/icc-8.1.038/lib:/opt/i386-unknown-linux-gnu/lib::/opt/sccKit/lib
            totoni2@scc:~$

             

            -Ehsan

            • 3. Re: icc8 link error
              tpresche

              crtbegin.o (as well as some other files) is required for c++ constructor calls and similar.

              I have this error sometimes when building c++ Programs in a bareMeta environment.

              I fixed it this way (Makefile)

               

              SYSTEM_OBJ_FILES := crti.o \
                                  crtbegin.o \
                                  crtend.o \
                                  crtn.o

               

              SYSTEM_OBJS := $(foreach sysobj, $(SYSTEM_OBJ_FILES), \
                      $(shell $(CC) --print-file-name $(sysobj)))

               

              I hope this helps.

              • 4. Re: icc8 link error
                Ehsan

                Unfortunately it didn't help. icc still insists on that weird path to find the file.

                Any other suggestions?

                • 5. Re: icc8 link error
                  tedk

                  How are you building charm++?

                   

                  I downloaded charm-6.2.1_src.tar ftom the charm site http://charm.cs.uiuc.edu/ I first tried building it just for the MCPC with ./build charm++ net-linux-x86_64

                  Well, it built ... not surprisingly, I suppose.

                   

                  I then sourced the path for the cross compilers, untarred in a fresh directory,  and then just entered ./build charm++ net-linux. It built again. I attached a script file for this build. I don't now much about charm++ other than what it is. Is there more to the build process that I'm not seeing?

                   

                  Of course, I think the default is gcc rather than icc. And that may be what I'm using. Is there some reason why you must use icc? I haven't tried to actually run anything. It this a runtime issue you're seeing, like with shared libraries or something?

                  • 6. Re: icc8 link error
                    Ehsan

                    I should have posted, my issue is resolved now. The problem was that the old icc couldn't link some standard c libraries, but you could compile by icc command and link using icpc command line. Charm is running fine on SCC now.

                     

                    I used icc because I supposed for using the SCC, the compiler should be icc (I may have read it somewhere in the documentations but I can't point to anything).

                     

                    Thanks for your help anyways.

                    -Ehsan

                    • 7. Re: icc8 link error
                      tedk

                      So are you saying you used icpc innstead of icc? Do you edit the build script to do this?

                      • 8. Re: icc8 link error
                        Ehsan

                        Not actually. We have so called architecture files for building charm and there is one for icc8 that I edited.

                        • 9. Re: icc8 link error
                          tedk

                          I see. Are these architecture files part of the download?... the ones in /charm-6.2/src/arch? What does the 8 stand for?

                          • 10. Re: icc8 link error
                            tedk

                            About the icc vs icpc ... please look at Bug 74.

                            http://marcbug.scc-dc.com/bugzilla3/show_bug.cgi?id=74

                            • 11. Re: icc8 link error
                              Ehsan

                              Yes, they are in src/arch. For different compilers, there are scripts in src/arch/common. The 8 is for version 8 of icc that has a specific architecture file probably because different configuration was needed.