ggobi / qtbase

Dynamic bindings from R to the Qt library
20 stars 7 forks source link

CMAKE_SIZEOF_VOID_P is undefined on Win7 32bit #31

Closed tsieger closed 9 years ago

tsieger commented 10 years ago

It seems that CMAKE_SIZEOF_VOID_P is undefined in src/CMakeLists.txt on Win7 SP1 32bit when compiling against Qt5.2.0 (using cmake 2.8.11 and mingw from the Qt installation).

if (CMAKE_SIZEOF_VOID_P EQUAL 4)
  set(SYMPAT "'s/^.* [BCDRT] _/ /p'")
else ()
  set(SYMPAT "/^[^ ]* [T|C|B] /s/^[^ ]* [T|C|B] / /p")
endif()

Then, the (CMAKE_SIZEOF_VOID_P EQUAL 4) condition does not hold, such that the sed expression from the "else" branch gets wrongly used.

See #25 for details.

lawremi commented 10 years ago

We should try building with the mingw that R/CRAN uses to build R packages, since that is our eventual goal. Perhaps that might also solve this problem.

tsieger commented 10 years ago

Just two comments: i) I tried mingw 4.8.1 (I think that it was the one (one of those) suggested by R/CRAN) and ran into some binary incompatibilities (missing symbols from libstd-c++, see #25), but it would be worthwhile to give it a second chance, ii) the cranvas/qtbase installation instructions on win32/64 mention explicit steps of tweaking qtbase/src/mkdef.sh (see https://github.com/ggobi/cranvas/wiki) - perhaps this would mean that the author of these instructions also had to override the sed expression manually, possibly also due to problems with the CMAKE_SIZEOF_VOID_P

lawremi commented 9 years ago

Seems to work with the CRAN-recommended MinGW and cmake 2.8, so closing this one.