1.2.10 The native library🔗ℹ

libglmnetcompat is R glmnet 4.1’s own double-precision Fortran, the last release with every family in Fortran, behind a small C-ABI shim. When the package loads, it checks that the library’s reals are 8 bytes (glmnet-default-real-bytes) and that it exports the entry points this version expects (glmnet-capi-abi-version).

The pre-install hook stages the library from the first of these that exists:

  1. the directory named by the GLMNET_NATIVE_LIB_PATH environment variable (its "lib" subdirectory), as the Nix build sets it;

  2. a library already staged in "glmnet/native-libs/";

  3. the prebuilt candidate for the platform under "glmnet/native-libs/candidates/".

To rebuild the library from source you need a Fortran toolchain:

# via Nix (also runs the Fortran ctest suite)

nix build .#native

 

# or directly with CMake and gfortran

cmake -S fortran -B fortran/build -DBUILD_TESTING=ON

cmake --build fortran/build

ctest --test-dir fortran/build --output-on-failure