[Rd] Re: [R] Newbie questions

Zsombor Cseres-Gergely z.cseres-gergely@ucl.ac.uk
Sat, 4 Nov 2000 21:23:18 +0000

Content-Type: text/plain; charset=us-ascii

On Tue, Oct 31, 2000 at 02:57:36PM -0500, Duncan Temple Lang wrote:
> Just a quick thought....

> many of them are in the R executable (R.bin). Perhaps the linking and
> loading mechanisms in Hurd do not export these symbols from the
> application in a way that shared libraries can find them.  Or it may
> be as simple as the flag passed to dlopen() not being RTLD_GLOBAL
> (although that shouldn't matter).

There is something with the hurd ld.so, but I do not know, what. But I 

1) run 'make test' with --gui=none. It went up till dies with
> library("eda") # returns invisibly
Error in dyn.load(x, as.logical(local), as.logical(now)) : 
	unable to load shared library "/home/zs/R-1.1.1/library/eda/libs/eda.so":
  /home/zs/R-1.1.1/library/eda/libs/eda.so: undefined symbol: R_rsort
Error in library("eda") : .First.lib failed
Execution halted

Everything goes well in Linux with the same source (R-1.1.1)

2) compared the configure.log-s from the Hurd and Linux. There are similar
errors in both (due to the missing tcl/tk and atlas [what is this? I have not
found it anywhere] libraries, and that ld can not find -lmoto and -lz, and
others), but also ones special to the Hurd. Here they are:

configure:7358: (Each undeclared identifier is reported only once
configure:7358: for each function it appears in.)
configure:7358: parse error before `me'
configure: failed program was:
#line 7343 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
configure:7406: gcc -o conftest -g -O2 -I/usr/local/include  conftest.c -lipc  -ldl -lncurses -lm -L/usr/local/lib 1>&5
/usr/bin/ld: cannot find -lipc
collect2: ld returned 1 exit status
configure: failed program was:
#line 7395 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */

3) sent a message to the Hurd folks. One reply was this:

<quote on>

The correct linker options for this sort of issue are the same as on Linux.
Perhaps their build scripts behave differently on Linux than on Hurd.  It
sounds like they expect to link the main executable with --export-dynamic
(aka -E).  Use nm --dynamic or objdump --dynamic-syms to see what symbols
are defined in the executable on Linux and on Hurd.

<quote off>

I did this (nm) for both the Hurd and Linux. The resulting list is significantly
different, with a 33k list for Linux and a 3k list for the Hurd. I enclose the
latter (I suppose the previous is correct and reproducible).

General remark:

I use Debian 2.2 (potato) with the stable tools. The hurd uses woody tools.
The only difference apart from this that I use f2c in Linux, bug f77 in the
Hurd. (I will try f2s on the Hurd as well)

Next step?


Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="Rsym.hurd"

08174cfc A _DYNAMIC
08174db4 A __bss_start
08174de0 B __ctype_b
08174dc4 B __ctype_tolower
08174ddc B __ctype_toupper
0816cac0 D __data_start
         w __deregister_frame_info
08174dc8 B __environ
         w __gmon_start__
         U __h_errno_location
08174dc0 B __hurd_sigthread_stack_base
08174dd8 B __hurd_sigthread_stack_end
08174de8 B __hurd_sigthread_variables
08174dcc B __hurd_threadvar_stack_mask
08174dd0 B __hurd_threadvar_stack_offset
         U __libc_clk_tck
         U __libc_start_main
         w __register_frame_info
         U __sigsetjmp
         U __strdup
         U __strtod_internal
         U __strtol_internal
         U __xstat
08174db4 A _edata
081a7e40 A _end
08174dc8 V _environ
08106f58 A _etext
08106f3c ? _fini
08049b8c ? _init
         U abort
         U accept
         U acos
         U acosh
         U asin
         U asinh
         U atan
         U atan2
         U atanh
         U bind
         U calloc
         U ceil
         U chdir
         U clearerr
         U close
         U closedir
         U connect
         U cos
         U cosh
         U ctime
         U dlclose
         U dlerror
         U dlopen
         U dlsym
08174dc8 V environ
         U exit
         U exp
         U fclose
         U fflush
         U fgetc
         U fgets
         U fileno
         U finite
         U floor
         U fmod
         U fopen
         U fork
         U fprintf
         U fputc
         U fputs
         U fread
         U free
         U fscanf
         U fwrite
         U getcwd
         U getenv
         U gethostbyaddr
         U gethostbyname
         U getpid
         U hypot
         U isatty
         U isnan
         U listen
         U log
         U log10
         U malloc
0804a730 T matherr
         U memcpy
         U modf
         U opendir
         U pclose
         U popen
         U pow
         U printf
         U rand
080ba6e0 T re_compile_fastmap
080bc884 T re_compile_pattern
080bacd0 T re_match
080bacf4 T re_match_2
081734ec D re_max_failures
080baa8c T re_search
080baab4 T re_search_2
080baa40 T re_set_registers
080b7e90 T re_set_syntax
081734a4 D re_syntax_options
         U readdir
         U realloc
         U recv
080bc8b4 T regcomp
080bcb00 T regerror
080bc9d8 T regexec
080bcb7c T regfree
         U remove
         U select
         U send
         U setlocale
         U sigaction
         U sigaddset
         U sigemptyset
         U siglongjmp
         U signal
081a7e3c B signgam
         U sigprocmask
         U sin
         U sinh
         U socket
         U sprintf
         U sqrt
         U sscanf
08174de4 B stdin
08174dd4 B stdout
         U strcat
         U strchr
         U strcmp
         U strcoll
         U strcpy
         U strncat
         U strncmp
         U strncpy
         U strrchr
         U strtok
         U system
         U tan
         U tanh
         U time
         U times
         U tmpnam
         U ungetc
         U unlink
         U vfprintf
         U vsnprintf
         U vsprintf
         U waitpid
         U xdr_bytes
         U xdr_double
         U xdr_int
         U xdr_string
         U xdrstdio_create

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