Subject: Re: linking problems with f2c
From: [email-masked] (Satish Balay)

25 Feb 1997 14:01:18 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-To: Dinesh Jindal <[email-masked]>
Original-cc: [email-masked]
In-Reply-To: <[email-masked]>
Original-Sender: [email-masked]

I encountered the same problem when compiling the f2clibs.

The simple work arround is to edit the makefile and comment
out the processing with ld as:
..c.o:
	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c

#	mv $*.xxx $*.o
#	ld -r -x -o $*.xxx $*.o
***********
	I'm guessing the processing with ld is not required.
	According the manpages (for ld) all it does is reduce the
	size of the .o files slightly.

	Also you would have to edit the libI77/makefile and
	add the flag -DNON_UNIX_STDIO as:
..c.o:
	$(CC) -c -DNON_UNIX_STDIO -DSkip_f2c_Undefs $(CFLAGS) $*.c
	to get one of the files to compile.

Satish

On Tue, 25 Feb 1997, Dinesh Jindal wrote:

> I am using cygwin-gnu b17.1 on NT4.0.
> In the project I am porting from Unix, there are a couple of fortran
> files. I used f2c to convert those to C and then compiled using gcc.
> At link time I am getting follwing errors:
> 
> /usr/local/lib/libf2c.a(rdfmt.o)(.bss+0x400000):rdfmt.c: multiple
> definition of `_bss_start__'
> /usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
> here
> /usr/local/lib/libf2c.a(rdfmt.o)(.bss+0x400100):rdfmt.c: multiple
> definition of `_bss_end__'
> /usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
> here
> /usr/local/lib/libf2c.a(wrtfmt.o)(.data+0x400000):wrtfmt.c: multiple
> definition of `_bss_start__'
> /usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
> here
> ...etc...
> 
> using -z muldefs doesn't help.
> 
> Could someone please suugest as to what might be wrong.
> 
> While building libI77.a and libF77.a (from f2c sources), and hence
> libf2c.a,  I had to remove -x option from 'ld -r ..' in the makefile. 
> With -x option in place I was getting following errors: 
> libI77/wrtfmt.o(.text+0xca00):wrtfmt.c: reloc refers to symbol `text'
> which is not being output
> libI77/xwsne.o(.text+0xd150):xwsne.c: reloc refers to symbol `data'
> which is not being output
> ...etc...
> 
> Are these two problems related? How do I workaround it.
> 
> Cheers!
> Dinesh Jindal.
> 
> -
> For help on using this list, send a message to
> "[email-masked]" with one line of text: "help".
> 

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".