soichiroy / emlogit

ECM algorithm for the multinomial logit model
GNU General Public License v3.0
1 stars 1 forks source link

cannot install required openMP on macOS #3

Closed kuriwaki closed 4 years ago

kuriwaki commented 4 years ago

Do you have any recommendations for installing OpenMP? I cannot install your package because of it.

I know this is not a problem with your package specifically. I tried for example this modification of Makevars from the data.table doc but that gave me the same error.

The downloaded binary packages are in
    /var/folders/gy/sd6ddp895s7dyqbdh2432fwm0000gn/T//Rtmpy8UECa/downloaded_packages
✓  checking for file ‘/private/var/folders/gy/sd6ddp895s7dyqbdh2432fwm0000gn/T/Rtmpy8UECa/remotesb98e449a55b9/soichiroy-emlogit-d8858a4/DESCRIPTION’ ...
─  preparing ‘emlogit’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘emlogit_0.1.0.tar.gz’

* installing *source* package ‘emlogit’ ...
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘emlogit’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/emlogit’
Error: Failed to install 'emlogit' from GitHub:
  (converted from warning) installation of package ‘/var/folders/gy/sd6ddp895s7dyqbdh2432fwm0000gn/T//Rtmpy8UECa/fileb98e35661063/emlogit_0.1.0.tar.gz’ had non-zero exit status
sou412 commented 4 years ago

@kuriwaki Good point. I removed all the flags related to OpenMP which were not necessary in the first place. Could you try installing the package again?

kuriwaki commented 4 years ago

works fine now! Thanks a lot.