search for: pkg_cflag

Displaying 20 results from an estimated 41 matches for "pkg_cflag".

Did you mean: pkg_cflags
2007 Mar 20
2
PKG_CFLAGS/CFLAGS and PKG_CXXFLAGS/CXXFLAGS
Why is it that R places CFLAGS after PKG_CFLAGS and not before when compiling a package (e.g. through R CMD build pkg)? This can be problematic if, for instance, you want to use -O3, but -O2 is in R_HOME/etc/Makeconf. If -O2 (in CFLAGS) appears after -O3 (in PKG_CFLAGS), you are left with what you didn't want: -O2. In R-exts, it sa...
2005 Feb 09
1
Compiler-specific flags with PKG_CFLAGS
On Tue, 8 Feb 2005, Kurt Hornik wrote: > This concerns the packages... > for which current versions of r-devel now report problems with > non-portable compilation flags in Makevars[.in] files: > > Problems in package 'rwt': > Non-portable flags in variable 'PKG_CFLAGS': > -Wall -ansi -pedantic > > These flags are mostly GCC specific and not portable. > (Do not assume that any -Ox will work.) > > Can you please fix these problems, and provide an update of your > package? It has been on my todo list since Ripley brought it up severa...
2000 Jul 17
1
Makevars, PKG_CFLAGS, ...
Hi, I'm searching for a way to override the default CFLAGS/FFLAGS (-g -02 in my case) per package (e.g with "-g" for packages under development). PKG_CFLAGS/PKG_FFLAGS is prepended to the remaining flags, so it can't delete a globally set "-O2" flag. Of course I can edit the global Makeconf file, but I was wondering if there is a possibility to override variables from Makeconf in the Makevars file inside a package tree, without creating...
2020 Sep 28
3
Specifying C Standard in Package's Makevars File
Hi, what is the correct way to specify a C standard in a package's Makevars file? Building a package with e.g. PKG_CFLAGS = -std=gnu11 does work but R CMD check issues a warning: * checking compilation flags in Makevars ... WARNING Non-portable flags in variable 'PKG_CFLAGS': -std=gnu11 (Same for -std=c11.) Thanks! Regards, Andreas Kersting
2002 Jun 13
1
using MAKEFLAGS in compiling C code as a shared library using R CMD SHLIB
...Make variable `MAKEFLAGS', as in MAKEFLAGS="CFLAGS=-O3" R CMD SHLIB *.c ********************************************************************** Now, something like MAKEFLAGS="CC=gcc-3.0" R CMD SHLIB rc.c -o rc.so works fine, and something like MAKEFLAGS="CC=gcc-3.0 PKG_CFLAGS= -Wall" R CMD SHLIB rc.c -o rc.so also works fine. However, MAKEFLAGS="CC=gcc-3.0 PKG_CFLAGS= -Wall -pedantic" R CMD SHLIB rc.c -o rc.so does not work fine. Make throws a fit and spews forth gibberish. My understanding of MAKEFLAGS is that it is for passing flags to some submak...
2008 Nov 20
3
Turning off compiler optimization
Hi. I am writing some code in C that I would like to link into R. My Makevars file is: PKG_CPPFLAGS=-I/usr/local/include PKG_LIBS=-L/usr/local/lib -lgsl PKG_CFLAGS = -Wall -O0 -g -p -pg The source file is core.c,. and I am compiling using R CMD SHLIB core.c The output is gcc -arch x86_64 -O3 -g -p -std=gnu99 -I/Library/Frameworks/ R.framework/Resources/include -I/Library/Frameworks/R.framework/ Resources/include/x86_64 -I/usr/local/include -I/usr/loca...
2005 Oct 05
1
Problems with autoconf example from r-ext.
...C` CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` dnl substitute CPPFLAGS and LIBS AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) dnl and do subsitution in the src/Makevars.in AC_OUTPUT(src/Makevars) [end autoconf.ac] I rund autoconf.. [Makevars.in] PKG_CFLAGS=@CPPFLAGS@ PKG_LIBS=@LIBS@ [end-Makevars.in] I rund R CMD with R CMD INSTALL --configure-args='--with-sbmlode-lib=/data/opt/sbmlodesolve/include \ --with-sbmlode-include=/data/opt/sbmlodesolve/lib' \ SBMLodeSolveR What I am getting is a [Makvars] PKG_CFLAGS= PKG_LIBS= -L/data/opt/sb...
2020 Jul 15
2
Openblas?
...8.948 3.661 20.915 3 3.277 1.894 1.908 Comments on that? To me it seems clear that openblas (0, 2, 3) has nothing to offer me, as my C code stands now. Is the problem that openblas uses C versions of blas? I am using the Fortran version via F77_CALL(name) I tried adding PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) to src/Makevars, but then I got ...undefined symbol: dsytri_ when compiling. G?ran
2010 Jan 22
2
R CMD check error with the GNU Scientific Library
...ib failed for 'sharka' Execution halted Clearly there is some difficulty linking up with gsl_multimin_fminimizer_nmsimplex. I noticed the QRMlib library also includes gsl functions. In that package they include a src/gsl directory with the required .h files and in Makevars they have "PKG_CFLAGS = -I./gsl". I have copied this approach, but wonder if using the standard "R CMD build myPackage" "R CMD check myPackage" needs modifying in some way? All hints or ideas welcome. Thanks David -- David Pleydell UMR BGPI CIRAD TA A-54/K Campus International de Baill...
2020 Sep 29
0
Specifying C Standard in Package's Makevars File
On 28/09/2020 12:44, Andreas Kersting wrote: > Hi, > > what is the correct way to specify a C standard in a package's Makevars file? > > Building a package with e.g. PKG_CFLAGS = -std=gnu11 does work but R CMD check issues a warning: for some unstated value of 'work' ... > * checking compilation flags in Makevars ... WARNING > Non-portable flags in variable 'PKG_CFLAGS': > -std=gnu11 > > (Same for -std=c11.) > > Thanks! Regards...
2006 Dec 10
1
Linking Fortran code to BLAS in Ubuntu
...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 that won't work on Ubuntu :-) . Also, if I need to install any packages to make the BLAS work, I'd love to know about it. Thanks! - Emmanuel [[alternative HTML version deleted]]
2004 Jun 24
0
[SOLVED] GET_DIM() crash on Windows only
...onfigured for creating R packages. Anything blatantly >wrong? Suggestions? The culprit of my troubles turned out to be the GCC compiler option '-ansi' in "src/Makevars". Why this causes a problem is not known at this time. My Makevars for the example program was as below: PKG_CFLAGS=-Wall -ansi -pedantic -DDEBUG_RWT -I./ PKG_LIBS=-lm Creating a Windows-specific config file "src/Makevars.win" without that option solves the problem. PKG_CFLAGS=-Wall -pedantic -DDEBUG_RWT -I./ PKG_LIBS=-lm Many thanks to Uwe Ligges for figuring out the cause. ----------...
2007 Jan 26
1
Makevars PKG_LIBS ignored by SHLIB (PR#9473)
Full_Name: Rick Sayre Version: 2.4.0 OS: Windows Submission from: (NULL) (138.72.27.164) PKG_LIBS works fine on *nix on windows, it seems to be ignored by the "SHLIB" script so, R CMD SHLIB blah properly uses PKG_CPPFLAGS and PKG_CFLAGS from Makevars, but PKG_LIBS is ignored
2008 Jun 06
1
Makevars or congiure for multi platforms
...xt and web links. (Patches are available at http://pdf2.r-forge.r-project.org/patches) Now, I'm making a library version of the pdf device. However, with my skill, I'm not sure about writing Makevars or configure file for multi platforms. A following line in Makevars works on my mac, ----- PKG_CFLAGS=-I/Library/Frameworks/R.framework/PrivateHeaders -DHAVE_CONFIG_H ----- (Note that the PrivateHeaders directory contains Fileio.h and Defn.h) My question is, How do I write Makevars or congiure for Unix/Linux and Windows? I would like to support those platforms in my library. Regards, Tadashi Ka...
2012 Dec 24
1
How to ensure -O3 on Win64
...The same happens on R-Forge. I gather that some packages don't work with -O3 so the default is -O2. I've tried this in data.table's Makevars (entire contents) : ==== MAKEFLAGS="CFLAGS=-O3" # added CFLAGS=-O3 # added PKG_CFLAGS=-O3 # added all: $(SHLIB) # no change mv $(SHLIB) datatable$(SHLIB_EXT) # no change ==== but -O2 still appears in winbuilder's install.out (after -O3, and I believe the last -O is the one that counts) : gcc -m64 -I"D:/...
2011 Feb 20
2
Problem using F77_CALL(dgemm) in a package
...l(B),as.double(C)) return(matrix(cout$C,nrowA,ncol(B))) } My namespace file is: export("C_matrix_multiply") useDynLib(CMATRIX.so,R_matrix_multiply) I'm not sure if it's necessary, but I've also included a Makevars.in file in my src directory: PKG_CPPFLAGS=@PKG_CPPFLAGS@ PKG_CFLAGS=@PKG_CFLAGS@ PKG_LIBS=@PKG_LIBS@ ${LAPACK_LIBS} ${BLAS_LIBS} ${FLIBS} which I simply copied from the diversitree package, which seems to use a lot of fortran. I have the same problem (which I am getting to) with or without this Makevars.in file. I install my package using: R CMD INSTALL CMATR...
2006 Dec 14
1
Detecting compilation under R
...0); #else x = gsl_runif(0.0,1.0); #endif (cant remember the exact names but hopefully you get the idea). This fails because USING_R is only set when R.h is included. Are there any preprocessor definitions set by R CMD SHLIB and R CMD BUILD that I can test against? Of course I can stick PKG_CFLAGS=-DYES_THIS_IS_USING_R in Makevars, but I just wondered if there was a default solution I'd missed. Or if it was a good idea anyway. Barry
2016 Sep 27
2
src/Makevars ignored ?
...be plain gcc without ISO C99 language standard support just for this specific R library. > The exception is (in my opinion) if you need to decrease the level of > optimization because you know or suspect the compiler to generate wrong > code. > > What you should do, is use > PKG_CFLAGS > as documented in R-exts, 1.2.1 under "Using Makevars". in the documentation you pointed (and trust me I read it), keyword is _set additional_ preprocessor options and//or compiler flags only way to _remove_ is to overwrite back to logic. either Makevars, whatever level, allow...
2001 Sep 10
1
problems linking c++ code
...Is there something I can link in to resolve this problem? Is there another obvious solution? The system is FreeBSD 4.x-stable. The R version is 1.3.1. The gcc/g++ version is 2.95.3. I compile with R CMD INSTALL and my MAkevars file has the following lines: PKG_CXXFLAGS = -fPIC -I./ -I../../ PKG_CFLAGS = -fPIC -I./ -I../../ PKG_LIBS = -L/usr/local/lib The error I get when loading the library in R is: > library(rmetasim) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/usr/local/lib/R/library/rmetasim/libs/rmetasim.so": /usr/l...
2018 Feb 17
2
Problem installing libxml2 under Homebrew
....2.0.tar.gz' Content type 'application/x-gzip' length 251614 bytes (245 KB) ================================================== downloaded 245 KB * installing *source* package ?xml2? ... ** package ?xml2? successfully unpacked and MD5 sums checked Found pkg-config cflags and libs! Using PKG_CFLAGS=-I/usr/include/libxml2 Using PKG_LIBS=-L/usr/lib -lxml2 -lz -lpthread -licucore -lm ------------------------- ANTICONF ERROR --------------------------- Configuration failed because libxml-2.0 was not found. Try installing: * deb: libxml2-dev (Debian, Ubuntu, etc) * rpm: libxml2-devel (Fedora, C...