weixiang wrote:
I installed Solaris and sunstudio10 successfully. Then I wrote a fortran77 routine to test sun performance library, but it does not work with neither gnu compiler nor sun compiler.

It looks like you haven't installed the f90 compiler from Studio10 properly.

...
the fortran code
   program haha
double precision v(4) data v/1.0, 2.0, 3.0, 4.0/ write(*, *) ddot(4, v, 1, v, 1) end # /usr/ccs/bin/make /usr/sfw/bin/g77 -O3 -xlic_lib=sunperf haha.f -c g77: language lic_lib=sunperf not recognized g77: haha.f: linker input file unused because linking not done /usr/sfw/bin/g77 haha.o -o haha g77: haha.o: no such file *** Error code 1 make: Fatal error: Command failed for target `haha'

your problem here is that "-xlic_lib" is not a compiler option
which is recognised by the GNU compiler suite.

# /usr/ccs/bin/make
/opt/SUNWspro/bin/f77 -O3 -xlic_lib=sunperf haha.f -c NOTICE: Invoking /opt/SUNWspro/bin/f90 -f77 -ftrap=%none -O3 -xlic_lib=sunperf haha.f -c f90: Cannot find /opt/SUNWspro/bin/f90comp

                ^^^ this is the giveaway


run "pkgchk -nv SPROf90" and see what errors you have.

I copied the code that you quoted directly (no fancy fortran
formatting or anything), and I got errors from the compiler.
Fortran isn't my area, but I think if you do actually have a
problem with a reproducible test case then you should provide
compilable code so others can give you appropriate assistance.


cheers,
James C. McPherson
--
Solaris kernel software engineer, system admin and troubleshooter
              http://www.jmcp.homeunix.com/blog
Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson
_______________________________________________
tools-discuss mailing list
[email protected]

Reply via email to