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

install fail using dev tools #5

Open
ptsii opened this issue Apr 19, 2023 · 5 comments
Open

install fail using dev tools #5

ptsii opened this issue Apr 19, 2023 · 5 comments

Comments

@ptsii
Copy link

ptsii commented Apr 19, 2023

This is on an apple laptop (intel), running the latest operating system

Here's the output:

── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/mk/9_clkwx513df94kdv85c25m80000gn/T/RtmpeSwXX1/remotes24173c198763/bbuchsbaum-neuroim2-6c134a3/DESCRIPTION’ (395ms)
─ preparing ‘neuroim2’: (1s)
Warning: /private/var/folders/mk/9_clkwx513df94kdv85c25m80000gn/T/Rtmp7vQmKC/Rbuild266f13276152/neuroim2/man/LatentNeuroVec-class.Rd:23: unknown macro '\linkS4Class'
─ checking for empty or unneeded directoriesn/LatentNeuroVec-class.Rd:23: unknown macro '\linkS4Class'

  • installing source package ‘neuroim2’ ...
    ** using staged installation
    ** libs
    clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include -fPIC "-mtune=native -g O2 -Wall -pedantic -Wconversion" -c RcppExports.cpp -o RcppExports.o
    error: unknown target CPU 'native -g O2 -Wall -pedantic -Wconversion'
    note: valid target CPU values are: i386, i486, winchip-c6, winchip2, c3, i586, pentium, pentium-mmx, pentiumpro, i686, pentium2, pentium3, pentium3m, pentium-m, c3-2, yonah, pentium4, pentium4m, prescott, nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, lakemont, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-xp, athlon-mp, athlon-4, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, geode
    make: *** [RcppExports.o] Error 1
    ERROR: compilation failed for package ‘neuroim2’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/neuroim2’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/mk/9_clkwx513df94kdv85c25m80000gn/T//RtmpeSwXX1/file24177264035f/neuroim2_0.7.0.tar.gz’ had non-zero exit status
@bbuchsbaum
Copy link
Owner

\linkS4Class mispelled in neuroim2, have just fixed in neuroim2 repository.

@ptsii
Copy link
Author

ptsii commented Apr 20, 2023

Thanks for the quick assessment!

However, I still get an error:

> install_github("bbuchsbaum/neuroim2")
Downloading GitHub repo bbuchsbaum/neuroim2@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/mk/9_clkwx513df94kdv85c25m80000gn/T/RtmpeSwXX1/remotes2417639f99a8/bbuchsbaum-neuroim2-8177731/DESCRIPTION’ (1.8s)
✔  checking DESCRIPTION meta-information ...
─  cleaning src
   
* installing *source* package ‘neuroim2’ ...
** using staged installation
** libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I/usr/local/include   -fPIC  "-mtune=native -g O2 -Wall -pedantic -Wconversion" -c RcppExports.cpp -o RcppExports.o
error: unknown target CPU 'native -g O2 -Wall -pedantic -Wconversion'
note: valid target CPU values are: i386, i486, winchip-c6, winchip2, c3, i586, pentium, pentium-mmx, pentiumpro, i686, pentium2, pentium3, pentium3m, pentium-m, c3-2, yonah, pentium4, pentium4m, prescott, nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, lakemont, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-xp, athlon-mp, athlon-4, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, geode
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘neuroim2’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/neuroim2’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/mk/9_clkwx513df94kdv85c25m80000gn/T//RtmpeSwXX1/file241732117b1/neuroim2_0.7.0.tar.gz’ had non-zero exit status

I'm wondering if this is the problem: "error: unknown target CPU"?

@bbuchsbaum
Copy link
Owner

I'm afraid this one is in your court. You need a working R build toolchain for your mac laptop.

see:

https://stackoverflow.com/questions/70638118/configuring-compilers-on-apple-silicon-big-sur-monterey-ventura-for-rcpp-and

@ptsii
Copy link
Author

ptsii commented Apr 22, 2023

Can you elaborate? My laptop isn't apple silicon, it is intel. But the link you provided references apple silicon. Also, I've compiled many R libraries successfully (e.g., recently ANTsR). What is the issue with rMVPA that is different from these other libraries?

@bbuchsbaum
Copy link
Owner

I don't know the issue, but I know compiling R sources on Mac can be tricky. can you compile the following?

Rcpp::sourceCpp(code='
#include <Rcpp.h>

// [[Rcpp::export]]
int fibonacci(const int x) {
if (x == 0) return(0);
if (x == 1) return(1);
return (fibonacci(x - 1)) + fibonacci(x - 2);
}'
,verbose=T)

see:
https://discourse.mc-stan.org/t/problem-compling-rstan-models-on-mac-m1-with-clang-13-0-0/26184

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

2 participants