3 Replies Latest reply: Mar 26, 2012 8:39 AM by user13277775 RSS

    Help compiling R using Solaris Studio

    RogerP
      I am trying to compile R 2.14 using the Solaris Studio. The configure command works, with some tweaking ;-), but it I get a lot of "symbols not found" error messages (see below).

      Has anyone been able to compile R with the Solaris Studio? Which libraries or files am I missing and how should I specify them.

      thanks in advance!
      Roger

      cc -m64 -xopenmp -L/opt/sunstudio12.1/lib/amd64 -o R.bin Rmain.o libR.a -library=sunperf\
      -R/opt/solstudio12.2/lib/amd64 -R/usr/local/bin/R-2.14.0/lib64 -R/user/openwin/lib -lfai -lfui -lfsu -lsunquad -lsunmath -lmtsk -lm -lnsl\
      -lsocket -lrt -ldl -lm -licuuc -licui18n

      cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
      Undefined               first referenced
      symbol                in file
      cg_ libR.a(registration.o)
      ch_ libR.a(registration.o)
      rg_ libR.a(registration.o)
      rs_ libR.a(registration.o)
      Rz_uncompress libR.a(connections.o)
      bincount libR.a(registration.o)
      Rz_inflate libR.a(connections.o)
      pnbinom_mu libR.a(arithmetic.o)
      qnbinom_mu libR.a(arithmetic.o)
      rnbinom_mu libR.a(random.o)
      dnbinom_mu libR.a(arithmetic.o)
      Rf_df libR.a(arithmetic.o)
      Rf_dt libR.a(arithmetic.o)
      Rf_pf libR.a(arithmetic.o)
      Rf_pt libR.a(arithmetic.o)
      Rf_qf libR.a(arithmetic.o)
      Rf_qt libR.a(arithmetic.o)
      Rf_rf libR.a(random.o)
      Rf_rt libR.a(random.o)
      R_ProcessEvents libR.a(errors.o)
      Rz_crc32 libR.a(connections.o)
      chol_ libR.a(registration.o)
      do_syssleep libR.a(names.o)
      R_zeroin2 libR.a(optimize.o)
      R_EditFiles libR.a(platform.o)
      R_getProcTime libR.a(memory.o)
      lzma_lzma_preset libR.a(connections.o)
      lzma_end libR.a(connections.o)
      R_ExpandFileName libR.a(platform.o)
      R_OpenInitFile libR.a(main.o)
      R_getClockIncrement libR.a(memory.o)
      BZ2_bzDecompress libR.a(dounzip.o)
      R_ReadConsole libR.a(main.o)
      Rf_initialize_R Rmain.o
      call_dqags libR.a(registration.o)
      call_dqagi libR.a(registration.o)
      Rf_lchoose libR.a(arithmetic.o)
      R_ChooseFile libR.a(platform.o)
      Rz_deflateInit2_ libR.a(connections.o)
      lzma_code libR.a(connections.o)
      N01_kind libR.a(RNG.o)
      do_machine libR.a(names.o)
      R_max_col libR.a(registration.o)
      R_ClearerrConsole libR.a(scan.o)
      do_dataviewer libR.a(names.o)
      Rf_InitEd libR.a(main.o)
      pcre_maketables libR.a(grep.o)
      tre_regaparams_default libR.a(agrep.o)
      libintl_gettext libR.a(main.o)
      libintl_textdomain libR.a(main.o)
      lzma_stream_decoder libR.a(connections.o)
      R_Busy libR.a(main.o)
      Rf_dnf libR.a(arithmetic.o)
      Rf_dnt libR.a(arithmetic.o)
      Rf_pnf libR.a(arithmetic.o)
      Rf_pnt libR.a(arithmetic.o)
      Rf_qnf libR.a(arithmetic.o)
      Rf_qnt libR.a(arithmetic.o)
      BZ2_bzRead libR.a(connections.o)
      Rf_choose libR.a(arithmetic.o)
      Brent_fmin libR.a(optimize.o)
      BZ2_bzDecompressEnd libR.a(dounzip.o)
      Rf_dbinom libR.a(arithmetic.o)
      Rf_dchisq libR.a(arithmetic.o)
      R_cumsum libR.a(registration.o)
      Rf_dgamma libR.a(arithmetic.o)
      Rf_dhyper libR.a(arithmetic.o)
      Rf_dlogis libR.a(arithmetic.o)
      Rf_dlnorm libR.a(arithmetic.o)
      Rf_dnbeta libR.a(arithmetic.o)
      Rf_dnorm4 libR.a(arithmetic.o)
      fft_factor libR.a(fourier.o)
      lzma_stream_encoder libR.a(connections.o)
      Rf_fround libR.a(arithmetic.o)
      Rf_ftrunc libR.a(arithmetic.o)
      tre_regawexec libR.a(agrep.o)
      Rz_compress libR.a(connections.o)
      do_addhistory libR.a(names.o)
      Rf_pbinom libR.a(arithmetic.o)
      Rf_pchisq libR.a(arithmetic.o)
      Rf_pgamma libR.a(arithmetic.o)
      Rf_phyper libR.a(arithmetic.o)
      Rf_plogis libR.a(arithmetic.o)
      Rf_plnorm libR.a(arithmetic.o)
      Rf_pnbeta libR.a(arithmetic.o)
      Rf_pnorm5 libR.a(arithmetic.o)
      Rf_qbinom libR.a(arithmetic.o)
      R_pretty libR.a(registration.o)
      R_cpolyroot libR.a(complex.o)
      Rf_qchisq libR.a(arithmetic.o)
      Rf_ptukey libR.a(arithmetic.o)
      Rf_qgamma libR.a(arithmetic.o)
      Rf_qhyper libR.a(arithmetic.o)
      Rf_qlogis libR.a(arithmetic.o)
      Rf_qlnorm libR.a(arithmetic.o)
      Rf_qnbeta libR.a(arithmetic.o)
      Rf_qnorm5 libR.a(arithmetic.o)
      bakslv libR.a(registration.o)
      Rf_rbinom libR.a(random.o)
      Rf_rchisq libR.a(random.o)
      Rf_qtukey libR.a(arithmetic.o)
      Rf_rgamma libR.a(random.o)
      Rf_rhyper libR.a(random.o)
      Rf_rlogis libR.a(random.o)
      Rf_rlnorm libR.a(random.o)
      R_rowsum libR.a(registration.o)
      str_signif libR.a(registration.o)
      Rf_pcauchy libR.a(arithmetic.o)
      dchdc_ libR.a(registration.o)
      do_system libR.a(names.o)
      do_X11 libR.a(names.o)
      dpbfa_ libR.a(registration.o)
      dpbsl_ libR.a(registration.o)
      dpoco_ libR.a(registration.o)
      dpodi_ libR.a(registration.o)
      dpofa_ libR.a(registration.o)
      dposl_ libR.a(registration.o)
      dqrcf_ libR.a(registration.o)
      dqrdc_ libR.a(registration.o)
      dqrls_ libR.a(registration.o)
      dqrqy_ libR.a(registration.o)
      dqrsl_ libR.a(registration.o)
      dqrxb_ libR.a(registration.o)
      dsvdc_ libR.a(registration.o)
      dtrco_ libR.a(registration.o)
      dtrsl_ libR.a(registration.o)
      wilcox_free libR.a(registration.o)
      fdhess libR.a(optimize.o)
      R_ShowFiles libR.a(platform.o)
      BZ2_bzReadGetUnused libR.a(connections.o)
      tre_regaexecb libR.a(agrep.o)
      BZ2_bzReadOpen libR.a(connections.o)
      R_zeroin libR.a(optimize.o)
      pcrevalid_utf8 libR.a(util.o)
      machar libR.a(platform.o)
      Rf_pnchisq libR.a(arithmetic.o)
      Rf_pnbinom libR.a(arithmetic.o)
      lzma_crc64 libR.a(util.o)
      optif9 libR.a(optimize.o)
      rcont2 libR.a(random.o)
      R_pretty0 libR.a(engine.o)
      setulb libR.a(optim.o)
      Rf_qcauchy libR.a(arithmetic.o)
      R_tabulate libR.a(registration.o)
      tre_regncompb libR.a(grep.o)
      tre_regnexecb libR.a(grep.o)
      Rf_pwilcox libR.a(arithmetic.o)
      libintl_dngettext libR.a(errors.o)
      find_interv_vec libR.a(registration.o)
      Rf_qnchisq libR.a(arithmetic.o)
      Rf_qnbinom libR.a(arithmetic.o)
      Rf_bessel_i_ex libR.a(arithmetic.o)
      Rf_bessel_j_ex libR.a(arithmetic.o)
      Rf_bessel_y_ex libR.a(arithmetic.o)
      Rf_bessel_k_ex libR.a(arithmetic.o)
      Rz_inflateEnd libR.a(connections.o)
      Rz_deflateEnd libR.a(connections.o)
      Rf_rcauchy libR.a(random.o)
      Rf_trigamma libR.a(arithmetic.o)
      do_saveplot libR.a(names.o)
      pcre_free libR.a(grep.o)
      pcre_exec libR.a(grep.o)
      Rf_beta libR.a(arithmetic.o)
      Rf_dexp libR.a(arithmetic.o)
      tre_regcomp libR.a(platform.o)
      tre_regexec libR.a(platform.o)
      tre_regfree libR.a(platform.o)
      Rf_pexp libR.a(arithmetic.o)
      Rf_qexp libR.a(arithmetic.o)
      Rf_rexp libR.a(random.o)
      Rf_sign libR.a(arithmetic.o)
      Rf_qwilcox libR.a(arithmetic.o)
      R_ReadClipboard libR.a(connections.o)
      BZ2_bzWriteOpen libR.a(connections.o)
      bincode libR.a(registration.o)
      R_CleanTempDir libR.a(main.o)
      R_access_X11 libR.a(platform.o)
      norm_rand libR.a(optim.o)
      Rf_rnchisq libR.a(random.o)
      Rf_rnbinom libR.a(random.o)
      R_running_as_main_program Rmain.o
      Rf_psigamma libR.a(arithmetic.o)
      ch2inv_ libR.a(registration.o)
      BZ2_bzWrite libR.a(connections.o)
      BZ2_bzBuffToBuffDecompress libR.a(connections.o)
      Rz_inflateInit2_ libR.a(connections.o)
      Rf_rwilcox libR.a(random.o)
      R_CleanUp libR.a(main.o)
      Rf_dsignrank libR.a(arithmetic.o)
      Rf_psignrank libR.a(arithmetic.o)
      Rf_rsignrank libR.a(random.o)
      Rf_qsignrank libR.a(arithmetic.o)
      BZ2_bzDecompressInit libR.a(dounzip.o)
      Rf_dcauchy libR.a(arithmetic.o)
      Rz_deflate libR.a(connections.o)
      R_Suicide libR.a(main.o)
      libintl_bindtextdomain libR.a(main.o)
      stemleaf libR.a(registration.o)
      Rf_digamma libR.a(arithmetic.o)
      do_sysinfo libR.a(names.o)
      Rf_dnchisq libR.a(arithmetic.o)
      Rf_dnbinom libR.a(arithmetic.o)
      do_edit libR.a(names.o)
      pcre_study libR.a(grep.o)
      R_ShowMessage libR.a(startup.o)
      dqrdc2_ libR.a(registration.o)
      dqrqty_ libR.a(registration.o)
      dqrrsd_ libR.a(registration.o)
      Rf_InitFunctionHashing libR.a(Rdynload.o)
      R_FlushConsole libR.a(plot.o)
      lzma_alone_decoder libR.a(connections.o)
      Rf_dwilcox libR.a(arithmetic.o)
      rmultinom libR.a(random.o)
      tre_regwcomp libR.a(agrep.o)
      tre_regwexec libR.a(grep.o)
      Rf_dbeta libR.a(arithmetic.o)
      Rf_dgeom libR.a(arithmetic.o)
      Rf_dpois libR.a(arithmetic.o)
      Rf_dunif libR.a(arithmetic.o)
      Rf_fmin2 libR.a(plot3d.o)
      Rf_fmax2 libR.a(relop.o)
      Rf_fprec libR.a(arithmetic.o)
      Rf_imax2 libR.a(printutils.o)
      Rf_lbeta libR.a(arithmetic.o)
      tre_regcompb libR.a(agrep.o)
      do_savehistory libR.a(names.o)
      tre_regerror libR.a(agrep.o)
      tre_regexecb libR.a(dcf.o)
      Rf_pbeta libR.a(arithmetic.o)
      Rf_pgeom libR.a(arithmetic.o)
      Rf_ppois libR.a(arithmetic.o)
      Rf_qbeta libR.a(arithmetic.o)
      Rf_punif libR.a(arithmetic.o)
      Rf_qgeom libR.a(arithmetic.o)
      Rf_qpois libR.a(arithmetic.o)
      Rf_rbeta libR.a(random.o)
      Rf_qunif libR.a(arithmetic.o)
      Rf_rgeom libR.a(random.o)
      Rf_rnorm libR.a(random.o)
      Rf_rpois libR.a(random.o)
      Rf_runif libR.a(random.o)
      do_loadhistory libR.a(names.o)
      tre_regaexec libR.a(agrep.o)
      R_WriteConsoleEx libR.a(printutils.o)
      Rz_inflateReset libR.a(connections.o)
      do_dataentry libR.a(names.o)
      lzma_raw_encoder libR.a(connections.o)
      BZ2_bzBuffToBuffCompress libR.a(connections.o)
      Rf_lgammafn libR.a(random.o)
      BM_norm_keep libR.a(RNG.o)
      Rf_gammafn libR.a(arithmetic.o)
      libintl_dgettext libR.a(main.o)
      libintl_ngettext libR.a(printarray.o)
      fft_work libR.a(fourier.o)
      lzma_raw_decoder libR.a(connections.o)
      Rf_pweibull libR.a(arithmetic.o)
      Rf_qweibull libR.a(arithmetic.o)
      Rf_rweibull libR.a(random.o)
      Rf_dweibull libR.a(arithmetic.o)
      pcre_fullinfo libR.a(grep.o)
      R_WriteConsole libR.a(printutils.o)
      R_ResetConsole libR.a(errors.o)
      BZ2_bzWriteClose libR.a(connections.o)
      signrank_free libR.a(registration.o)
      pcre_compile libR.a(grep.o)
      BZ2_bzReadClose libR.a(connections.o)
      ld: fatal: symbol referencing errors. No output written to R.bin
        • 1. Re: Help compiling R using Solaris Studio
          paul_floyd
          RogerP wrote:
          I am trying to compile R 2.14 using the Solaris Studio. The configure command works, with some tweaking ;-), but it I get a lot of "symbols not found" error messages (see below).

          Has anyone been able to compile R with the Solaris Studio? Which libraries or files am I missing and how should I specify them.

          thanks in advance!
          Roger

          cc -m64 -xopenmp -L/opt/sunstudio12.1/lib/amd64 -o R.bin Rmain.o libR.a -library=sunperf\
          -R/opt/solstudio12.2/lib/amd64 -R/usr/local/bin/R-2.14.0/lib64 -R/user/openwin/lib -lfai -lfui -lfsu -lsunquad -lsunmath -lmtsk -lm -lnsl\
          -lsocket -lrt -ldl -lm -licuuc -licui18n

          cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
          Undefined               first referenced
          symbol                in file
          BZ2_bzWrite libR.a(connections.o)
          Hi

          I guess the BZ2 ones are in -lbz2.

          Otherwise, isn't there an R package on sunfreware/csw/blastwave?

          Paul
          • 2. Re: Help compiling R using Solaris Studio
            RogerP
            Thanks for your response - I did already solve that problem and successfully compiled R and ran some demo programs!
            Problem is when I try to update packages.

            In configuring R I ran into a problem with iconv so I cheated and made the configure run even with a reported problem with iconv, but when trying to add a package it failed because of a problem with iconv.

            I've tried downloading iconv, gettext, and expat from sunfreeware (all seem to be the most recent versions!), but the iconv still fails.

            Suggestions please!

            I am not using the blastwave's version because, as is the case for most of the software on blastwave, it is so old and out-of-date.

            Roger
            • 3. Re: Help compiling R using Solaris Studio
              user13277775
              R 2.14.2 built just fine on S11 with Studio 12.3. I had to have GNU iconv installed and then I had to build without readline as the native one has some problems/features WRT linking to n/curses that I was not in the mood to play with.

              ./configure \
              --prefix=%{_prefix} \
              --without-readline \
              --enable-R-shlib