[Bioc-devel] genefilter package update?
Martin Morgan
mtmorgan at fhcrc.org
Sun Oct 14 08:00:19 CEST 2007
Hi Paul
Thanks for the update. R itself does not have C++ code, but does try
to configure itself correctly for C++ code in packages. Apparently
this is not the case for your system.
I think the short-term solution is to configure and make R with the
appropriate flags set at configuration time. I _think_ the appropriate
flag is SHLIB_CXXLDFLAGS=-lCrun. This is from reading section C.4 of
the R Installation and Administration Manual, available from your
favorite cran (mine is http://cran.fhcrc.org) under the 'Manuals'
link. Setting the flag at configuration should then record it in the
installation R_HOME/etc/Makeconf. This file is consulted when packages
are installed.
The place to ask for more help or to suggest more permanent solutions
is on the R-devel mailing list (accessible from the R home
page). Likely you will get help, but from reading the installation
manual it seems a bit like modifications to configuration scripts will
not necessarily be incorporated -- perhaps to do so implies more
experience and long-term support for this particular compiler /
platform combination than members of the R development team are able
to commit to.
Hope that helps
Martin
Paul Gordon <gordonp at ucalgary.ca> writes:
> Hi Martin,
> Thanks for looking into this. Yes, plier has the same issue. I compiled R 2.6
> using Sun Studio 12 under Solaris 10 (Sparc).
> R's configure scripts do not check for libCrun, and this doesn't cause any
> problem, probably because it seems in fact that R is all C and Fortran (at
> least I couldn't find any .cc or .cpp files in the source tree). Of course,
> since many optional packages contain some C++ code, it would make sense for R
> to setup its configuration for proper C++ compilation. So we either need to
> convince the R team to include this m4 snippet (do any of them subscribe to
> this list?), or it needs to be included in any package with C++ (yuck).
> Regards,
> Paul
>
> Hi Paul --
>
> Sorry for the delay in replying to your message.
>
> The C++ code in genefilter is very straight-forward, and this implies
> that your problems compiling it are likely to occur with any package
> containing C++ code. A similarly simple package to try might be plier;
> EBImage or RBGL would be challenging packages. Does plier have similar
> problems?
>
> If plier does have problems then the solution belongs at the R level
> and not at the package level. However, R does get regular use on
> Solaris boxes, presumably sometimes with the default compilers. So it
> might be something more unique to your set up. One possibility is that
> you configured and made R with a different compiler than you are using
> to compile packages. Is that, or other questionable practice, likely?
>
> If it seems that R does not in fact get configured correctly, then
> probably R's configure.ac needs to be updated. This probably requires
> more specific information about the OS and compiler versions that are
> causing problems. Can you provide that information?
>
> Martin
>
> Paul Gordon [[<gordonp at ucalgary.ca>]] writes:
>
>
>
> Hi all,
>
> Not sure exactly who is maintaining genefilter (the info page lists a
> group), so I thought I'd post here. The genefilter package (version
> 1.16.0)
> compiles fine under Solaris using the default Sun compiler, but if you
> actually try to use it you get a nasty error:
>
> ld.so.1: R: fatal: relocation error: file
> /export/home/gordonp/R/lib/R/library/genefilter/libs/genefilter.so:
> symbol __1cDstdJbad_allocG__vtbl_: referenced symbol not found
>
> This is because under Solaris libCrun.so needs to explicitly linked
> for the C++ code in genefilter's src directory. I got around this by
> creating
> a GNU configure script (in keeping with the recommended R package
> approach) that checks if -lCrun is needed. With configure in the
> top-level
> direxctory of the package, it works fine. Hopefully this can be
> incorporated into the distribution, as I think it would affect anyone
> not using gcc on
> Solaris. Not sure if the mailing list strips off small text
> attachments, but the configure.in and src/Makevars.in for autoconf are
> attached. I can
> send them directly to the relevant party if they e-mail me.
>
> Regards,
>
> Paul
> PKG_CFLAGS = @CFLAGS@
> PKG_LIBS = @LIBS@
> PKG_CPPFLAGS = @DEFS@
> AC_INIT("DESCRIPTION")
>
> AC_CHECK_LIB(Crun, _fini, [use_libcrun=yes], [use_libcrun=no])
>
> AC_MSG_CHECKING([if we need to explicitly link libCrun])
> if test "x$use_libcrun" = "xyes"
> then
> LIBS="$LIBS -lCrun"
> fi
> AC_MSG_RESULT($use_libcrun)
>
> AC_CONFIG_FILES([src/Makevars])
> AC_OUTPUT
> _______________________________________________
> [[Bioc-devel at stat.math.ethz.ch]] mailing list
> [[https://stat.ethz.ch/mailman/listinfo/bioc-devel]]
>
>
>
>
>
>
>
--
Martin Morgan
Computational Biology Shared Resource Director
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M2 B169
Phone: (208) 667-2793
More information about the Bioc-devel
mailing list