Compilation fails (PR#209)

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Mon, 14 Jun 1999 18:26:39 +0200 (CEST)


>>>>> Frank Beimfohr writes:

>> Hi,
>>

(As an aside.  This thread is quickly becoming extremely inefficient.  I
am certainly willing to fix configuration/build problems, but if I ask
SPECIFIC questions then I really need specific answers.)

>> there are three different things going on here:
>> (1) gmake by default has the option "-w" set, which is why you see
>> these "Entering/Leaving directory ..." messages.  This option finds a
>> way into the make flags when the system default make is called.  Not
>> quite sure how, but don't blame it on configure.  Makeconf et. al. is
>> more likely.

I don't see how the system default could be called.  The instructions
say that if you want to use non-default make, then you need to do
(assuming a Bourne shell)

	MAKE=/the/make/you/want ./configure
	/the/make/you/want

>> (2) Very annoyingly, modreg doesn't use the $(SHLIBLD) command but
>> calls R with SHLIB as option.  Which is nothing you are interested in,
>> but is a bad thing, IMHO.

Good point.  Will have a look.

>> (3) g77 croaks on -PIC: for this you may have to blame xmkmf (which
>> configure uses.  Try to find out, what the default is.  Follow this example:
>> tmp $ touch Imakefile
>> tmp $ xmkmf
>> imake -DUseInstalled -I/usr/lib/X11/config
>> "./Imakefile", line 1: 1506-229 (W) File is empty.
>> tmp $ grep -i pic Makefile 
>> PICFLAGS = -bM\:SRE
>> (Results are for an AIX box.  Your output should look different.)

> I started 'configure' with the f2c- and without the g77-Option and used 
> /usr/ccs/bin/make instead of gmake (very flexible, isn't it ;) 

>   C compiler:               gcc -g -O2
>   FORTRAN compiler:         f2c 

> The modreg-directory is now compiled without any error.

> But while processing the mva-directory:

> mkdir ../../../library/mva/R
> gcc -g -O2 -fPIC -I../../../../include -c dblcen.c -o dblcen.o
> ld -G -o mva.so dblcen.o hclust.o kmns.o
> ld: fatal: file hclust.o: cannot open file; errno=2
> ld: fatal: file kmns.o: cannot open file; errno=2
> ld: fatal: File processing errors.  No output written to mva.so
> *** Error code 1
> make: Fatal error: Command failed for target `mva.so'
> Current working directory /sw/sun4_55/R-0.65.0/src/library/mva/src
> *** Error code 1
> make: Fatal error: Command failed for target `all'

What is the rule for .f.o?  Apparently, the Fortran sources did not get
compiled ...

> What happens here? I compiled R 0.63.0 without any problem....

The point is that, and I think I explained that on r-devel, we need to
find a solution for Fortran compilation.  Many compilers, such as g77,
typically produce objects which still need to be linked against other
libraries (libg2c.a for recent versions of g77).

The problem can be overcome in two ways:  either use the Fortran
compiler for linking, or use $CC/ld and get the extra flags right.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._