From buerkla at uwec.edu  Tue Apr 29 21:24:13 2003
From: buerkla at uwec.edu (buerkla@uwec.edu)
Date: Tue Apr 29 20:24:25 2003
Subject: [Rd] 
	configure succeeds without dlfcn.h, but fails to compile (OS X)
	(PR#2875)
Message-ID: <200304291824.h3TIOD2b027864@pubhealth.ku.dk>

Full_Name: Alex Buerkle
Version: 1.7.0
OS: OS X 
Submission from: (NULL) (137.28.112.199)


The configure of R-1.7.0 completed, but the build fails with error
below.  This failure appears to be because dlfcn.h was missing (installing it
fixed the problem).  

The possible bug:  my limited ability to read ./configure suggests that it tests
for dlfcn.h, but does not fail if it doesn't find it on Darwin/OS X.  Given that
it is required to compile, it seems like configure should fail.  
 

This error was reported in June 2002
(http://maths.newcastle.edu.au/~rking/R/help/02a/4783.html) and discussed
briefly in a thread I started on R-SIG-Mac, which contains a few more details
(https://www.stat.math.ethz.ch/pipermail/r-sig-mac/2003-April/000832.html).

The error:

./configure --enable-R-shlib --with-x \
--with-blas='-framework vecLib' \
--with-lapack

...

./make 

...

making strdup.d from strdup.c
making strncasecmp.d from strncasecmp.c
making vsnprintf.d from vsnprintf.c
gcc   -I../../src/extra/pcre -no-cpp-precomp -I. -I../../src/include
-I../../src/include -I/sw/include -DHAVE_CONFIG_H   -g -O2 -c
CConverters.c -o CConverters.o
gcc   -I../../src/extra/pcre -no-cpp-precomp -I. -I../../src/include
-I../../src/include -I/sw/include -DHAVE_CONFIG_H   -g -O2 -c
Rdynload.c -o Rdynload.o
Rdynload.c: In function `R_FindSymbol':
Rdynload.c:1036: `CFunTab' undeclared (first use in this function)
Rdynload.c:1036: (Each undeclared identifier is reported only once
Rdynload.c:1036: for each function it appears in.)
make[3]: *** [Rdynload.o] Error 1
make[2]: *** [R] Error 2
make[1]: *** [R] Error 1
make: *** [R] Error 1



Fix for the user:
The fink package dlcompat-dev is required, as it contains /sw/include/dlfcn.h.


[Rd] configure succeeds without dlfcn.h, but fails to compile (OS X) (PR#2875)
buerkla@uwec.edu