Shared Libraries, F77 1.3 and SunOS4.1

Shared Libraries, F77 1.3 and SunOS4.1

Post by sjm.. » Thu, 14 Mar 1991 11:50:01

I have a question about Fortran 1.3 (no we haven't got 1.3.1 as yet) and
shared libraries.   Of course, I'm trying to make executable images smaller
as they are ridiculously huge with SunOS.   By the way we are running SunOS4.1
on SPARCstations.

My problem is this :
  when I try the example as given in the SUN Fortran Users Guide (release 16
  March 1990) I find it gives incorrect results, and the executable is not a
  single bytes smaller.

Firstly, perhaps someone can tell me if there is a bug in Fortran 1.3 that
precludes the use of shareable libraries?   If it is meant to work then why does
the following program fail and why is the executable the same size with and
without shareable libraries.

Here is the source code :

File : tessharmain.f

        common /grp/ a,b,c
        a = 1.0
        b = 2.0
        call printgrp

File : blkgrp.f

        blockdata blkgrp
        common /grp/ a,b,c
        data a,b,c /3*9.9/

File : printgrp.f

        subroutine printgrp
        common /grp/ a,b,c
        write(*,'(3f4.1)') a,b,c

I do the following :
                     f77 -c -pic *.f
                     ar cv blkgrp.o
                     ld -o -assert pure-text printgrp.o
                     f77 testsharmain.o

Then running it :
                     1.0 2.0 0.0

This is wrong it should be : 1.0 2.0 9.9   - which the non-shareable version
does give.

Any ideas?
                                        Stephen Meatheringham
                                        Applications Programmer
                                        Mt. Stromlo Observatory
                                        CANBERRA, ACT, AUSTRALIA


1. Diff. between SunOS4.1.3_U1 and SunOS4.1.3_U1 VB

        Do any of you know the difference between SunOs4.1.3_U1 and
SunOs4.1.3_U1 VB?  Sun has the Y2K patches for 4.1.3_U1 VB? Do these
patches work for just 4.1.3_U1?

        Any information is greatly appreciated.

--== Sent via ==--
---Share what you know. Learn what you don't.---

2. Source Code for /dev/tty

3. Compiling something that is expecting sparc-sun-sunos4.1.3 libraries

4. Modem and Phone on one line.

5. libtool 1.2, automake 1.3, and shared libraries

6. Need fix for short ksh script

7. f77 common blocks and shared libraries

8. GUI front end for Ghostscropt

9. start up a process within an X appl (SunOs4.1.3)

10. SGI wont mount Sun SunOS4.1.3 disks, access denied...

11. SunOS4.1.3 to Solaris 2.3?

12. rdist RedHat4.0<->SunOS4.1.3

13. HELP: Porting multi-threaded Sunos4.1.3 app. to Solaris