Displaying 20 results from an estimated 40000 matches similar to: "forcing the use of the c++ linker with c++ and fortran sources"
2006 Jun 06
1
help compiling package with g77
I have a package with some embedded legacy FORTRAN code
(for computing complex Bessel functions, written in 2003
by C. Bond to implement the algorithms of Zhang and Jin 1996).
It worked well until recently [despite warnings about deprecated
headers "includes at least one deprecated or antiquated header" --
when I tried to fix these the code stopped working, so I left
them alone]. Now an
2005 May 20
1
using src/Makevars file
Hi all,
Thanks to all who offered advice on using F95 in R.
Now I'm trying to compile a test package using gfortran, Linux 2.4.21 and
R 2.1.0.
I was able to successfully compile and use a test F95 routine by setting my
environment variables as follows in bash:
export PATH=~/bin/:$PATH
export F77=gfortran
export LD_LIBRARY_PATH=~/bin/irun/lib
export GFORTRAN_STDIN_UNIT=-1
Now I'm
2006 Jun 07
2
further f77/gfortran
OK: despite Dirk's very kind help, I decided that
trying to deal with R configuration and Debian configuration
simultaneously was too difficult.
I did manage to solve my problem by reconfiguring/making/
installing all of 2.3.1 from source:
./configure F77=/usr/bin/g77
make
make install
A few questions inspired by this experience:
(1) it seems a bit odd that R sets F77=gfortran
by
2014 Nov 30
1
Using FPP preprocessor for Fortran Code
Dear R Developers,
For package seriation I use Fortran code. I recently got a request to add
#if defined(__ICC) || defined(__INTEL_COMPILER)
USE IFPORT
#endif
to the code since the Intel Fortran compiler otherwise has problems with
rand(). However, to enable the FPP preprocessor I have to either add a
compiler flag (-cpp for gFortran) which is possibly not portable or
change the
2014 Jul 22
1
Problems with building a private R-package with Fortran source under Windows
Hi,
I recently managed to port the slicot library (http://slicot.org/) to R.
I created a new package, put the fortran libs into the src directory
together with a Makevars file that include the line:
PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
R CMD check did run through on my ubuntu 14.04 64bit machine with 1
warning and 4 notes.
Now I wanted to create a Windows version of that package by
2010 Dec 14
1
How to specify compiler options when using R CMD SHLIB
Hi
I've built a dll using Fortran code and can call it by either R or
Fortran. Calling by the former gives me the wrong answer and the later
gives the correct answer.
>From what I've read, it looks like I should use the subroutines DBLEPR,
INTPR and REALPR to print to the R console rather than using Fortran
standard I/O and that if I use the command
R CMD SHLIB source.f that these
2009 May 22
2
Step by step: Making an R package with Fortran 95
To all. I need your help. The big question is: How do I make an R library
with Fortran 95 files? You may assume that I am a pretty decent programmer
in both R and Fortran. I lay out a scenario and need your help!
I know how to make an ordinary R package and have dabbled with R + Fortran
95 *.dll linking. I do not have a great handle on the whole Makevars file
and whatever else I might need
2010 Aug 24
3
Compiling Fortran for R : .so: mach-o, but wrong architecture
Dear all,
I'm trying to compile FORTRAN code to be used in R, failing miserably. I got
a simple code function to try to figure out what is going wrong. Here is the
code (available on the web) :
subroutine bar(n, x)
integer n
double precision x(n)
integer i
do 100 i = 1, n
x(i) = x(i) ** 2
100 continue
end
1. I compiled the
2019 Jun 02
3
rgl install for R 3.7
I?ve installed R 3.7.0 on a new laptop running macos 10.14.5 and have managed to get most of my usual packages
to compile from source with a ~/.R/Makevars file that looks like this:
CC=/usr/local/clang8/bin/clang
CXX=/usr/local/clang8/bin/clang++
LDFLAGS=-L/usr/local/clang8/lib
CPPFLAGS=-I/usr/local/clang8/include -I/opt/X11/include/freetype2
FC=/usr/local/gfortran/bin/gfortran
2019 Aug 07
1
#include_next <stdio.h> not found
Dear All,
Just when I thought I had the plague of gfortran-9 under control, I made the tactical error
of allowing my mac mini to ?upgrade? to macOS 10.14.6 which apparently also upgraded
Xcode to 10.3. In consequence I?m having difficulty building my packages. The current
symptom is:
/usr/local/clang7/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
2006 Dec 10
1
Linking Fortran code to BLAS in Ubuntu
Hello!
I have some Fortran code that uses BLAS calls, and would like to compile it
into a shared object to call it from R as per the "Writing R Extensions"
manual. What needs to go into the "Makevars" file, so that running the R CMD
SHLIB will work in Ubuntu?
The code compiles properly on the Mac, with the Makevars line
PKG_CFLAGS=-Wl,-framework -Wl,vecLib
but of course
2013 Sep 09
1
How to get R cmd to check Fortran array bounds
I'm trying to get the this Fortran array bounds check to run on my code as my
package has been rejected for failing this test. I read writing R
extensions and it appears to run this test I should use a Makevars file with
one of the following two flags depending on my compiler:
FCFLAGS = -g -O2 -mtune=native -fbounds-check
FFLAGS = -g -O2 -mtune=native -fbounds-check
and store it in the src
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi,
I am trying to compile a FORTRAN program to call from R under Windows 7 but
I am having problem in the compiling step. To demonstrate this is the
program testit.f:
------------------------------------------
subroutine TESTIT(x,n,m)
dimension x(n)
do 10 i=1,n
10 x(i)=x(i)**m
end
--------------------------------------------
When I compile it with gfortran I get
2010 Jun 02
3
R linux install: FORTRAN compiling error
Hello,
I have basic familiarity with Unix but by most standards a novice. I am
trying to install R on a linux machine and am following the instructions in
the R install and admin guide in terms of what is required to compile the R
source code. I downloaded R version 2.11.1 and extracted the files into my
home directory. I realize I need a FORTRAN compiler to help with this
process and have
2006 Nov 09
0
[LLVMdev] Fortran and LLVM
On 11/8/06, Warren Armstrong <warren.armstrong at anu.edu.au> wrote:
> Hi all,
>
> I'm looking into using LLVM to do some optimisations of
> Fortran code. As part of this, I've been trying to build
> the frontend with f95 support. At the moment, I'm trying
> to resolve undefined symbol problems for code defined in
> c-common.c + elsewhere - I'm taking
2012 Jan 15
1
Calling Fortran from R: Issues with dynamic loading of fortran dll
I successfully used .Fortran to load and execute my fortran procedures
under WinXP and 32 bit R. Alas, the same isn't true with my next Windows
7/64 machine, R 2.14.1 (64 bit) and the gnu gfortran (64) compiler
(mingw64 v. 4.6.1). Though I'm able to compile the routines from the
command line using gfortran '...', .Fortran('foo2') results in an error
saying the Fortran
2011 Mar 24
1
.Fortran successful, R locks up.
Howdy,
I am having a problem with a library compiled from some legacy fortran
code. I can call the library, it runs as it should, returns a list,
and gives a ">" prompt, but then locks up the R session. Functions
typed in return nothing. ctrl-c results in a new prompt that is still
locked up, and R overwhelms the processor. This happens on Mac,
Windows, and Linux exactly the same. I
2009 Apr 15
1
Compiling Fortran Subroutines as R Shared Objects on Mac OS-X
Hello,
I am trying to compile some F77 subroutines as shared objects for R on my Mac.
--> Mac OS-X Version 10.4.11 (Tiger Intel Mac)
I have done this (successfully) before on Sun Solaris and Linux Fedora systems using the following command.
> R CMD SHLIB myfile.f
I have g77 installed from this page.
http://hpc.sourceforge.net/
I am using R 2.8.1, and I have installed all 4 additional
2008 Jan 18
1
Fortran level mismatch between package and R
We have a user here who is attempting to compile a package which
requires f90 (gfortran will do). Our version of R was built with f77
(g77). When the user attempts to build the package, f77 is always
invoked and fails due to the presence of f90 features.
Is there a simple method or some documentation on how to force a
package build to use a different compiler than the one used in
2006 Nov 08
4
[LLVMdev] Fortran and LLVM
Hi all,
I'm looking into using LLVM to do some optimisations of
Fortran code. As part of this, I've been trying to build
the frontend with f95 support. At the moment, I'm trying
to resolve undefined symbol problems for code defined in
c-common.c + elsewhere - I'm taking the temporary approach
of copy-pasting it into a new file, and linking that in. I have no
idea if it will