Open barracuda156 opened 9 months ago
What version of nimble are you installing? A new version (1.1.0) is just going up on CRAN now. (It can take a couple of days for all binaries to be updating on CRAN, but the source is there.) That version does update Eigen to its current version of 3.4.0. If you are picking up nimble 1.1.0, then maybe that Eigen update is the problem? If you are using an earlier version of nimble, then maybe the new version is what you need?
I.e., this gonna fix it (though in a suboptimal way):
--- inst/include/Eigen/Core 2024-01-31 03:25:11.000000000 +0800
+++ inst/include/Eigen/Core 2024-02-01 12:09:25.000000000 +0800
@@ -206,7 +206,7 @@
#include "src/Core/arch/SSE/TypeCasting.h"
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/SSE/Complex.h"
-#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
+#elif (defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)) && !defined(__APPLE__)
#include "src/Core/arch/AltiVec/PacketMath.h"
#include "src/Core/arch/AltiVec/MathFunctions.h"
#include "src/Core/arch/AltiVec/Complex.h"
@@ -346,7 +346,7 @@
#include "src/Core/CoreIterators.h"
#include "src/Core/ConditionEstimator.h"
-#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
+#if (defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)) && !defined(__APPLE__)
#include "src/Core/arch/AltiVec/MatrixProduct.h"
#elif defined EIGEN_VECTORIZE_NEON
#include "src/Core/arch/NEON/GeneralBlockPanelKernel.h"
@perrydv Thank you for responding. I am building 1.1.0.
Eigen 3.4.0 has a broken Altivec. The fix was merged after that.
@perrydv Altivec headers were fixed here: https://gitlab.com/libeigen/eigen/-/merge_requests/1150
I have built nimble
1.1.0 with disabled Altivec first (with my patch above), I will try now building against external Eigen with fixed headers.
@perrydv Hmm, configure arg does not have any effect. How should it be used? I tried this:
/opt/local/bin/R CMD INSTALL . --configure-args=' --with-eigen=/opt/local/include/eigen3'
But it ignored the passed directory path:
configure:3038: checking Eigen/Dense usability
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
conftest.cpp:52:10: fatal error: Eigen/Dense: No such file or directory
52 | #include <Eigen/Dense>
| ^~~~~~~~~~~~~
compilation terminated.
(Obviously, I can patch in the flag, but can it be made to work in a neater way?)
Well, I was able to make it recognize the argument, but build still violates it and uses its own Eigen:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-eigen=/opt/local/include/eigen3
## --------- ##
## Platform. ##
## --------- ##
hostname = 36-246.wireless-city.scu.edu.tw
uname -m = Power Macintosh
uname -r = 10.0.0d2
uname -s = Darwin
uname -v = Darwin Kernel Version 10.0.0d2: Fri Oct 10 19:37:52 PDT 2008; root:xnu-1346.7~1/RELEASE_PPC
/usr/bin/uname -p = powerpc
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 10.0.0d2: Fri Oct 10 19:37:52 PDT 2008; root:xnu-1346.7~1/RELEASE_PPC
Kernel configured for up to 4 processors.
4 processors are physically available.
4 processors are logically available.
Processor type: ppc970 (PowerPC 970)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 75 tasks, 374 threads, 4 processors
Load average: 2.39, Mach factor: 1.61
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2243: checking for C++ compiler version
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 --version >&5
g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2263: $? = 0
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -v >&5
Using built-in specs.
COLLECT_GCC=/opt/local/bin/g++-mp-13
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/powerpc-apple-darwin10/13.2.0/lto-wrapper
Target: powerpc-apple-darwin10
Configured with: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc13/gcc13/work/gcc-13.2.0/configure --prefix=/opt/local --build=powerpc-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc13 --includedir=/opt/local/include/gcc13 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-13 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-13 --with-gxx-include-dir=/opt/local/include/gcc13/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --without-build-config --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc13/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc13 13.2.0_4+stdlib_flag'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (MacPorts gcc13 13.2.0_4+stdlib_flag)
configure:2263: $? = 0
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -V >&5
g++-mp-13: error: unrecognized command-line option '-V'
g++-mp-13: fatal error: no input files
compilation terminated.
configure:2263: $? = 1
configure:2252: /opt/local/bin/g++-mp-13 -std=gnu++17 -qversion >&5
g++-mp-13: error: unrecognized command-line option '-qversion'; did you mean '--version'?
g++-mp-13: fatal error: no input files
compilation terminated.
configure:2263: $? = 1
configure:2283: checking whether the C++ compiler works
configure:2305: /opt/local/bin/g++-mp-13 -std=gnu++17 -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp >&5
configure:2309: $? = 0
configure:2357: result: yes
configure:2360: checking for C++ compiler default output file name
configure:2362: result: a.out
configure:2368: checking for suffix of executables
configure:2375: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp >&5
configure:2379: $? = 0
configure:2401: result:
configure:2423: checking whether we are cross compiling
configure:2431: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp >&5
configure:2435: $? = 0
configure:2442: ./conftest
configure:2446: $? = 0
configure:2461: result: no
configure:2466: checking for suffix of object files
configure:2488: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2492: $? = 0
configure:2513: result: o
configure:2517: checking whether we are using the GNU C++ compiler
configure:2536: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2536: $? = 0
configure:2545: result: yes
configure:2554: checking whether /opt/local/bin/g++-mp-13 -std=gnu++17 accepts -g
configure:2574: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -g -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2574: $? = 0
configure:2615: result: yes
configure:2648: checking how to run the C++ preprocessor
configure:2675: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
configure:2675: $? = 0
configure:2689: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
9 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:2689: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:2714: result: /opt/local/bin/g++-mp-13 -std=gnu++17 -E
configure:2734: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
configure:2734: $? = 0
configure:2748: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
9 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:2748: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:2777: checking for grep that handles long lines and -e
configure:2835: result: /opt/local/bin/ggrep
configure:2840: checking for egrep
configure:2902: result: /opt/local/bin/ggrep -E
configure:2907: checking for ANSI C header files
configure:2927: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:2927: $? = 0
configure:3000: /opt/local/bin/g++-mp-13 -std=gnu++17 -o conftest -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc conftest.cpp >&5
configure:3000: $? = 0
configure:3000: ./conftest
configure:3000: $? = 0
configure:3011: result: yes
configure:3024: checking for sys/types.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for sys/stat.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for stdlib.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for string.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for memory.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for strings.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for inttypes.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for stdint.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3024: checking for unistd.h
configure:3024: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
configure:3024: $? = 0
configure:3024: result: yes
configure:3038: checking Eigen/Dense usability
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -c -pipe -Os -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp >&5
conftest.cpp:52:10: fatal error: Eigen/Dense: No such file or directory
52 | #include <Eigen/Dense>
| ^~~~~~~~~~~~~
compilation terminated.
configure:3038: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <Eigen/Dense>
configure:3038: result: no
configure:3038: checking Eigen/Dense presence
configure:3038: /opt/local/bin/g++-mp-13 -std=gnu++17 -E -isystem/opt/local/include/LegacySupport -I/opt/local/include conftest.cpp
conftest.cpp:19:10: fatal error: Eigen/Dense: No such file or directory
19 | #include <Eigen/Dense>
| ^~~~~~~~~~~~~
compilation terminated.
configure:3038: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <Eigen/Dense>
configure:3038: result: no
configure:3038: checking for Eigen/Dense
configure:3038: result: no
configure:3269: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by config.status, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on 36-246.wireless-city.scu.edu.tw
config.status:738: creating inst/make/Makevars
config.status:738: creating inst/make/Makevars_lib
config.status:738: creating R/config.R
config.status:738: creating src/Makevars
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-isystem/opt/local/include/LegacySupport -I/opt/local/include'
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-pipe -Os -arch ppc'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='/opt/local/bin/g++-mp-13 -std=gnu++17'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_header_Eigen_Dense=no
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_objext=o
ac_cv_path_EGREP='/opt/local/bin/ggrep -E'
ac_cv_path_GREP=/opt/local/bin/ggrep
ac_cv_prog_CXXCPP='/opt/local/bin/g++-mp-13 -std=gnu++17 -E'
ac_cv_prog_cxx_g=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
CPPAD_INC=''
CPPFLAGS='-isystem/opt/local/include/LegacySupport -I/opt/local/include'
CXX='/opt/local/bin/g++-mp-13 -std=gnu++17'
CXXCPP='/opt/local/bin/g++-mp-13 -std=gnu++17 -E'
CXXFLAGS='-pipe -Os -arch ppc'
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/opt/local/bin/ggrep -E'
EIGEN_INC='-I/opt/local/include/eigen3'
EXEEXT=''
GNUMAKEFILE_INCLUDE_MAKECONF='Makeconf'
GREP='/opt/local/bin/ggrep'
LDFLAGS='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
NEED_MAKEVARS_FILE='TRUE'
NIMBLE_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
NIMBLE_INC_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
NIMBLE_LIB_DIR='WILL_BE_SET_IN_LOCAL_MAKEVARS'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RPATH=''
R_ENABLE_LIB='FALSE'
R_PACKAGE_DIR='/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build/00LOCK-nimble/00new/nimble'
SHELL='/bin/sh'
USE_REGISTRATION='.NimbleUseRegistration = TRUE'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
configure: exit 0
But:
---> Building R-nimble
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build
Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/nimble" && /opt/local/bin/R CMD INSTALL . --configure-args="--with-eigen=/opt/local/include/eigen3" --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-nimble/R-nimble/work/build --install-tests
* installing *source* package ‘nimble’ ...
** package ‘nimble’ successfully unpacked and MD5 sums checked
** using staged installation
Checking eigen directory /opt/local/include/eigen3
Setting CPPFLAGS to find Eigen
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/local/bin/g++-mp-13 -std=gnu++17 accepts -g... yes
working on eigen
checking how to run the C++ preprocessor... /opt/local/bin/g++-mp-13 -std=gnu++17 -E
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Eigen/Dense usability... no
checking Eigen/Dense presence... no
checking for Eigen/Dense... no
Using the version of Eigen provided with NIMBLE
ENABLE_LIB=false
configure: creating ./config.status
config.status: creating inst/make/Makevars
config.status: creating inst/make/Makevars_lib
config.status: creating R/config.R
config.status: creating src/Makevars
removing debugging flags
/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript --vanilla ./customizeMakeconf.R
Building libnimble.a
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DR_NO_REMAP -I"../include" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -c nimDerivs_atomic_dyn_ind.cpp -o nimDerivs_atomic_dyn_ind.o
In file included from ../include/Eigen/src/Core/util/ConfigureVectorization.h:381,
from ../include/Eigen/Core:22,
from ../include/Eigen/Dense:1,
from ../include/nimble/EigenTypedefs.h:24,
from ../include/nimble/nimbleCppAD.h:38,
from ../include/nimble/nimDerivs_atomic_dyn_ind.h:6,
from nimDerivs_atomic_dyn_ind.cpp:1:
What should I do? :)
Thanks @barracuda156 . This is very helpful. Eigen 3.4.0 is labeled as "latest stable release". How common will this problem be? @paciorek can say more about the configure args.
@perrydv If there are any reservations with regard to updating Eigen headers, do not do it, it is not worth: affected people are obviously very few. (I suspect that nobody has working R
on macOS PowerPC outside of Macports, and an intersection of Macports users of macOS PowerPC with users interested to use R
is presumably in single digits.)
However it will be nice to either ensure that a build against external Eigen actually works without hacking the code (and a note in README, maybe, advising a usage of newer Eigen from upstream or Macports eigen3-devel
), or at least to disable Altivec for Apple. That will result in a somewhat slower code, but again, affected people are few, and it is better to have a working slower code than a broken one.
P. S. I will update the port for R-nimble
and see whether external Eigen is found by Clang on Sonoma. If it is not – and I assume this issue should not be compiler- or arch-specific, it is either something wrong on our side (I pass wrong args etc.) or configure code does not work as it should – the issue should be reproducible on any macOS with Macports installed.
Yes I will check on the question of building against external Eigen via the configure args when I get a chance.
@perrydv @paciorek My updates are merged, so now it hopefully can be reproducible:
Macports will build nimble
1.1.0 against its bundled Eigen with sudo port -v -s build R-nimble
(-s flag forces a build from source when added).
While this version of the portfile is supposed to build against Macports Eigen: https://github.com/barracuda156/macports-ports/blob/nimble/R/R-nimble/Portfile (did not work for me, as I documented above, at least on my testing system; I will try on another one today to make sure).
This issue as such is orthogonal to AltiVec breakage. If we make it work for x86 or arm64, it should work for any arch.
By default Macports installs Eigen headers into /opt/local/include/eigen3
(whether released eigen3
or eigen3-devel
which tracks upstream).
nimble
uses an outdated version of Eigen headers, it seems, which misdetects VSX support in Altivec code, which breaks the build on macOS on PowerPC:Upstream Eigen had this fixed quite a while ago. If updating it problematic or undesirable, a quick fix would be to just disable Altivec for Apple.