Re: [Rd] R doesn't compile on FreeBSD 10.2
On 31/08/2015 16:26, Davor Cubranic wrote: Prof Brian Ripley writes: Second, we don't have all the pertinent information such as the configure options used and the architecture (x86_64?). I am going to have to guess none as none were mentioned, but using --enable-R-shlib would be pertinent. On 31/08/2015 05:47, Davor Cubranic wrote: On FreeBSD 10.2, I get the following error when compiling R from the Subversion trunk (with "configure && make"): You have not told us which revision. A basic check is to see if you can build the latest released version, as the trunk is 'Under development'. As suggested, I tried compiling from Subversion tag 3.2.2 (r69054). I used no command-line options to 'configure', as mentioned in my previous email, and this is the output: R is now configured for x86_64-unknown-freebsd10.2 Source directory: . Installation directory:/usr/local C compiler:cc -g -O2 Fortran 77 compiler: gfortran48 -g -O2 C++ compiler: c++ -g -O2 C++ 11 compiler: c++ -std=c++11 -g -O2 Fortran 90/95 compiler:gfortran48 -g -O2 Obj-C compiler: cc -g -O2 -fobjc-exceptions Interfaces supported: X11, tcltk External libraries:readline, zlib, bzlib, lzma, PCRE, curl Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU Options enabled: shared BLAS, R profiling Capabilities skipped: Options not enabled: memory profiling Recommended packages: yes (I thought this, and more, would be included in config.log, but please let me know if there is other place to get the configuration details that are relevant.) You need to tell us exactly which commands you used: nowhere records everything. Still the same error: --- tools.so --- cc -shared -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o --- all --- --- shlib --- mkdir ../../../../library/tools/libs --- sysdata --- installing 'sysdata.rda' Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/home/davor/R-3.2.2/library/tools/libs/tools.so': /usr/home/davor/R-3.2.2/library/tools/libs/tools.so: Undefined symbol "R_ClassSymbol" Error: unable to load R code in package 'tools' Execution halted Here is a series of checks for that symbol (results from a working Linux system): auk% nm -g bin/exec/R | grep R_ClassSymbol 00962ec0 B R_ClassSymbol auk% nm -g src/main/main.o | grep R_ClassSymbol 0008 C R_ClassSymbol auk% nm -g library/tools/libs/tools.so | grep R_ClassSymbol U R_ClassSymbol auk% nm -g src/library/tools/src/gramRd.o | grep R_ClassSymbol U R_ClassSymbol Interestintly, checking for R_ClassSymbol gives the same output as on your working Linux system: ~/R-3.2.2$ nm -g bin/exec/R | grep R_ClassSymbol 008f8ff8 B R_ClassSymbol ~/R-3.2.2$ nm -g src/main/main.o | grep R_ClassSymbol 0008 C R_ClassSymbol ~/R-3.2.2$ nm -g library/tools/libs/tools.so | grep R_ClassSymbol U R_ClassSymbol ~/R-3.2.2$ nm -g src/library/tools/src/gramRd.o | grep R_ClassSymbol U R_ClassSymbol So R_ClassSymbol is unresolved in the tools package and should be resolved by loading into the main R executable. On Linux that is achieved by the linker flag -Wl,--export-dynamic as part of MAIN_LDFLAGS in Makeconf in the top-level directory. We have in configure.ac freebsd*) main_ldflags="-export-dynamic" shlib_ldflags="-shared" but those were from the days when FreeBSD used gcc, and it is possible that your use of clang[*] requires -Wl,--export-dynamic . If so, add to config.site MAIN_LDFLAGS="-Wl,--export-dynamic" It would also be worth trying a build with --enable-R-shlib, as that resolves R_ClassSymbol and similar differently. I tried 'configure --enable-R-shlib', still the same error. I then tried adding MAIN_LDFLAGS as you suggested, and the install worked. Thanks you very much! ("make check" fails in datetime.R, but that's something I'll follow up in a separate email.) Should configure.ac be changed to account for this on FreeBSD's using clang? (I should probably also try compiling with GCC, which I had to install anyways for gfortran.) It is more complicated than that, in the absence of any definitive FreeBSD documentation. There are five possibilities: -export-dynamic -rdynamic -Wl,--export-dynamic -Wl,-export-dynamic -Wl,-E The first two work for GCC (and have for a long time, although only the second is currently documented) and are accepted by compilers claiming to be GCC-compliant (clang and icc). That clang does nothing with the first seems a clear bug in clang (at least on some OSes (which from the sources do include FreeBSD) it does support the second and maps it t
Re: [Rd] Packages required but not available:
Note this bullet in the CRAN policies: Packages on which a CRAN package depends should be available from a mainstream repository: if any mentioned in ‘Suggests’ or ‘Enhances’ fields are not from such a repository, where to obtain them at a repository should be specified in an ‘Additional_repositories’ field of the DESCRIPTION file (as a comma-separated list of repository URLs) or for other means of access, described in the ‘Description’ field. A number of people have had success using Dirk's drat package to make such additional repositories. Hadley On Mon, Aug 31, 2015 at 1:21 PM, RKoenker wrote: > I misunderstood this message, and now realize that it was attributable to the > (obvious) fact that these extra > packages were not installed on MY machine since I'd just upgraded to > R-devel. The pogs package still produces > a NOTE, but hopefully that is not a deal breaker for CRAN. > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Packages-required-but-not-available-tp4711662p4711685.html > Sent from the R devel mailing list archive at Nabble.com. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- http://had.co.nz/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Packages required but not available:
I misunderstood this message, and now realize that it was attributable to the (obvious) fact that these extra packages were not installed on MY machine since I'd just upgraded to R-devel. The pogs package still produces a NOTE, but hopefully that is not a deal breaker for CRAN. -- View this message in context: http://r.789695.n4.nabble.com/Packages-required-but-not-available-tp4711662p4711685.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R doesn't compile on FreeBSD 10.2
Prof Brian Ripley writes: > Second, we don't have all the pertinent information such as the > configure options used and the architecture (x86_64?). I am going to > have to guess none as none were mentioned, but using --enable-R-shlib > would be pertinent. > > On 31/08/2015 05:47, Davor Cubranic wrote: >> On FreeBSD 10.2, I get the following error when compiling R from the >> Subversion trunk (with "configure && make"): > > You have not told us which revision. A basic check is to see if you can > build the latest released version, as the trunk is 'Under development'. As suggested, I tried compiling from Subversion tag 3.2.2 (r69054). I used no command-line options to 'configure', as mentioned in my previous email, and this is the output: R is now configured for x86_64-unknown-freebsd10.2 Source directory: . Installation directory:/usr/local C compiler:cc -g -O2 Fortran 77 compiler: gfortran48 -g -O2 C++ compiler: c++ -g -O2 C++ 11 compiler: c++ -std=c++11 -g -O2 Fortran 90/95 compiler:gfortran48 -g -O2 Obj-C compiler: cc -g -O2 -fobjc-exceptions Interfaces supported: X11, tcltk External libraries:readline, zlib, bzlib, lzma, PCRE, curl Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU Options enabled: shared BLAS, R profiling Capabilities skipped: Options not enabled: memory profiling Recommended packages: yes (I thought this, and more, would be included in config.log, but please let me know if there is other place to get the configuration details that are relevant.) Still the same error: --- tools.so --- cc -shared -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o --- all --- --- shlib --- mkdir ../../../../library/tools/libs --- sysdata --- installing 'sysdata.rda' Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/home/davor/R-3.2.2/library/tools/libs/tools.so': /usr/home/davor/R-3.2.2/library/tools/libs/tools.so: Undefined symbol "R_ClassSymbol" Error: unable to load R code in package 'tools' Execution halted > Here is a series of checks for that symbol (results from a working Linux > system): > > auk% nm -g bin/exec/R | grep R_ClassSymbol > 00962ec0 B R_ClassSymbol > > auk% nm -g src/main/main.o | grep R_ClassSymbol > 0008 C R_ClassSymbol > > auk% nm -g library/tools/libs/tools.so | grep R_ClassSymbol > U R_ClassSymbol > > auk% nm -g src/library/tools/src/gramRd.o | grep R_ClassSymbol > U R_ClassSymbol Interestintly, checking for R_ClassSymbol gives the same output as on your working Linux system: ~/R-3.2.2$ nm -g bin/exec/R | grep R_ClassSymbol 008f8ff8 B R_ClassSymbol ~/R-3.2.2$ nm -g src/main/main.o | grep R_ClassSymbol 0008 C R_ClassSymbol ~/R-3.2.2$ nm -g library/tools/libs/tools.so | grep R_ClassSymbol U R_ClassSymbol ~/R-3.2.2$ nm -g src/library/tools/src/gramRd.o | grep R_ClassSymbol U R_ClassSymbol > So R_ClassSymbol is unresolved in the tools package and should be > resolved by loading into the main R executable. On Linux that is > achieved by the linker flag > > -Wl,--export-dynamic > > as part of MAIN_LDFLAGS in Makeconf in the top-level directory. We have > in configure.ac > >freebsd*) > main_ldflags="-export-dynamic" > shlib_ldflags="-shared" > > but those were from the days when FreeBSD used gcc, and it is possible > that your use of clang[*] requires -Wl,--export-dynamic . If so, add to > config.site > > MAIN_LDFLAGS="-Wl,--export-dynamic" > > It would also be worth trying a build with --enable-R-shlib, as that > resolves R_ClassSymbol and similar differently. I tried 'configure --enable-R-shlib', still the same error. I then tried adding MAIN_LDFLAGS as you suggested, and the install worked. Thanks you very much! ("make check" fails in datetime.R, but that's something I'll follow up in a separate email.) Should configure.ac be changed to account for this on FreeBSD's using clang? (I should probably also try compiling with GCC, which I had to install anyways for gfortran.) Davor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Build R on Haiku
On 31 August 2015 at 15:21, Prof Brian Ripley wrote: > On 14/08/2015 15:19, Joe S wrote: > >> Are there any checks I can do to the R binary to test if it works >> properly? >> > > This does not seem to be about the R binary, but about dynamically loaded > modules. (All those export lines are non-standard, BTW, and your output is > not from an ab initio build so we don't know e.g. how tools.so was built.) > The meat is > Yes, because etc/ldpaths doesn't get configured properly so I edited manually. I should fix the configure script to identify all the environment variables properly first. It may be causing problems further along. > > Error in .Call(PS_sigs, 1L) : > >first argument must be a string (of length 1) or native symbol > reference > > That comes from package tools, which contains the R code > > PS_sigs <- getDLLRegisteredRoutines("tools")[[c(".Call", "ps_sigs")]] > SIGHUP <- .Call(PS_sigs, 1L) > > So, startup R from the top-level build directory with something like > > env R_DEFAULT_PACKAGES=NULL bin/R > > and at the prompt run > > dyn.load("src/library/tools/src/tools.so") > getLoadedDLLs() # should include a line for tools > getDLLRegisteredRoutines("tools") > Indeed, I got that far myself in the meantime. > getLoadedDLLs() Filename Dynamic.Lookup base base FALSE tools /Store/d2/library/tools/libs/tools.so TRUE >getDLLRegisteredRoutines("tools") data frame with 0 columns and 0 rows > My guess is that does not list any symbols, in particular not ps_sigs. > > We can only speculate as to what went wrong (visibility issues? Mapping > symbols to u/case? ...). For now I will keep digging into what dyn.load() is doing and why the symbols are missing. Any tips are appreciated. Thanks Joe > nm -g library/tools/libs/tools.so 4178 B __bss_start U __ctype_get_mb_cur_max w __cxa_finalize w __deregister_frame_info w __register_frame_info 4178 D _edata 4198 B _end 2951 T _fini 4170 D _gSharedObjectHaikuABI 4174 D _gSharedObjectHaikuVersion 0b54 T _init U fclose U ferror U fopen U fread U free U get_image_symbol U INTEGER U kill U LENGTH U libintl_dgettext U malloc U mbcslocale U memcpy U R_CHAR U R_chk_calloc U R_chk_free U R_chk_realloc 19a0 T R_init_tools U R_NaInt U R_NaString U R_NilValue U R_registerRoutines U R_useDynamicSymbols U realloc U Rf_allocVector U Rf_asInteger U Rf_asLogical U Rf_coerceVector U Rf_error U Rf_getCharCE U Rf_install U Rf_isString U Rf_length U Rf_mbrtowc U Rf_mkChar U Rf_mkCharCE U Rf_protect U Rf_ScalarInteger U Rf_ScalarLogical U Rf_setAttrib U Rf_translateChar U Rf_unprotect U Rf_warning U Rprintf U SET_STRING_ELT U sprintf U strcmp U STRING_ELT U strlen U strncmp U TYPEOF [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Build R on Haiku
On 14/08/2015 15:19, Joe S wrote: Hi R-devel, I'm trying to get R 3.2.1 working on Haiku (an open source OS inspired by BeOS, not Linux based) on i586. With a few small changes to library paths and ifdefs I am able to get a seemingly working R binary. The build process stops with the 'tools' package. The last lines from make are below. Does anyone have any tips? I'm rather new to debugging at this low level. Are there any checks I can do to the R binary to test if it works properly? This does not seem to be about the R binary, but about dynamically loaded modules. (All those export lines are non-standard, BTW, and your output is not from an ab initio build so we don't know e.g. how tools.so was built.) The meat is > Error in .Call(PS_sigs, 1L) : >first argument must be a string (of length 1) or native symbol reference That comes from package tools, which contains the R code PS_sigs <- getDLLRegisteredRoutines("tools")[[c(".Call", "ps_sigs")]] SIGHUP <- .Call(PS_sigs, 1L) So, startup R from the top-level build directory with something like env R_DEFAULT_PACKAGES=NULL bin/R and at the prompt run dyn.load("src/library/tools/src/tools.so") getLoadedDLLs() # should include a line for tools getDLLRegisteredRoutines("tools") My guess is that does not list any symbols, in particular not ps_sigs. We can only speculate as to what went wrong (visibility issues? Mapping symbols to u/case? ...). Cheers Joe *** make[3]: Entering directory `/Store/buildr/src/library/tools' building package 'tools' make[4]: Entering directory `/Store/buildr/src/library/tools' all.R is unchanged make[4]: Leaving directory `/Store/buildr/src/library/tools' make[4]: Entering directory `/Store/buildr/src/library/tools' make[5]: Entering directory `/Store/buildr/src/library/tools/src' make[6]: Entering directory `/Store/buildr/src/library/tools/src' ../../../../library/tools/libs/tools.so is unchanged make[6]: Leaving directory `/Store/buildr/src/library/tools/src' make[5]: Leaving directory `/Store/buildr/src/library/tools/src' make[4]: Leaving directory `/Store/buildr/src/library/tools' make[4]: Entering directory `/Store/buildr/src/library/tools' installing 'sysdata.rda' export ADDON_PATH="%A/add-ons:/boot/home/config/non-packaged/add-ons:/boot/home/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons" export BEINCLUDES="/boot/system/develop/headers;/boot/system/develop/headers/be;/boot/system/develop/headers/posix;/boot/system/develop/headers/glibc;/boot/system/develop/headers/cpp;/boot/system/develop/headers/be/app;/boot/system/develop/headers/be/device;/boot/system/develop/headers/be/interface;/boot/system/develop/headers/be/locale;/boot/system/develop/headers/be/media;/boot/system/develop/headers/be/midi;/boot/system/develop/headers/be/midi2;/boot/system/develop/headers/be/net;/boot/system/develop/headers/be/kernel;/boot/system/develop/headers/be/storage;/boot/system/develop/headers/be/support;/boot/system/develop/headers/be/game;/boot/system/develop/headers/be/opengl;/boot/system/develop/headers/be/drivers;/boot/system/develop/headers/gnu;/boot/system/develop/headers/be/mail;/boot/system/develop/headers/be/translation;/boot/system/develop/headers/be/devel;/boot/system/develop/headers/be/add-ons/graphics;/boot/system/develop/headers/be/be_apps/Deskbar;/boot/system/develop/h! ea! ders/be/be_apps/NetPositive;/boot/system/develop/headers/be/be_apps/Tracker" export BE_HOST_CPU="x86" export BUILDHOME="/boot/system/develop" export GROUP="root" export HISTCONTROL="ignoredups" export HISTFILESIZE="500" export HOME="/boot/home" export JAVA_HOME="/packages/openjdk-1.7_2013_11_08-2/.self/lib/openjdk" export LC_ALL="C" export LC_COLLATE="en.UTF-8" export LC_CTYPE="en.UTF-8" export LC_MESSAGES="en.UTF-8" export LC_MONETARY="en.UTF-8" export LC_NUMERIC="en.UTF-8" export LC_TIME="en.UTF-8" export LC_TYPE="en_US.UTF-8" export LIBRARY_PATH="%A/lib:/boot/home/config/non-packaged/lib:/boot/home/config/lib:/boot/system/non-packaged/lib:/boot/system/lib:/Store/buildr/lib" export LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;43:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35
Re: [Rd] R doesn't compile on FreeBSD 10.2
First, this there is no evidence here of a 'compilation' failure: it seems to be about installation, and more specifically about loading dynamic libs. Second, we don't have all the pertinent information such as the configure options used and the architecture (x86_64?). I am going to have to guess none as none were mentioned, but using --enable-R-shlib would be pertinent. On 31/08/2015 05:47, Davor Cubranic wrote: On FreeBSD 10.2, I get the following error when compiling R from the Subversion trunk (with "configure && make"): You have not told us which revision. A basic check is to see if you can build the latest released version, as the trunk is 'Under development'. cc -shared -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o mkdir ../../../../library/tools/libs installing 'sysdata.rda' Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/home/davor/R-dev/R-trunk/library/tools/libs/tools.so': /usr/home/davor/R-dev/R-trunk/library/tools/libs/tools.so: Undefined symbol "R_ClassSymbol" Error: unable to load R code in package 'tools' Execution halted *** Error code 1 Stop. make[4]: stopped in /usr/home/davor/R-dev/R-trunk/src/library/tools The system is running a 64-bit FreeBSD 10.2-RELEASE-p4, with clang 3.4.1 and gfortran 4.8.5. Configure log is attached. Davor Here is a series of checks for that symbol (results from a working Linux system): auk% nm -g bin/exec/R | grep R_ClassSymbol 00962ec0 B R_ClassSymbol auk% nm -g src/main/main.o | grep R_ClassSymbol 0008 C R_ClassSymbol auk% nm -g library/tools/libs/tools.so | grep R_ClassSymbol U R_ClassSymbol auk% nm -g src/library/tools/src/gramRd.o | grep R_ClassSymbol U R_ClassSymbol So R_ClassSymbol is unresolved in the tools package and should be resolved by loading into the main R executable. On Linux that is achieved by the linker flag -Wl,--export-dynamic as part of MAIN_LDFLAGS in Makeconf in the top-level directory. We have in configure.ac freebsd*) main_ldflags="-export-dynamic" shlib_ldflags="-shared" but those were from the days when FreeBSD used gcc, and it is possible that your use of clang[*] requires -Wl,--export-dynamic . If so, add to config.site MAIN_LDFLAGS="-Wl,--export-dynamic" It would also be worth trying a build with --enable-R-shlib, as that resolves R_ClassSymbol and similar differently. [*] Unfortunately clang accepts many flags for gcc compatibility, but often silently ignores them. And it does not document fully which flags it actually implements. It is not much easier with gcc: e.g. 4.9.2 documents a flag -rdynamic with the same effect. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Buidling R from source on a server
Distro: Fedora 22 server rstudio server running I had to rebuild R from source in order to use Intel Compiler. The host is a server, with no X environment. I plan to use R either from CLI or from rstudio server. As for the configure option, I am not sure if I shall disable x and tcl-tk ( --with-x=no --with tcltk=no) or shall I enable it to fully use rstudio server ? Thank you for help. -- google.com/+arnaudgabourygabx __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel