Skip to content

configure tests are done using wrong compilers #322

@s-u

Description

@s-u

The configure tests are preformed using different compilers than the actual compilation yielding invalid results.

Example based on macOS R release:

$ R CMD config CXX
clang++ -mmacosx-version-min=10.13 -std=gnu++14

tiledb source installation:

* installing *source* package ‘tiledb’ ...
** using staged installation
checking for g++... g++
[...]
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I../inst/tiledb/include -I'/Volumes/Builds/packages/high-sierra-x86_64/Rlib/4.1/Rcpp/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o

configure fails to set CC and CXX correctly, see R-exts 1.2:

Packages written with C++ need to pick up the details for the C++ compiler and switch the current language to C++ by something like

CXX=`"${R_HOME}/bin/R" CMD config CXX`
if test -z "$CXX"; then
  AC_MSG_ERROR([No C++ compiler is available])
fi
CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
AC_LANG(C++)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions