[Rcpp-devel] Fwd: cannot compile qtdensity example on windows
Michele Gubian
mm14722 at bristol.ac.uk
Mon May 19 16:07:25 CEST 2014
---------- Forwarded message ----------
From: Michele Gubian <mm14722 at bristol.ac.uk>
Date: 19 May 2014 14:39
Subject: Re: [Rcpp-devel] cannot compile qtdensity example on windows
To: Dirk Eddelbuettel <edd at debian.org>
dear Dirk,
ok, I will try to compile everything from sources, R, Qt and the rest.
However, the post
http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-November/004771.html
says that it is not necessary.
Please have a look at the compilation errors I got, which I copy
below. It might be that you recognize something, e.g. changes in new
versions.
I let you know about my progress.
Many thanks
Michele
output from mingw32-make -f Makefile follows:
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory
'C:/Users/Uasolo/faldone/work/Bristol/Qt/RInside/qt'
g++ -c -pipe -fno-keep-inline-dllexport
-IC:/PROGRA~1/R/R-31~1.0/include -IC:/PROGRA~1/R/R-31~1.0/include/i386
-IC:/PROGRA~1/R/R-31~1.0/library/Rcpp/include
-IC:/PROGRA~1/R/R-31~1.0/library/RInside/include -O2 -frtti -Wall
-Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_SVG_LIB
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I.
-I'../../../../../programmi/Qt/5.2.1/mingw48_32/include'
-I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtSvg'
-I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtWidgets'
-I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui'
-I'../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtCore'
-I'release' -I'../../../../../programmi/Qt/5.2.1/mingw48_32/mkspecs/win32-g++'
-o release/qtdensity.o qtdensity.cpp
In file included from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objbase.h:159:0,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\ole2.h:16,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\wtypes.h:12,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\winscard.h:10,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\windows.h:97,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtCore/qt_windows.h:71,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopengl.h:51,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopenglcontext.h:62,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/QtGui:32,
from qtdensity.h:13,
from qtdensity.cpp:8:
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objidl.h:618:52:
error: macro "Realloc" requires 3 arguments, but only 2 given
virtual void *WINAPI Realloc(void *pv,SIZE_T cb) = 0;
^
In file included from
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/RcppCommon.h:142:0,
from C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp.h:27,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInsideCommon.h:38,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInside.h:26,
from qtdensity.h:11,
from qtdensity.cpp:8:
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Interrupt.h:52:21:
warning: unused parameter 'dummy' [-Wunused-parameter]
inline void checkInterruptFn(void *dummy) {
^
In file included from
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/RcppCommon.h:162:0,
from C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp.h:27,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInsideCommon.h:38,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInside.h:26,
from qtdensity.h:11,
from qtdensity.cpp:8:
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/internal/r_vector.h:71:13:
warning: unused parameter 'x' [-Wunused-parameter]
inline void r_init_vector<VECSXP>(SEXP x){}
^
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/internal/r_vector.h:78:13:
warning: unused parameter 'x' [-Wunused-parameter]
inline void r_init_vector<EXPRSXP>(SEXP x){}
^
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/internal/r_vector.h:85:13:
warning: unused parameter 'x' [-Wunused-parameter]
inline void r_init_vector<STRSXP>(SEXP x){}
^
In file included from C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp.h:57:0,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInsideCommon.h:38,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInside.h:26,
from qtdensity.h:11,
from qtdensity.cpp:8:
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Date.h:83:51:
warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
static inline const unsigned int baseYear(){
^
In file included from
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/macros/macros.h:56:0,
from
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/RcppCommon.h:31,
from C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp.h:27,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInsideCommon.h:38,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInside.h:26,
from qtdensity.h:11,
from qtdensity.cpp:8:
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Module.h: In copy
constructor 'Rcpp::CppClass::CppClass(const Rcpp::CppClass&)':
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Module.h:404:23:
warning: base class 'class Rcpp::S4_Impl<Rcpp::PreserveStorage>'
should be explicitly initialized in the copy constructor [-Wextra]
RCPP_CTOR_ASSIGN(CppClass)
^
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/macros/interface.h:27:1:
note: in definition of macro 'RCPP_CTOR_ASSIGN'
__CLASS__( const __CLASS__& other ){
\
^
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Module.h: In copy
constructor 'Rcpp::CppObject::CppObject(const Rcpp::CppObject&)':
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/Module.h:416:26:
warning: base class 'class Rcpp::S4_Impl<Rcpp::PreserveStorage>'
should be explicitly initialized in the copy constructor [-Wextra]
RCPP_CTOR_ASSIGN(CppObject)
^
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp/macros/interface.h:27:1:
note: in definition of macro 'RCPP_CTOR_ASSIGN'
__CLASS__( const __CLASS__& other ){
\
^
In file included from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objbase.h:159:0,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\ole2.h:16,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\wtypes.h:12,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\winscard.h:10,
from
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\windows.h:97,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtCore/qt_windows.h:71,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopengl.h:51,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/qopenglcontext.h:62,
from
../../../../../programmi/Qt/5.2.1/mingw48_32/include/QtGui/QtGui:32,
from qtdensity.h:13,
from qtdensity.cpp:8:
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objidl.h:
At global scope:
c:\users\uasolo\faldone\programmi\qt\tools\mingw48_32\i686-w64-mingw32\include\objidl.h:618:56:
error: 'Realloc' declared as a 'virtual' field
virtual void *WINAPI Realloc(void *pv,SIZE_T cb) = 0;
^
In file included from C:/PROGRA~1/R/R-31~1.0/include/R.h:50:0,
from
C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/RcppCommon.h:36,
from C:/PROGRA~1/R/R-31~1.0/library/Rcpp/include/Rcpp.h:27,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInsideCommon.h:38,
from
C:/PROGRA~1/R/R-31~1.0/library/RInside/include/RInside.h:26,
from qtdensity.h:11,
from qtdensity.cpp:8:
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:37: error: expected
identifier before '(' token
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:47: error: 'parameter'
declared as function returning a function
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:50: error: expected ')'
before ',' token
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:37: error: expected
identifier before '(' token
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:47: error: 'parameter'
declared as function returning a function
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
C:/PROGRA~1/R/R-31~1.0/include/R_ext/RS.h:64:50: error: expected ')'
before ',' token
#define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL)
^
Makefile.Release:795: recipe for target 'release/qtdensity.o' failed
mingw32-make[1]: *** [release/qtdensity.o] Error 1
mingw32-make[1]: Leaving directory
'C:/Users/Uasolo/faldone/work/Bristol/Qt/RInside/qt'
Makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
On 19 May 2014 14:31, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 19 May 2014 at 14:08, Michele Gubian wrote:
> | hi all,
> |
> | I need to use RInside in Qt on Windows, and I am stuck since more than
> | a week. In short, I tried to follow these instructions:
> | http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-November/004771.html
> | where the compilation/linking problems seem to be solved, but for me
> | the same procedure does not work.
> |
> | Details:
> | I compile Rcpp and RInside from sources using the toolchain shipped
> | with Qt (mingw48_32). In order to to that, I change my path by:
> | set path=C:\PROGRA~1\R\Rtools\bin;C:\Users\Uasolo\faldone\programmi\Qt\Tools\mingw48_32\bin;%PATH%
> |
> | Then with
> | qmake qtdensity.pro -r -spec win32-g++
> | I get makefiles, but
> | mingw32-make -f Makefile
> | gives compilation errors. The stderr output from the above command is attached (
> | qtdensity_make.log).
>
> I think that got pruned.
>
> | I have run out of ideas on what to try next. Please help.
>
> Make sure __you use the same mingw version for all components__.
>
> I would never have published that example if I hadn't gotten it working on
> Windows myself first -- but you need to use the exact same compiler for R,
> Rcpp, RInside and Qt.
>
> Which is entirely doable on Windows, but tedious. Like many other things on Windows.
>
> Dirk
>
>
> | Michele
> |
> | OS and sw packages details follow:
> |
> |
> | - OS
> | Windows7 home premium SP1 64-bit
> |
> | - R
> | version 3.1.0,
> | platform i386-w64-mingw32
> | arch i386
> | os mingw32
> | system i386, mingw32
> | R was installed from binaries.
> |
> | Rcpp and RInside installed from sources:
> | R CMD INSTALL --no-multiarch "C:\\Users/Uasolo/Downloads/Rcpp_0.11.1.tar.gz"
> | R CMD INSTALL --no-multiarch C:\Users\Uasolo\Downloads\RInside_0.2.11.tar.gz
> |
> |
> | - Qt:
> | Qt 5.2.1
> | Qt Creator 3.0.1 (I think not relevant, since I am trying to compile
> | qtdensity from command line)
> | mingw is in: Qt\Tools\mingw48_32
> | [DELETED ATTACHMENT qtdensity_make.log, Untyped binary data]
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list