5 Replies Latest reply on Jun 5, 2009 9:18 AM by kvikrant

    Problems linking my project

    Calli82

      Hi,

      while linking my shared library for linux, i get this error message. I dont know how to solve this problem. is there any way to track the message to get an idea of what is going wrong? Thank for your advice,

      Calli82

       

      ### Assertion failure at line 1031 of ../../be/cg/x8664/exp_loadstore.cxx:
      ### Compiler Error in file 2.I during Code_Expansion phase:
      ### Exp_Ldst: thread-local storage NYI under PIC
      opencc INTERNAL ERROR: /home/jars/Desktop/x86_open64-4.2.2/lib/gcc-lib/x86_64-open64-linux/4.2.2/be returned non-zero status 1
      make[2]: *** [../../../Test/libNao.AMD.linux.Debug.so.ipajtfy2H/2.o] Fehler 1
      make[1]: *** [../../../Test/libNao.AMD.linux.Debug.so] Fehler 2
      make: *** [Nao.linux.Library] Fehler 2
      Command exited with non-zero status 2

        • Problems linking my project
          Calli82

          after searching and looking i found out that NYI stands for "NOT YET IMPLEMENTED" in Open 64. so i have to switch off the "-fPIC" option and compile again i suppose.

            • Problems linking my project
              Calli82

              the problem is still the same. does amd compiler support shared libraries?

                • Problems linking my project
                  kvikrant

                  Open64 compiler supports the compilation of shared libraries. But from the error message it looks like we are running into some bug. Can you provide us the compiler flags you used? Also can you check if you used any thread-local variables in your code e.g. you can search for "__thread" in your code to find out. please add a relevant code snippet if possible for us to reproduce the problem at our end.

                  Did you get any different error message when you disabled -fPIC? please provide that as well.

                  Thanks

                  Vikrant

                    • Problems linking my project
                      kvikrant

                      Im copying your message to me here for record:

                      ==========================================

                       

                      hi,

                      thank you very much for your help!

                      yes, we use TLS and the "__thread"-keyword. the error message is exactly the same with "-fPIC" like without "-fPIC". the compiler flags are -m32 -shared -ipa -Ofast -align32 -mcpu=anyx86 -march=anyx86 -mmx -m3dnow -OPT:fast_io=ON (+/- -fPIC)

                      the option for linking are -s -m32 -ipa -shared

                      sometimes i get an additional warning "Warning: setting incorrect section attributes for .rodata._ZTV6InText", but this appeared after unmotivated testing of some combinations of the compiler options...

                      if you need additional information or source code, it is no problem to send you some snippets. But i dont know which source code could be particulary interesing for you.

                      sincerely,

                      matthias



                        • Problems linking my project
                          kvikrant

                          Hi, 

                          Thanks for the further info. I'm a little surprised that you are still seeing the same error when you are not using -fPIC flag. I'll need to investigate that. 

                          In the mean time you can check with creating a static build and see if that works for you? I suggest this because the error seems related to the use of PIC and TLS together.

                          Also the Open64 manual suggests that for '-shared' you need to use the same options for compiling and linking for predictable results. can you try that as well?

                          If you can provide the code which I can use to reproduce the problem that would be good. It could be a file or a function.

                          Vikrant