diff --git a/.Rbuildignore b/.Rbuildignore index 6be5d29..040a79b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^src/cld_3/protos/.*\.pb\.h$ ^src/Makevars$ ^src/libcld3/.*\.a$ +^configure.log$ diff --git a/.gitignore b/.gitignore index fe9e99e..0b49dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ src/*.o src/cld_3/protos/*.pb.h src/cld_3/protos/*.pb.cc src/Makevars +configure.log diff --git a/DESCRIPTION b/DESCRIPTION index c6c03e8..8ee1386 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,11 @@ Package: cld3 Type: Package Title: Google's Compact Language Detector 3 -Version: 1.2 +Version: 1.3 Authors@R: c( person("Jeroen", "Ooms", ,"jeroen@berkeley.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4035-0289")), - person("Google Inc", role = "cph", comment = "CLD3 C++ library") - ) + person("Google Inc", role = "cph", comment = "CLD3 C++ library")) Description: Google's Compact Language Detector 3 is a neural network model for language identification and the successor of 'cld2' (available from CRAN). The algorithm is still experimental and takes a novel approach to language detection with different properties diff --git a/NEWS b/NEWS index fcb57c2..9d69ddb 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +1.3 + - Fix for CRAN: do not use CXXCPP + 1.2 - Windows: update to protobuf 3.8.0 with support for GCC 8+ - Suppress warnings about pragmas in autogenerated protobuf headers diff --git a/cleanup b/cleanup index d536050..88fef0f 100755 --- a/cleanup +++ b/cleanup @@ -3,4 +3,4 @@ for file in src/cld_3/protos/*.proto; do echo "#error This is a placeholder file." > ${file%.proto}.pb.cc done -rm -f src/Makevars +rm -f src/Makevars configure.log diff --git a/configure b/configure index ea2f39a..d4e2b91 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/bash -# Anticonf (tm) script by Jeroen Ooms (2017) +# Anticonf (tm) script by Jeroen Ooms (2020) # This script will query 'pkg-config' for the required cflags and ldflags. # If pkg-config is unavailable or does not find the library, try setting # INCLUDE_DIR and LIB_DIR manually via e.g: @@ -48,17 +48,17 @@ echo "Using PKG_CFLAGS=$PKG_CFLAGS" echo "Using PKG_LIBS=$PKG_LIBS" # Find compiler -CXXCPP=$(${R_HOME}/bin/R CMD config CXXCPP) +CXX=$(${R_HOME}/bin/R CMD config CXX) CXXFLAGS=$(${R_HOME}/bin/R CMD config CXXFLAGS) CPPFLAGS=$(${R_HOME}/bin/R CMD config CPPFLAGS) # Test configuration -echo "#include $PKG_TEST_HEADER" | ${CXXCPP} ${CPPFLAGS} ${PKG_CFLAGS} ${CXXFLAGS} -xc++ - >/dev/null 2>&1 +echo "#include $PKG_TEST_HEADER" | ${CXX} -E ${CPPFLAGS} ${PKG_CFLAGS} ${CXXFLAGS} -xc++ - >/dev/null 2>configure.log # Customize the error if [ $? -ne 0 ]; then - echo "------------------------- ANTICONF ERROR ---------------------------" - echo "Configuration failed because $PKG_CONFIG_NAME was not found. Try installing:" + echo "------------------------------[ ANTICONF ]-----------------------------" + echo "Configuration failed to find $PKG_CONFIG_NAME. Try installing:" echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)" echo " * rpm: $PKG_RPM_NAME (Fedora, EPEL)" echo " * csw: $PKG_CSW_NAME (Solaris)" @@ -67,8 +67,10 @@ if [ $? -ne 0 ]; then echo "PATH and PKG_CONFIG_PATH contains a $PKG_CONFIG_NAME.pc file. If pkg-config" echo "is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:" echo "R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'" - echo "--------------------------------------------------------------------" - exit 1; + echo "----------------------------[ ERROR MESSAGE ]----------------------------" + cat configure.log + echo "------------------------------------------------------------------------" + exit 1 fi # Write to Makevars