Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on M2 Mac with conda-forge r-base #20

Open
wakelin-g opened this issue Feb 12, 2024 · 0 comments
Open

Build failure on M2 Mac with conda-forge r-base #20

wakelin-g opened this issue Feb 12, 2024 · 0 comments

Comments

@wakelin-g
Copy link

Hi there,

In a fresh conda environment with conda-forge r-base 4.3.2, RProtoBufLib fails to build. First, this is raised:

checking build system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized

followed ultimately by:

In file included from GatingSet_pb_lib/GatingSet.pb.cc:4:
../inst/include/cytolib/GatingSet.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
   10 | #include <google/protobuf/port_def.inc>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makevars:15: libGatingSet.pb] Error 1
ERROR: compilation failed for package ‘RProtoBufLib’

I think the root of the error is similar to that reported in grimbough/Rhdf5lib#54, as running

unset host_alias
unset build_alias

prior to building prevents the error from being raised.

Full trace
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://cloud.r-project.org/
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.2 (2023-10-31)
Installing package(s) 'BiocVersion', 'RProtoBufLib'
trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/BiocVersion_3.18.1.tar.gz'
Content type 'application/x-gzip' length 973 bytes
==================================================
downloaded 973 bytes

trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/RProtoBufLib_2.14.0.tar.gz'
Content type 'application/x-gzip' length 2976515 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘BiocVersion’ ...
** using staged installation
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BiocVersion)
* installing *source* package ‘RProtoBufLib’ ...
** using staged installation
checking for arm64-apple-darwin20.0.0-gcc... arm64-apple-darwin20.0.0-clang
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 arm64-apple-darwin20.0.0-clang accepts -g... yes
checking for arm64-apple-darwin20.0.0-clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether arm64-apple-darwin20.0.0-clang++ -std=gnu++17 accepts -g... yes
untarring protobuf ...
building protobuf...
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... Invalid configuration `arm64-apple-darwin20.0.0': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20.0.0 failed
make: *** No rule to make target 'install'.  Stop.
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C++ compiler: ‘clang version 17.0.6’
using C++11
using SDK: ‘MacOSX14.2.sdk’
arm64-apple-darwin20.0.0-clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -fPIC -I../inst/include/ -I/private/var/folders/zj/tndd8h_93y37yt6k7p1zwkg00000gn/T/RtmpqxSL3k/R.INSTALLeb02701f885c/RProtoBufLib/src/pb_build/include/ -o GatingSet_pb_lib/libGatingSet.pb.dylib GatingSet_pb_lib/GatingSet.pb.cc
In file included from GatingSet_pb_lib/GatingSet.pb.cc:4:
../inst/include/cytolib/GatingSet.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
   10 | #include <google/protobuf/port_def.inc>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makevars:15: libGatingSet.pb] Error 1
ERROR: compilation failed for package ‘RProtoBufLib’
* removing ‘/Users/griffen/mambaforge/envs/temp/lib/R/library/RProtoBufLib’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant