Skip to content

Cannot build_site or build_lesson - ERROR: compilation failed for package 'digest' #665

@ehinman

Description

@ehinman

Please briefly describe your problem and what output you expect.
I am using GitLab to pull down a branch that uses sandpaper to build a carpentries-like lesson. When I open the .RProj for this lesson and run sandpaper::build_lesson(), it errors because the renv.lock file doesn't include sandpaper. After installing sandpaper, I then re-initialize renv and run sandpaper::build_lesson(). It starts installing the packages from the renv folder, but continually fails on the package digest.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.

Brief description of the problem

renv::init()
sandpaper::reset_site()
sandpaper::build_lesson()

Error: 
! in callr subprocess.
Caused by error: 
! Error installing package 'digest':
==================================

* installing *source* packagedigest...
** this is packagedigestversion0.6.36** packagedigestsuccessfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler:Apple clang version 16.0.0 (clang-1600.0.26.6)’
using C++ compiler:Apple clang version 16.0.0 (clang-1600.0.26.6)’
using SDK:MacOSX15.2.sdkclang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c SpookyV2.cpp -o SpookyV2.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c aes.c -o aes.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c blake3.c -o blake3.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c blake3_dispatch.c -o blake3_dispatch.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c blake3_portable.c -o blake3_portable.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c crc32.c -o crc32.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c crc32c.cpp -o crc32c.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c crc32c_portable.cpp -o crc32c_portable.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c digest.c -o digest.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c digest2int.c -o digest2int.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c md5.c -o md5.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c pmurhash.c -o pmurhash.o
clang -arch arm64 -std=gnu2x -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I.  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c raes.c -o raes.o
raes.c:25:3: error: use of undeclared identifier 'Free'; did you mean 'free'?
   25 |   Free(ctx);
      |   ^~~~
      |   free
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:56:7: note: 'free' declared here
   56 | void  free(void * __unsafe_indexable);
      |       ^
raes.c:42:44: error: expected expression
   42 |   ctx = (aes_context*)Calloc(sizeof(*ctx), char);
      |                                            ^
raes.c:42:23: error: use of undeclared identifier 'Calloc'
   42 |   ctx = (aes_context*)Calloc(sizeof(*ctx), char);
      |                       ^
3 errors generated.
make: *** [raes.o] Error 1
ERROR: compilation failed for packagedigest* removing/Users/ehinman/Review_Repos/usgs-data-quality-control-course/renv/profiles/lesson-requirements/renv/library/macos/R-4.5/aarch64-apple-darwin20/.renv/1/digestinstall of package 'digest' failed [error code 1]
ℹ See `$stdout` and `$stderr` for standard output and error.
Type .Last.error to see the more details.

Here's my system information

> Sys.info()
                                                                                                       sysname 
                                                                                                      "Darwin" 
                                                                                                       release 
                                                                                                      "23.6.0" 
                                                                                                       version 
"Darwin Kernel Version 23.6.0: Thu Apr 24 20:29:18 PDT 2025; root:xnu-10063.141.1.705.2~1/RELEASE_ARM64_T6000" 

Thank you!

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