> Date: Mon, 12 Apr 1999 11:30:20 +0200 (MET DST) > From: Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at> > > I think in R we can do better than at present, if only I knew > > exactly how. One idea is to have (effectively) a `hints' file that > > configure uses to add a base set of libraries to FLIBS, but on Solaris > > at least, using the Fortran command (f77 or g77) to link a dynamic library > > does the job. For linking with ld the base FLIBS would need to be > > > > -lF77 -lM77 -lV77 -lsunmath -lm > > > > _if_ f77 is used. How viable is `use FC to link' on other platforms? > > > > I'm not sure if it does matter here, but the only way to build R on my > Alphas currently is using Fortran as LDCMD: > > in config.site: > LDCMD="f77 " > > SHLIBLD is "ld -shared -expect_unresolved '*'".I would have expected LDCMD=f77 LDFLAGS="-g -nofor_main -fpe3" SHLIBLD=ld SHLIBLDFLAGS="-shared -expect_unresolved '*'" as the way to encode that. Now my question amounts to Does SHLIBLD=f77 work with those SHLIBLDFLAGS? If not, can SHLIBLDFLAGS be modified to make it work? Brian -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
It seems to me that, at least for application packages, there is a strong incentive to avoid both fortran and C. If eventual R, or a new language like Omega, are to work in a "Java like" way across platforms, I think both fortran and C are problems. Is that not correct? I realize there is a performance issue, but I don't think it is as serious as it was in old versions of Splus. I am not sure how slow my time series library would be without the fortran. It used to be intolerable, but I have the impression it may not be too bad now. To some extent this must also apply to the core part of the language. Is there not some incentive to remove, not add, both fortran and C except where they are essential? Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 12 Apr 1999, Prof Brian Ripley wrote:> > > Date: Mon, 12 Apr 1999 11:30:20 +0200 (MET DST) > > From: Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at> > > > I think in R we can do better than at present, if only I knew > > > exactly how. One idea is to have (effectively) a `hints' file that > > > configure uses to add a base set of libraries to FLIBS, but on Solaris > > > at least, using the Fortran command (f77 or g77) to link a dynamic library > > > does the job. For linking with ld the base FLIBS would need to be > > > > > > -lF77 -lM77 -lV77 -lsunmath -lm > > > > > > _if_ f77 is used. How viable is `use FC to link' on other platforms? > > > > > > > I'm not sure if it does matter here, but the only way to build R on my > > Alphas currently is using Fortran as LDCMD: > > > > in config.site: > > LDCMD="f77 " > > > > SHLIBLD is "ld -shared -expect_unresolved '*'". > > I would have expected > > LDCMD=f77 > LDFLAGS="-g -nofor_main -fpe3" > SHLIBLD=ld > SHLIBLDFLAGS="-shared -expect_unresolved '*'" > > as the way to encode that. Now my question amounts to > > Does SHLIBLD=f77 work with those SHLIBLDFLAGS? > If not, can SHLIBLDFLAGS be modified to make it work? >splitting LDCMD="f77 -g -nofor_main -fpe3 " into LDCMD=f77 LDFLAGS="-g -nofor_main -fpe3" results in root@delta[R]# ./configure loading cache ./config.cache checking for a BSD compatible install... (cached) /usr/local/bin/install -c checking whether ln -s works... (cached) yes checking for ranlib... (cached) ranlib checking for bison... (cached) bison -y checking for ar... (cached) ar checking for latex... (cached) /usr/local/bin/latex checking for dvips... (cached) /usr/local/bin/dvips checking for makeindex... (cached) /usr/local/bin/makeindex checking for perl... (cached) /usr/local/bin/perl checking whether perl is perl 5... yes checking for cc... (cached) cc checking for underscore after Fortran symbols... configure: error: Nothing worked - cannot use FORTRAN setting SHLIBLD to f77 and SHLIBLDFLAGS="-shared" works. (SHLIBLDFLAGS="-shared -expect_unresolved '*'" fails, f77 doesn't understand this linker option, but no matter: it would only suppress some warnings) BTW, the value of SHLIBLDFLAGS specified in config.site gets never used: it will be overwritten from the configure script with the host specific versions of SHLIBLDFLAGS. The same thing for SHLIBLD, this is hardcoded to "ld" in configure.in. But I think there is no difference between SHLIBLD=ld SHLIBLDFLAGS="-shared -expect_unresolved '*'" and SHLIBLD=f77 SHLIBLDFLAGS="-shared" because f77 also calls ld (ok, with the correct Fortran libraries, libUfor.so, libFutil.so, libots.so). I guess this works because I link R with LDCMD="f77 -nofor_main", so it already contains the symbols of the Fortran libraries. Albrecht ------------------------------------------------------------------------------- Albrecht Gebhardt email : albrecht.gebhardt@uni-klu.ac.at Institut fuer Mathematik Tel. : (++43 463) 2700/837 Universitaet Klagenfurt Fax : (++43 463) 2700/834 Villacher Str. 161 A-9020 Klagenfurt, Austria ------------------------------------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> From: Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at>> But I think there is no difference between > SHLIBLD=ld > SHLIBLDFLAGS="-shared -expect_unresolved '*'" > and > SHLIBLD=f77 > SHLIBLDFLAGS="-shared" > because f77 also calls ld (ok, with the correct Fortran libraries, > libUfor.so, libFutil.so, libots.so). I guess this works because I link R > with LDCMD="f77 -nofor_main", so it already contains the symbols of the > Fortran libraries.Thanks, it is the `ok, with the correct Fortran libraries' we are looking for here. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._