Comments (6)
Is this in Windows? What is the error? I have compiled it successfully in Windows 7, R 3.5.1, both 64 and 32 bits
from flash.
Below is the output of my installation (Windows, 3.5.1, 32-Bit):
> devtools::install_github("flr/FLash")
Downloading GitHub repo flr/FLash@master
from URL https://api.github.com/repos/flr/FLash/zipball/master
Installing FLash
"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/bin/i386/R" --no-site-file --no-environ \
--no-save --no-restore --quiet CMD INSTALL \
"C:/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99" \
--library="C:/Users/Taylor/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'FLash' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/gcc -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -O3 -Wall -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c FLCoreClasses.cpp -o FLCoreClasses.o
In file included from FLCoreClasses.cpp:1:0:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from FLCoreClasses.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from FLCoreClasses.cpp:1:0:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from FLCoreClasses.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
FLCoreClasses.cpp: In function 'FLRConstSRR getSRType(SEXP)':
FLCoreClasses.cpp:26:10: warning: unused variable 'dimnames' [-Wunused-variable]
dimnames = GET_DIMNAMES(v);
^
FLCoreClasses.cpp: In member function 'double FLStock::computeDiscards(int, int, int, int, int)':
FLCoreClasses.cpp:748:14: warning: unused variable 'z' [-Wunused-variable]
double z = m(iage, iyr, iunit, iseason, iarea, iter) + harvest(iage, iyr, iunit, iseason, iarea, iter);
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c FLashDLL.cpp -o FLashDLL.o
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwd.h:4,
from FLashDLL.cpp:2:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/fwd.h:4,
from FLashDLL.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwd.h:4,
from FLashDLL.cpp:2:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/fwd.h:4,
from FLashDLL.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
FLashDLL.cpp: In function 'SEXPREC* AdaptGrad(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
FLashDLL.cpp:283:42: warning: 'iyr' may be used uninitialized in this function [-Wmaybe-uninitialized]
adouble _N = VPA.N_ad(iage,iyr)*q_ad(iage,q.minyr(),1,1,1,1);
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c FLash-VPA.cpp -o FLash-VPA.o
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/FLash-VPA.h:4,
from FLash-VPA.cpp:1:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/FLash-VPA.h:4,
from FLash-VPA.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/FLash-VPA.h:4,
from FLash-VPA.cpp:1:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/FLash-VPA.h:4,
from FLash-VPA.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c flc.cpp -o flc.o
In file included from ../inst/include/flc.h:4:0,
from flc.cpp:2:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from ../inst/include/flc.h:4,
from flc.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc.h:4:0,
from flc.cpp:2:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from ../inst/include/flc.h:4,
from flc.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
flc.cpp: In function 'int get_sr(FLRConstSRR)':
flc.cpp:68:10: warning: enumeration value 'FLRConst_Shepherd' not handled in switch [-Wswitch]
switch(i) {
^
flc.cpp:68:10: warning: enumeration value 'FLRConst_Cushing' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_DerSch' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_PellaT' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_BevHoltD' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_BevHoltSV' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_RickerD' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_RickerSV' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_ShepherdD' not handled in switch [-Wswitch]
flc.cpp:68:10: warning: enumeration value 'FLRConst_ShepherdSV' not handled in switch [-Wswitch]
flc.cpp: In member function 'void flc::InitStocks(SEXP)':
flc.cpp:357:10: warning: unused variable 'j' [-Wunused-variable]
int i,j;
^
flc.cpp: In member function 'bool flc::InitBiolFleet(SEXP, SEXP, SEXP)':
flc.cpp:824:8: warning: unused variable 'flag' [-Wunused-variable]
int flag = (int)REAL(dim)[6];
^
flc.cpp: In member function 'bool flc::InitBiolsFleets(SEXP, SEXP, SEXP)':
flc.cpp:1952:9: warning: unused variable 'metiers' [-Wunused-variable]
SEXP metiers = PROTECT(GET_SLOT(fleet, install("metiers")));
^
flc.cpp:1976:8: warning: unused variable 'flag' [-Wunused-variable]
int flag = (int)REAL(dim)[6];
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c flc_adolc.cpp -o flc_adolc.o
In file included from ../inst/include/flc_adolc.h:5:0,
from flc_adolc.cpp:1:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from flc_adolc.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc_adolc.h:5:0,
from flc_adolc.cpp:1:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from flc_adolc.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c flquant_pointer.cpp -o flquant_pointer.o
In file included from ../inst/include/flquant_pointer.h:4:0,
from flquant_pointer.cpp:1:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from ../inst/include/flquant_pointer.h:4,
from flquant_pointer.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flquant_pointer.h:4:0,
from flquant_pointer.cpp:1:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from ../inst/include/FLCoreClasses.h:6:0,
from ../inst/include/flquant_pointer.h:4,
from flquant_pointer.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c fwd.cpp -o fwd.o
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwd.h:4,
from fwd.cpp:1:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/fwd.h:4,
from fwd.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwd.h:4,
from fwd.cpp:1:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/internal/common.h:26,
from ../inst/include/adolc/adolc.h:21,
from ../inst/include/flc_adolc.h:4,
from ../inst/include/fwd.h:4,
from fwd.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
fwd.cpp: In constructor 'fwd::fwd(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)':
fwd.cpp:101:8: warning: variable 't' set but not used [-Wunused-but-set-variable]
bool t =FALSE;
^
c:/Rtools/mingw_32/bin/g++ -I"C:/Users/Taylor/DOCUME~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include -std=c++11 -O2 -Wall -mtune=generic -c fwdFLStock.cpp -o fwdFLStock.o
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwdFLStock.h:4,
from fwdFLStock.cpp:3:
../inst/include/FLCoreClasses.h:19:0: warning: "__min" redefined
#define __min(x,y) (x<y?x:y)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/adouble.h:34,
from fwdFLStock.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:113:0: note: this is the location of the previous definition
#define __min(a,b) (((a) < (b)) ? (a) : (b))
^
In file included from ../inst/include/flc_adolc.h:5:0,
from ../inst/include/fwdFLStock.h:4,
from fwdFLStock.cpp:3:
../inst/include/FLCoreClasses.h:20:0: warning: "__max" redefined
#define __max(x,y) (x<y?y:x)
^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cstdlib:72:0,
from ../inst/include/adolc/adouble.h:34,
from fwdFLStock.cpp:2:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:112:0: note: this is the location of the previous definition
#define __max(a,b) (((a) > (b)) ? (a) : (b))
^
fwdFLStock.cpp: In member function 'double fwdStk::getVal(FLRConst_Target, int, int, int, int, int)':
fwdFLStock.cpp:24:10: warning: enumeration value 'FLRConst_Effort' not handled in switch [-Wswitch]
switch(quantity){
^
fwdFLStock.cpp:24:10: warning: enumeration value 'FLRConst_Costs' not handled in switch [-Wswitch]
fwdFLStock.cpp:24:10: warning: enumeration value 'FLRConst_Revenue' not handled in switch [-Wswitch]
fwdFLStock.cpp:24:10: warning: enumeration value 'FLRConst_Profit' not handled in switch [-Wswitch]
fwdFLStock.cpp:24:10: warning: enumeration value 'FLRConst_None' not handled in switch [-Wswitch]
fwdFLStock.cpp: In member function 'void fwdStk::project(adouble*, adouble*, double*, int, int, double*, int)':
fwdFLStock.cpp:207:10: warning: unused variable 'value' [-Wunused-variable]
double value = func[0].value();
^
fwdFLStock.cpp: In member function 'adouble fwdStk::computeCatch(FLQuant_adolc&, int, int, int, int, int)':
fwdFLStock.cpp:365:11: warning: variable 't1' set but not used [-Wunused-but-set-variable]
double t1, t2;
^
fwdFLStock.cpp:365:15: warning: variable 't2' set but not used [-Wunused-but-set-variable]
double t1, t2;
^
fwdFLStock.cpp: In member function 'adouble fwdStk::computeLandings(FLQuant_adolc&, int, int, int, int, int)':
fwdFLStock.cpp:419:8: warning: unused variable 't' [-Wunused-variable]
double t=val.value();
^
fwdFLStock.cpp: In member function 'adouble fwdStk::FbarLandings(FLQuant_adolc&, int, int, int, int, int)':
fwdFLStock.cpp:459:8: warning: variable 't' set but not used [-Wunused-but-set-variable]
double t;
^
fwdFLStock.cpp: In member function 'SEXPREC* fwdStk::run(SEXP, SEXP)':
fwdFLStock.cpp:663:27: warning: unused variable 'quantity' [-Wunused-variable]
FLRConst_Target quantity = (FLRConst_Target)(int)(Trgt)[iTrgt-1 + fwdTargetPos_quantity*nrow];
^
fwdFLStock.cpp:659:9: warning: unused variable 'iTape' [-Wunused-variable]
int iTape = 1, _Tape;
^
make[1]: Entering directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc'
make[2]: Entering directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc/drivers'
make[2]: Leaving directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc/drivers'
make[1]: Leaving directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc'
make[1]: Entering directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc'
CC adalloc.c
adalloc.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
CC rpl_malloc.c
rpl_malloc.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
CXX adouble.cpp
cc1plus.exe: error: unrecognized command line option '-std=c++11'
adouble.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
make[1]: *** [adouble.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Users/Taylor/AppData/Local/Temp/RtmpiKMjJ9/devtools4a05be3274d/flr-FLash-3382a99/src-i386/adolc'
make: *** [sublibs] Error 1
ERROR: compilation failed for package 'FLash'
* removing 'C:/Users/Taylor/Documents/R/win-library/3.5/FLash'
* restoring previous 'C:/Users/Taylor/Documents/R/win-library/3.5/FLash'
In R CMD INSTALL
Installation failed: Command failed (1)
from flash.
FLash is now setup for R 64 bit. It should compile also in 32 bit, but I will revisit it. Can you try on 64 bit? Same for FLBRP and FLXSA, they are all working on 64 bit now.
from flash.
I am recompiling all of my old packages with their updated versions - this might have been the issue. It's taking a while, so I will get back to you and let you know how it goes. Thanks for your help.
from flash.
All is fine now - I am able to compile and run in R 3.5.1., 64-bit. Sorry for the false warning. There were indeed packages that hadn't correctly updated once I moved to the new R version. Also, great that FLash is working in 64-bit now - I wasn't aware of that. Cheers, Marc
from flash.
Maybe we did not make it clear enough when releasing it.
from flash.
Related Issues (7)
- fwd bug HOT 1
- Compilation error under linux 64 bit and R-mkl HOT 11
- can not install Flash package. HOT 7
- fwd does not work for 1 year HOT 1
- Compilation failing for FLash HOT 3
- FLash bug HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flash.