Skip to content

[macOS] Build fails: compute_groupcond_logl.cpp:33:3: error: 'omp_set_num_threads' was not declared in this scope #2

@barracuda156

Description

@barracuda156

This is a CRAN version.

* installing *source* package ‘lavacreg’ ...
** package ‘lavacreg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++-mp-13 (MacPorts gcc13 13.2.0_3) 13.2.0’
Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) :
  running command ''xcrun' --show-sdk-path 2>&1' had status 64
using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/Rcpp/include' -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/RcppArmadillo/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c RcppExports.cpp -o RcppExports.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/Rcpp/include' -I'/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/RcppArmadillo/include' -isystem/opt/local/include/LegacySupport -I/opt/local/include    -fPIC  -pipe -Os -arch ppc  -c compute_groupcond_logl.cpp -o compute_groupcond_logl.o
compute_groupcond_logl.cpp: In function 'double compute_groupcond_logl(arma::colvec, arma::mat, arma::mat, arma::colvec, arma::mat, arma::colvec, arma::mat, arma::mat, double, arma::colvec, arma::mat, arma::mat, arma::colvec, arma::mat, arma::mat, arma::vec, arma::colvec, arma::mat, arma::mat, int)':
compute_groupcond_logl.cpp:33:3: error: 'omp_set_num_threads' was not declared in this scope
   33 |   omp_set_num_threads(cores);
      |   ^~~~~~~~~~~~~~~~~~~
make: *** [compute_groupcond_logl.o] Error 1
ERROR: compilation failed for package ‘lavacreg’
* removing ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-lavacreg/R-lavacreg/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/lavacreg’
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-lavacreg/R-lavacreg/work/lavacreg" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-lavacreg/R-lavacreg/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library 
Exit code: 1

I do not see -fopenmp being passed. If it needs OpenMP, it should a) check for its support and b) add flags. Otherwise it should not rely on OpenMP being present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions