10 Replies Latest reply on Apr 6, 2012 6:51 PM by ehoeksema

    cc142: No such file or directory

    erthalion

      I installed the amdsdk with open64 v4.2.4 and set environment variables:

       

       

      export AMDSDK_ROOT=~/amdsdk/v1.0

      export OPEN64_TC=$AMDSDK_ROOT/x86_open64-4.2.4/bin

      export LD_LIBRARY_PATH=$AMDSDK_ROOT/amdlibm-2-1-lin64/lib/dynamic

      export AMD_LIBM=$AMDSDK_ROOT/amdlibm-2-1-lin64/lib

      PATH=$PATH:$AMDSDK_ROOT/x86_open64-4.2.4/bin
      But open64 does not work:
      opencc -o test test.c 
      opencc WARNING: /home/erthalion/amdsdk/v1.0/open64/x86_open64-4.2.4/lib/gcc-lib/x86_64-open64-linux/4.2.4 does not contain all of the Open64 compiler phases.
      opencc ERROR: cannot exec /home/erthalion/amdsdk/v1.0/open64/x86_open64-4.2.4/lib/gcc-lib/x86_64-open64-linux/4.2.4/cc142: No such file or directory
      I need help to solve the problem)


        • cc142: No such file or directory
          santosh.zanjurne

          I havent yet able to produce your problem here however what i could see in your log is that the OPEN64_TC is pointing to one location where as in the WARNING message the path given is another. 

           OPEN64_TC=$AMDSDK_ROOT/x86_open64-4.2.4/bin
          WARNING:   /home/erthalion/amdsdk/v1.0/open64/x86_open64-4.2.4

          Can you please tell what are the steps you are following for the SDK instllation?
          Also please let me know the OS and its version you are using.

          Regards,
          Santosh

            • cc142: No such file or directory
              cfr100@psu.edu

              So, the SDK defines AMDSDK_ROOT, AMD_LIBM, etc.

              Are these defined when open64 and amdlibm are installed indepentently via rpm or tarball? Where is this documented? It is not in the users guide.

              • cc142: No such file or directory
                erthalion

                I downloaded AMD SDK and follow the steps from ReadMe.txt

                 

                 

                1. Run the installation script named install.sh as root user

                   ./install.sh

                   Follow the prompts to select and install the components.

                2. After the components are installed, adjust settings of PATH and

                   LD_LIBRARY_PATH variables as described below

                   .............................

                  (description of all environment variables)
                I use Ubuntu 11.10 with 3.0.0-14-generic


                  • cc142: No such file or directory
                    cfr100@psu.edu

                    I eventually did that myself. Originally I download the ACML, amdlibm and Open64 seperately. They are better documented in the SDK, but the versions are older.

                      • cc142: No such file or directory
                        santosh.zanjurne

                        The new AMD SDK with latest version of all the included packages is in the pipeline.  I will post an update here one its released.

                         

                          • cc142: No such file or directory
                            erthalion

                            I installed separately open64, but it still not working)

                             

                             

                            opencc test.c

                            In file included from /usr/include/stdio.h:28,

                                             from test.c:1:

                            /usr/include/features.h:323:26: error: bits/predefs.h: No such file or directory

                            /usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory

                            /usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory

                            In file included from test.c:1:

                            /usr/include/stdio.h:36:25: error: bits/types.h: No such file or directory

                            /usr/include/stdio.h:161:28: error: bits/stdio_lim.h: No such file or directory

                            /usr/include/stdio.h:846:30: error: bits/sys_errlist.h: No such file or directory

                            test.c:31:2: warning: no newline at end of file

                            How to use stdio.h and other headers?


                              • cc142: No such file or directory
                                santosh.zanjurne

                                Make sure you have all the dependancies installed:

                                  On 32 bit Ubuntu
                                        apt-get install build-essential gfortran

                                  On 64 bit Ubuntu
                                        apt-get install build-essential gfortran flex bison ia32-libs \
                                        gcc-multilib g++-multilib gfortran-multilib

                                You can refer other Open64 documentation at: http://developer.amd.com/tools/open64/Pages/default.aspx

                                After successful installation you will need to follow these steps to make the compiler work:

                                Ubuntu and Debian systems use different library structure than other linux distos linke RHEL/SLES, /usr/lib* directories for 32/64 bit files,

                                Execute following commands to create links to CRT files:

                                cd /usr/lib
                                sudo ln -s /usr/lib32/crt* .
                                /usr/lib$ file crt*
                                crt1.o: symbolic link to `/usr/lib32/crt1.o'
                                crti.o: symbolic link to `/usr/lib32/crti.o'
                                crtn.o: symbolic link to `/usr/lib32/crtn.o'

                                sudo mkdir /usr/lib64/
                                cd /usr/lib64/
                                sudo ln -s /usr/lib/x86_64-linux-gnu/crt* .
                                /usr/lib64$ file *
                                crt1.o: symbolic link to `/usr/lib/x86_64-linux-gnu/crt1.o'
                                crti.o: symbolic link to `/usr/lib/x86_64-linux-gnu/crti.o'
                                crtn.o: symbolic link to `/usr/lib/x86_64-linux-gnu/crtn.o'

                                Let me know if this helps you.

                                Regards,
                                Santosh

                      • Re: cc142: No such file or directory
                        ehoeksema

                        Hi,

                         

                        I had the same problem. I compiled the source on a virgin install of Ubuntu 11.10 and got the same error. Then installed the rpm on a virgin install of Fedora 16. Again, the same error.

                         

                        Figured out somehow the %{open64_lib_dir} var in openflat64/open64.spec must be pointing to /usr/lib/gcc-lib.

                         

                        I solved it with a symbolic link in /usr/lib to the lib folder of the compiler:

                         

                        ln -s /opt/x86_open64-4.5.1/lib/gcc-lib /usr/lib/gcc-lib

                         

                        Thank you all for your support! Hope this will help someone,

                        Elmer.