6 Replies Latest reply on May 16, 2012 7:51 AM by yurtesen

    Open64 library path question

    yurtesen

      I am trying to install AMD x86 Open64 on Scientific Linux 6.2 amd64 on a custom folder...

       

      If I have  lib/gcc-lib/x86_64-open64-linux/4.5.1/64 in LD_LIBRARY_PATH and if I try to compile a simple program, I get the following error:

       

      lib/gcc-lib/x86_64-open64-linux/4.5.1/wgen42: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

       

      If I use lib/gcc-lib/x86_64-open64-linux/4.5.1/32 then it works.

       

      so I wonder, why do I have to use 32bit libraries on 64bit os ? am I doing something wrong?

       

      Thanks,

      Evren

        • Re: Open64 library path question
          santosh.zanjurne

          Open64 compilers binaires are of 32bit type so you needed to that.  Open64 compilers 32bit binaries can generate both 32bit and 64bit code.  We are working on 64 bit compiler binaries.

            • Re: Open64 library path question
              yurtesen

              Thanks, just for clarification, I must have both 32 and 64bit on path right? is this correct? (although I was able to compile simple programs with only 32bit versions, perhaps it used system installed libraries?)

              lib/gcc-lib/x86_64-open64-linux/4.5.1/32:lib/gcc-lib/x86_64-open64-linux/4.5.1/64

                • Re: Open64 library path question
                  santosh.zanjurne

                  To use the compiler binaries all you need to do is just add the compilers 'bin' folders path to your PATH env variable. e.g. export PATH=/yourfolder/x86_open64-4.5.1/bin/:$PATH

                  Compiler then automatically detects where to find the required libraries.  When you create your own  binaries, the same way, your executable will try to find the dependancies in the same location.  You will need LD_LIBRARY_PATH only for your custom and other vendors shared object references.

                   

                  So try without using LD_LIBRARY_PATH and let me know if this helps.

                   

                  Regards,

                  santosh

                    • Re: Open64 library path question
                      yurtesen

                      Hello again,

                       

                      Are you sure? Is that something hard linked at compile time into binaries? I am opening the RPM package to a different prefix, is it still suppose to work? I did not compile open64 from sources because it needed many libraries to be installed and I had some other problems and no time to deal with them. So I used the binary package...

                       

                      The reason why I unpack to different location is because open64 will be part of environment modules in a computing cluster and the compiler will be available to many organizations.

                       

                      Without LD_LIBRARY_PATH, I get errors,:

                       

                      /export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/wgen42: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

                      opencc INTERNAL ERROR: /export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/wgen42 returned non-zero status 127

                       

                      If LD_LIBRARY_PATH is set to

                       

                      /export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/32/

                       

                      then compilation completes, it does also function if both 32 and 4bit paths are set as long as 64bit path is not the first path. (but  I am not sure if this is correct?)

                       

                      /export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/32:/export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/64

                       

                      Thanks,

                      Evren

                        • Re: Open64 library path question
                          santosh.zanjurne

                          It looks libstdc++.i686 or 32 bit libstdc++ is not installed on your system. Can you verify this?

                          If this doesnt help then give me the name of OS/version you are using and Open64 compiler rpm file name.

                           

                          You can use -show -keep options to see how compiler uses the path.

                          Regards,

                          Santosh

                          libstdc++.i686
                            • Re: Open64 library path question
                              yurtesen

                              That is correct. This is a 64bit system and 32bit libraries are NOT installed. It is Scientific Linux 6. I could install the libraries locally to our cluster, but I cant expect people to install 32bit libraries to their clusters. So I should be able to get it working without installing extra libraries.

                               

                              Hmm, now when I think about it, perhaps that is why I dont have to set path for 64bit libraries to  lib/gcc-lib/x86_64-open64-linux/4.5.1/64 , since these exist in the system also?

                               

                              Perhaps it is best to set LD_LIBRARY_PATH=/export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/32:/export/modules/compilers/amd/x86_open64/4.5.1/lib/gcc-lib/x86_64-open64-linux/4.5.1/64   ???

                               

                              or is it better to just set 32bit library folder in LD_LIBRARY_PATH and let the compiler to use system libraries for 64bit ones ???