5 Replies Latest reply on Jan 18, 2012 7:39 AM by solaymanbadsha

    How i can link gcc_s static

    andersartig

      Hello

       

      I want to compile a big fortran-program. It compile with g95 and intel fortran. Now i'm testing open64-4.2.3, but have some problems while compiling.

      I need a static binary. Testing to compile with a shared lib also makes some problems. (at one script it cannot use LD_LIBRARY_PATH)

       

      Hope you can help me.

       

      With best regards

      Axel

        • How i can link gcc_s static
          dgilmore

          Supplying -static to the opencc/openf90 link line should work, are you seeing problems with that?

          Doug

            • How i can link gcc_s static
              andersartig

              Hello

               

              -static works, i took -wl,-dn before, but now i got another error:

                    REAL(8)   ,PARAMETER  :: DX=(XMAX-XMIN)/REAL(NP-1,8)
                                                           ^            
              openf95-587 openf95: ERROR RADIAL_BESSELTRANSF_M, File = /home/axel/PAW/paw_test/devel1040_2/bin/open64_acml44_openmpi/Objects/fast/paw_radial_d.f90, Line = 3129, Column = 46
                The initialization expression must be a constant to be used with PARAMETER assignment for object "DX".

              openf95: Open64 Fortran Version 4.2.3 (f14) Wed Jun  2, 2010  09:14:16

              Code:

              INTEGER(4),PARAMETER  :: NP=1000

              REAL(8)   ,PARAMETER  :: XMIN=-1.D+1
              REAL(8)   ,PARAMETER  :: XMAX=4.D+1

              REAL(8)   ,PARAMETER  :: DX=(XMAX-XMIN)/REAL(NP-1,8)

               

               

              Other compiler like g95 and intel fortran compiler don't have any propblem with this. I don't know if this is correct fortran-code (I'm not the fortran programmer)

               

              With best regards

              Axel Ehrich

            • How i can link gcc_s static
              solaymanbadsha

              I can't see where I've told either gcc or ld to link statically (this is the root cause of the failure to find gcc_s, I believe. I've tried compiling using ..