Bug 16531 - ppc64el is not supported
Summary: ppc64el is not supported
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: System-specific (show other bugs)
Version: R-devel (trunk)
Hardware: Other Linux-Debian
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-09-09 15:09 UTC by Erwan
Modified: 2015-09-09 15:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erwan 2015-09-09 15:09:20 UTC
Hi,

I've noticed the Debian package r-cran-bayesm can't be built for ppc64el.
It seems it's because some library paths are missing from the FLIBS variable defined in etc/R/Makeconf and then the gfortran library isn't found.

The last lines of the building of the package r-cran-bayesm:
g++ -shared -L/usr/lib/R/lib -Wl,-z,relro -o bayesm.so bayesBLP_rcpp_loop.o breg_rcpp.o cgetC_rcpp.o clusterMix_rcpp_loop.o functionTiming.o ghkvec_rcpp.o llmnl_rcpp.o lndIChisq_rcpp.o lndIWishart_rcpp.o lndMvn_rcpp.o lndMvst_rcpp.o rDPGibbs_rcpp_loop.o rbprobitGibbs_rcpp_loop.o rcppexports.o rdirichlet_rcpp.o rhierLinearMixture_rcpp_loop.o rhierLinearModel_rcpp_loop.o rhierMnlDP_rcpp_loop.o rhierMnlRwMixture_rcpp_loop.o rhierNegbinRw_rcpp_loop.o rivDP_rcpp_loop.o rivgibbs_rcpp_loop.o rmixGibbs_rcpp.o rmixture_rcpp.o rmnlIndepMetrop_rcpp_loop.o rmnpGibbs_rcpp_loop.o rmultireg_rcpp.o rmvpGibbs_rcpp_loop.o rmvst_rcpp.o rnegbinRw_rcpp_loop.o rnmixGibbs_rcpp_loop.o rordprobitGibbs_rcpp_loop.o rscaleUsage_rcpp_loop.o rsurGibbs_rcpp_loop.o rtrun_rcpp.o runiregGibbs_rcpp_loop.o runireg_rcpp_loop.o rwishart_rcpp.o utilityFunctions.o -llapack -lblas -lgfortran -lm -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make[1]: *** [bayesm.so] Error 1
/usr/share/R/share/make/shlib.mk:6: recipe for target 'bayesm.so' failed

With a fix to set FLIBS in /etc/R/Makeconf (from the package r-base-core), I was able to build the package r-cran-bayesm for ppc64el.

The fix I applied on the configure file:
--- a/configure	2015-08-13 16:47:29.565087740 +0200
+++ b/configure	2015-09-02 14:56:33.701599837 +0200
@@ -26516,6 +26516,13 @@
     main_ldflags="-Wl,--export-dynamic"
     STATICR1="-Wl,--whole-archive"
     STATICR2="-Wl,--no-whole-archive"
+    ## FLIBS needs all the -L options on powerpc64le 
+    ## (it enables the build of packages with a dependency on this one)
+    case "${host_cpu}" in
+      powerpc64le)
+        FLIBS_IN_SO="${FLIBS_IN_SO} $CLIBS"
+        ;;
+    esac
     ;;
   mingw*)
     SHLIB_EXT=".dll"

I submitted it to Debian, but as the maintainer recommended, it'd be better idea to have this fix included in the source.

Thanks for considering this.