Subject: Redhat/G98/PGI - Error

From: Lars Packschies <[email-masked]>
Date: Mon, 12 Mar 2001 11:14:20 +0100

Dear CCLers,

I'm trying to compile g98.A7 on a Redhat 7.0 (ok, not the best choice). 
PGF77 ist working fine (as far I coud see). But when it comes to
build/link l402, I get an error. The text is attached. 

Is this a RH7-specific problem which means to install a different
distribution ? 
It wouldn't surprise me anayway... Is anybody out there who compiled
g98.A7 on a RH7 PIII-box ?

Thanks in advance,

Lars

-- 
             ,H  + Dr. Lars Packschies   ZAIK/RRZK, Robert-Koch-Str.10 +
H      H    O    | Chemistry Dpt. Support             D-50931 Cologne  |
 `O-H. |  ,' `H  | Comp.Dpt., Univ. of Cologne   Phn (+49)221-478-7022 |
      `O-H       + [email-masked]   Fax (+49)221-478-5568 +

---

From: Rafael Rodriguez Pappalardo <[email-masked]>
Date: Mon, 12 Mar 2001 14:47:53 +0100 (CET)

> g98.A7 on a RH7 PIII-box ?

Hi!,
just delete bd0402.o in bsd/i386.make line:
        $(RUNF77) $(FFLAGS) -o $*.exe m$*.o $(EXTOBJ) $*.a bd0402.o
$(EXTRAS) $(GAULIB) $(LIBS)

Apparently the RH 7.0 linker does not need the block data outside of a
library file. I presume the same problem arise in l609 and l809.

Rafael
-- 
Dr. Rafael R. Pappalardo
Dept. Quimica Fisica, Fac. de Quimica, Univ. de Sevilla. 41012-Sevilla (Spain)
e-mail: [email-masked]

---

From: Christoph van Wüllen <[email-masked]>
Date: Mon, 12 Mar 2001 15:29:37 +0100

>g98.A7 on a RH7 PIII-box ?
This is a well-known problem (at least, I helped others in some occasions).

The problem is the linking of a block-data unit. To enforce linking,
g98.make first extracts bd0402.o from the archive l402.a, and then
links the program with bd0402.o against l402.a. This causes the multiple
definition errors.
(Note to gaussian: very silly programming).
You have to make a local copy of l402.a, then extract *and* delete bd0402.o,
and if you are ready, do not forget to restore l402.a.

Here my suggestion for g98.make (do not copy the comments with <=====).

l402.exe: $(EXTRAS) l402.a
         $(RUNFSP) -e m$* $(BSDDIR)/main.F
         $(RUNMAKE) $(MAKELOC) OPTFLAG='$(OPTFLAG)' $(EXTRAS) $*.a m$*.o
	cp l402.a local402.a    <=== MAKE LOCAL COPY
	ar x l402.a bs0402.o
	ar d l402.a bs0402.o    <=== DELETE bd0402.a from l402.a
         $(RUNF77) $(FFLAGS) -o $*.exe m$*.o $(EXTOBJ) $*.a bd0402.o 
$(EXTRAS) $(
GAULIB) $(LIBS)
         rm -f m$*.* bd0402.o
	mv local402.a l402.a     <=== RESTORE l402.a

Try it. If it works, tell me.

-- 
+---------------------------------+-------------------------------------+
| Prof. Christoph van Wullen      | Tele-Phone (+49) (0)30 314 27870    |
| Technische Universitat Sekr. C3 | Tele-Fax   (+49) (0)30 314 23727    |
| Strasse des 17. Juni 135        | eMail                               |
| D-10623 Berlin, Germany         | [email-masked]    |
+---------------------------------+-------------------------------------+