compiling errors when running example

148 views
Skip to first unread message

mct941

unread,
Mar 1, 2016, 1:13:37 PM3/1/16
to mrgsolve
I'm encountering the following error when running the example included in the package.  The compiler appears to be having trouble.  I'm not sure if the problem is isolated to me, given the challenges that I've had getting the package installed to this point.

> mrgsolve_example("pkpd")
Copying pkpdExample.cpp to C:/Users/mtsai/Documents
Use mrgmod() to load and compile.

> cat(readLines("pkpdExample.cpp"),sep="\n")
$PARAM
KA = 1.2, CL = 1, VC = 25
KIN = 100, KOUT = 2, EC50 = 4

$CMT GUT CENT RESP

$SET delta= 0.25


$MAIN
RESP_0 = KIN/KOUT;

$ODE
dxdt_GUT = -KA*GUT;
dxdt_CENT = KA*GUT - (CL/VC)*CENT;

double CP = CENT/VC;
double INH = CP/(EC50+CP);

dxdt_RESP = KIN*(1-INH) - RESP*KOUT;

$CAPTURE CP
> mod <- mread("pkpdExample")

Compiling ... Warning message:
running command 'make -f "C:/Users/mtsai/DOCUME~1/R/R-32~1.0/etc/x64/Makeconf" -f "C:/Users/mtsai/DOCUME~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="C:/Users/mtsai/Documents/pkpdExample.dll" WIN=64 TCLBIN=64 OBJECTS="C:/Users/mtsai/Documents/pkpdExample.cpp.o"' had status 127 
Warning: Compile did not succeed.  Returning NULL.
Warning message:
running command 'R CMD SHLIB C:/Users/mtsai/Documents/pkpdExample.cpp.cpp -o C:/Users/mtsai/Documents/pkpdExample.dll' had status 1 

Kyle Baron

unread,
Mar 1, 2016, 3:01:57 PM3/1/16
to mrgsolve
This looks like the same error that we see when the path wasn't set.   Did you set up the compile path in the R session?  You need the same access to the tool chain when compiling the model that is required when installing the package.

Max Tsai

unread,
Mar 1, 2016, 4:45:28 PM3/1/16
to Kyle Baron, mrgsolve
Hi Kyle 
It appears that my workaround is just a temporary one. The path needs to be re-established every time I start R. :(

-Max




--
MetrumRG Website: http://www.metrumrg.com/opensourcetools.html
---
You received this message because you are subscribed to the Google Groups "mrgsolve" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mrgsolve+u...@metrumrg.com.
To post to this group, send email to mrgs...@metrumrg.com.
Visit this group at https://groups.google.com/a/metrumrg.com/group/mrgsolve/.

Kyle Baron

unread,
Mar 1, 2016, 4:59:54 PM3/1/16
to Max Tsai, mrgsolve
Max - 

You can have R do this automagically when it start up.

It takes a little time, but read this:
Especially if you have limited  administrative access to your computer, there is important information in there so R can get all of the settings it needs without needing to be administrator.

For example:


Unless --no-environ was given on the command line, R searches for site and user files to process for setting environment variables. The name of the site file is the one pointed to by the environment variable R_ENVIRON; if this is unset, ‘R_HOME/etc/Renviron.site’ is used (if it exists, which it does not in a ‘factory-fresh’ installation). The name of the user file can be specified by the R_ENVIRON_USER environment variable; if this is unset, the files searched for are ‘.Renviron’ in the current or in the user's home directory (in that order). See ‘Details’ for how the files are read.


So, basically figure out where your HOME directory is and put a file called .Renviron there.  That will set up the environment for you.

Kyle


 

--
Kyle Baron
Reply all
Reply to author
Forward
0 new messages