Skip to content

FreeBSD 7.0-CURRENT and R-2.2.0 alpha

4 messages · Brian Ripley, Rainer Hurling

#
The configure script runs fine, but when I compile todays alpha version
of R-2.2.0 (R-alpha_2005-09-10_r35546.tar.gz) under FreeBSD 7.0-CURRENT
from Sept. 4th I get the following output:


========================================================
[...]
gcc -I../../src/extra/zlib -I../../src/extra/bzip2
-I../../src/extra/pcre   -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -D__NO_MATH_INLINES  -g -O2 -c
version.c -o version.o
gcc -I../../src/extra/zlib -I../../src/extra/bzip2
-I../../src/extra/pcre   -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -D__NO_MATH_INLINES  -g -O2 -c
vfonts.c -o vfonts.o
f77   -g -O2 -c xxxpr.f -o xxxpr.o
gcc -export-dynamic -L/usr/local/lib -o R.bin  Rmain.o  CConverters.o
CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o
apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o
colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o
debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o
engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o
gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o
logic.o main.o mapply.o match.o memory.o model.o names.o objects.o
optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o
plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o
qsort.o random.o regex.o registration.o relop.o saveload.o scan.o seq.o
serialize.o size.o sort.o source.o split.o sprintf.o startup.o
subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o
version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a
../nmath/libnmath.a  -lf77blas -latlas -lg2c -lm  ../extra/zlib/libz.a
../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a
/usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -lm
-liconv
complex.o(.text+0x106): In function `mycpow':
/usr/local/R-alpha/src/main/complex.c:170: undefined reference to `cpow'
complex.o(.text+0x6f9): In function `do_cmathfuns':
/usr/local/R-alpha/src/main/complex.c:323: undefined reference to `carg'
complex.o(.text+0xb4b): In function `z_log':
/usr/local/R-alpha/src/main/complex.c:423: undefined reference to `clog'
complex.o(.text+0xb86): In function `z_logbase':
/usr/local/R-alpha/src/main/complex.c:429: undefined reference to `clog'
complex.o(.text+0xb98):/usr/local/R-alpha/src/main/complex.c:429:
undefined reference to `clog'
complex.o(.text+0xbd8): In function `z_exp':
/usr/local/R-alpha/src/main/complex.c:434: undefined reference to `cexp'
complex.o(.text+0xbf8): In function `z_sqrt':
/usr/local/R-alpha/src/main/complex.c:439: undefined reference to `csqrt'
complex.o(.text+0xc18): In function `z_cos':
/usr/local/R-alpha/src/main/complex.c:486: undefined reference to `ccos'
complex.o(.text+0xc38): In function `z_sin':
/usr/local/R-alpha/src/main/complex.c:491: undefined reference to `csin'
complex.o(.text+0xc5e): In function `z_tan':
/usr/local/R-alpha/src/main/complex.c:497: undefined reference to `ctan'
complex.o(.text+0xd26): In function `z_atan2':
/usr/local/R-alpha/src/main/complex.c:523: undefined reference to `catan'
complex.o(.text+0xe18): In function `z_asin':
/usr/local/R-alpha/src/main/complex.c:541: undefined reference to `casin'
complex.o(.text+0xe38): In function `z_acos':
/usr/local/R-alpha/src/main/complex.c:553: undefined reference to `cacos'
complex.o(.text+0xe58): In function `z_atan':
/usr/local/R-alpha/src/main/complex.c:559: undefined reference to `catan'
complex.o(.text+0xe78): In function `z_acosh':
/usr/local/R-alpha/src/main/complex.c:564: undefined reference to `cacosh'
complex.o(.text+0xe98): In function `z_asinh':
/usr/local/R-alpha/src/main/complex.c:569: undefined reference to `casinh'
complex.o(.text+0xeb8): In function `z_atanh':
/usr/local/R-alpha/src/main/complex.c:574: undefined reference to `catanh'
complex.o(.text+0xed8): In function `z_cosh':
/usr/local/R-alpha/src/main/complex.c:579: undefined reference to `ccosh'
complex.o(.text+0xef8): In function `z_sinh':
/usr/local/R-alpha/src/main/complex.c:584: undefined reference to `csinh'
complex.o(.text+0xf18): In function `z_tanh':
/usr/local/R-alpha/src/main/complex.c:589: undefined reference to `ctanh'
*** Error code 1
Stop in /usr/local/R-alpha/src/main.
*** Error code 1
Stop in /usr/local/R-alpha/src/main.
*** Error code 1
Stop in /usr/local/R-alpha/src.
*** Error code 1
Stop in /usr/local/R-alpha.
========================================================

Am I missing something?

Thank you,
Rainer Hurling
#
These were found by AC_CHECK_FUNCS (please confirm what configure said) so 
most likely some macro needs to be set or header included.

Could you please find out how configure managed to find cpow etc when they 
appear not to be in libc/libm?
On Sat, 10 Sep 2005, Rainer Hurling wrote:

            

  
    
13 days later
#
Sorry for my very late answer. On Sept. 12th I got an unexpected 
business trip until yesterday evening, so I had no chance to try out.


Thank you for the hints. But I am afraid I have no idea how to extract 
the needed information.

With R-2.2.0 (R-beta_2005-09-22_r35658.tar.gz) I tried the following:

nm /usr/lib/libc.a | grep cpow
nm /usr/lib/libm.a | grep cpow

In both cases without any result.

Where I have to look? Or what else can I do to find out where the libs 
with these procedures are?

Rainer Hurling
Prof Brian Ripley wrote:
#
As I said before I experience difficulties to evaluate what configure 
has found.

The place in R's config.log, where 'cpow' fails, sais:

------------------------
configure:32656: checking for cpow
configure:32721: gcc -o conftest -g -O2 -D__NO_MATH_INLINES 
-I/usr/local/include -L/usr/local/lib conftest.c -lm  >&5
conftest.c:165: warning: conflicting types for built-in function 'cpow'
/var/tmp//cc4mUk2D.o(.text+0x14): In function `main':
/usr/local/R-beta/conftest.c:189: undefined reference to `cpow'
/var/tmp//cc4mUk2D.o(.data+0x0):/usr/local/R-beta/conftest.c:188: 
undefined reference to `cpow'
configure:32727: $? = 1
configure: failed program was:
| /* confdefs.h.  */
[...]
------------------------

It is almost the same for the other references. If desired, I can send 
config.log.



In FreeBSD's '/usr/include' I found the header-file 'tgmath.h' which 
defines the following:

#define	pow(x, y)	__tg_impl_full(x, x, y, pow, powf, powl,\
			    cpow, cpowf, cpowl, x, y)
#define	carg(x)		__tg_simple(x, carg)

Up to now I have no idea, where the rest (clog, cexp, csqrt ...) is 
defined in FreeBSD.


I am not familiar with configure scripts, autoconf and automake. So I am 
afraid I need more guidance to progress.

Rainer Hurling
> Prof Brian Ripley wrote:
> These were found by AC_CHECK_FUNCS (please confirm what configure said)
 > so most likely some macro needs to be set or header included.
 >
 > Could you please find out how configure managed to find cpow etc when
 > they appear not to be in libc/libm?