Skip to content

LTO mismatch with dgemm with RcppArmadillo and R core definitions #343

Closed
@mattfidler

Description

@mattfidler

Hi @eddelbuettel

I think there may be a RcppArmadillo LTO issue that is described by the following log:

https://www.stats.ox.ac.uk/pub/bdr/LTO/RxODE.out

To save you time in parsing, it boils down to the following:

/data/gannet/ripley/R/R-devel/include/R_ext/BLAS.h:207:1: warning: type of ‘dgemm_’ does not match original declaration [-Wlto-type-mismatch]
  207 | F77_NAME(dgemm)(const char *transa, const char *transb, const int *m,
      | ^
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/def_blas.hpp:115:8: note: type mismatch in parameter 14
  115 |   void arma_fortran(arma_dgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const double*   alpha, const double*   A, const blas_int* ldA, const double*   B, const blas_int* ldB, const double*   beta, double*   C, const blas_int* ldC, blas_len transA_len, blas_len transB_len) ARMA_NOEXCEPT;
      |        ^
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/def_blas.hpp:115:8: note: type ‘blas_len’ should match type ‘void’
/data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/def_blas.hpp:115:8: note: ‘dgemm_’ was previously declared here

My guess is the LTO compile options have changed and become more restrictive (ie flto=10). I did (with your help) also change the headers to strict R headers, though I think that is unrelated

Perhaps my reading of the error message is incorrect. I thought I would bring it to your attention.

While I do not wish to, I may have to move and modify the armadillo headers (because of the fix by 2021-09-02 CRAN deadline).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions