Re: R-alpha: compiling R 0.11 on Linux

Douglas Bates (bates@stat.wisc.edu)
Thu, 12 Sep 96 11:19 CDT


Message-Id: <m0v1EUa-0000TpC@franz.stat.wisc.edu>
Date: Thu, 12 Sep 96 11:19 CDT
From: Douglas Bates <bates@stat.wisc.edu>
To: Fredrik Glockner <fredrigl@math.uio.no>
Subject: Re: R-alpha: compiling R 0.11 on Linux
In-Reply-To: <199609120803.KAA02902@biopc43.uio.no>

>>>>> "Fredrik" == Fredrik Glockner <fredrigl@math.uio.no> writes:

  Fredrik> I feel somewhat stupid asking such a basic question on this
  Fredrik> list: I'm trying to compile R 0.11 on my linux box, and it
  Fredrik> seems to me that i'm missing a couple of files.  I get the
  Fredrik> following message at the end of compiling:

  Fredrik> So I think I'm missing the file `dlfcn.h'.  Having looked
  Fredrik> at the file `dlfcn.h' in the R/src/compat/HP/dlfcn.h
  Fredrik> directory, it also seems that I am missing the file `dl.h'.

  Fredrik> Am I doing something wrong?

This will depend on the version of the Linux kernel and development
tools that you are using.  Recently the binary format of executables
was changed from the "a.out" format to the Executable and Loadable
File (ELF) format.  A Linux system with the development tools for ELF
should have an include file /usr/include/dlfcn.h.  My copy from the
Debian 1.1 distribution is appended below.

If your Linux operating system is not set up for compiling ELF
executables, you should configure R as
 cd $RHOME/src
 make realclean
 ./configure Linux-a.out
and try to compile again.

I think the best indicator of ELF vs a.out is the version of gcc you
have installed.  On my system I get
 bash$ gcc -v
 Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.1/specs
 gcc version 2.7.2.1

You can also check the version of libc in /usr/lib.  Notice that
version 5.2.18 is ELF and version 4.x.x is a.out.

 bash$ /sbin/ldconfig -p
 61 libs found in cache `/etc/ld.so.cache' (version 1.7.0)
	  1 - ELF libz.so.1 => /usr/lib/libz.so.1.0.3
	  2 - ELF libz.so.1 => /usr/lib/libz.so.1.0
	  3 - ELF libvgagl.so.1 => /usr/lib/libvgagl.so.1.2.8
	  4 - ELF libvga.so.1 => /usr/lib/libvga.so.1.2.8
	  5 - ELF libtk4.1.so.1 => /usr/lib/libtk4.1.so.1
	  6 - ELF libtk4.0.so.1 => /usr/lib/libtk4.0.so.1
	  7 - ELF libtiff.so.3 => /usr/lib/libtiff.so.3.4.035
	  8 - ELF libtcl7.5.so.1 => /usr/lib/libtcl7.5.so.1
	  9 - ELF libtcl7.4.so.1 => /usr/lib/libtcl7.4.so.1
	 10 - ELF libstdc++.so.27 => /usr/lib/libstdc++.so.27.1.0
	 11 - ELF libss.so.2 => /lib/libss.so.2.0
	 12 - ELF libreadline.so.2.0 => /lib/libreadline.so.2.0
	 13 - ELF libpthreads.so.1 => /usr/lib/libpthreads.so.1.60.beta2
	 14 - ELF libproc.so.1.01a => /lib/libproc.so.1.01a
	 15 - ELF libpng.so.1 => /usr/lib/libpng.so.1.0.88
	 16 - ELF libpng.so.1 => /usr/lib/libpng.so.1.0
	 17 - ELF libpaper.so.1 => /usr/lib/libpaper.so.1.0.2
	 18 - ELF libpanel.so.3.0 => /usr/lib/libpanel.so.3.0
	 19 - ELF libobjects.so.0 => /usr/lib/libobjects.so.0.1.19
	 20 - ELF libncurses.so.3.0 => /lib/libncurses.so.3.0
	 21 - ELF libmsql.so.1 => /usr/lib/libmsql.so.1.0.16
	 22 - ELF libmenu.so.3.0 => /usr/lib/libmenu.so.3.0
	 23 - ELF libm.so.5 => /lib/libm.so.5.0.5
	 24 - DLL libm.so.4 => /lib/libm.so.4.6.27
	 25 - ELF libjpeg.so.6a => /usr/lib/libjpeg.so.6a.0.0
	 26 - ELF libhistory.so.2.0 => /usr/lib/libhistory.so.2.0
	 27 - ELF libglut.so.3 => /usr/lib/libglut.so.3.1
	 28 - ELF libgdbm.so.1 => /usr/lib/libgdbm.so.1.7.3
	 29 - ELF libg++.so.27 => /usr/lib/libg++.so.27.1.0
	 30 - ELF libforms.so.0.81 => /usr/X11R6/lib/libforms.so.0.81
	 31 - ELF libform.so.3.0 => /usr/lib/libform.so.3.0
	 32 - ELF libf2c_i2.so.2 => /usr/lib/libf2c_i2.so.2.1
	 33 - ELF libf2c.so.2 => /usr/lib/libf2c.so.2.1
	 34 - ELF libext2fs.so.2 => /lib/libext2fs.so.2.0
	 35 - ELF libelf.so.0 => /usr/lib/libelf.so.0.5.2
	 36 - ELF libe2p.so.2 => /lib/libe2p.so.2.1
	 37 - ELF libdl.so.1 => /lib/libdl.so.1.8.2
	 38 - ELF libdb.so.1 => /usr/lib/libdb.so.1.85.2
	 39 - DLL libdb.so.1 => /usr/lib/i486-linuxaout/libdb.so.1.85.1
	 40 - DLL libcurses.so.0 => /lib/libcurses.so.0.1.2
	 41 - ELF libcom_err.so.2 => /lib/libcom_err.so.2.0
	 42 - ELF libc.so.5 => /lib/libc.so.5.2.18
	 43 - DLL libc.so.4 => /lib/libc.so.4.6.27
	 44 - ELF libXtst.so.6 => /usr/X11R6/lib/libXtst.so.6.0
	 45 - ELF libXt.so.6 => /usr/X11R6/lib/libXt.so.6.0
	 46 - ELF libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4.7
	 47 - ELF libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6.0
	 48 - ELF libXi.so.6 => /usr/X11R6/lib/libXi.so.6.0
	 49 - ELF libXext.so.6 => /usr/X11R6/lib/libXext.so.6.0
	 50 - ELF libXaw.so.6 => /usr/X11R6/lib/libXaw.so.6.0
	 51 - ELF libXIE.so.6 => /usr/X11R6/lib/libXIE.so.6.0
	 52 - ELF libX11.so.6 => /usr/X11R6/lib/libX11.so.6.0
	 53 - ELF libSM.so.6 => /usr/X11R6/lib/libSM.so.6.0
	 54 - ELF libPEX5.so.6 => /usr/X11R6/lib/libPEX5.so.6.0
	 55 - ELF libMesatk.so.1 => /usr/lib/libMesatk.so.1.2.8
	 56 - ELF libMesaaux.so.1 => /usr/lib/libMesaaux.so.1.2.8
	 57 - ELF libMesaGLw.so.1 => /usr/lib/libMesaGLw.so.1.2.8
	 58 - ELF libMesaGLU.so.1 => /usr/lib/libMesaGLU.so.1.2.8
	 59 - ELF libMesaGL.so.1 => /usr/lib/libMesaGL.so.1.2.8
	 60 - ELF libMagick.so.3.7 => /usr/X11R6/lib/libMagick.so.3.7.5
	 61 - ELF libICE.so.6 => /usr/X11R6/lib/libICE.so.6.0

Hope this helps.

-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/

------- cut here for /usr/include/dlfcn.h ---------
#ifndef DLFCN_H
#define DLFCN_H

#include <features.h>

/*
 * Various defines and so forth for the dynamic linker
 */

/* For dlopen () */
#define RTLD_LAZY	1
#define RTLD_NOW	2
#define RTLD_GLOBAL	0x100

/* For dlsym */
#define RTLD_NEXT	((void *)-1)

__BEGIN_DECLS

/* The usual prototypes.  We use void * instead of the actual
 * datatype - the user does not manipulate the handles at all.
 */
 
extern void * dlopen __P((__const char * __filename, int __flag));
extern __const char * dlerror __P((void));
extern void * dlsym __P((void *, __const char *));
extern int dlclose __P((void *));

__END_DECLS

#endif
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-