R version 4.6.0 alpha (2026-03-31 r89747 ucrt) Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > local({ + + tmp_dir <- tempfile("hdf5lib_smoke_") + dir.create(tmp_dir) + file.copy("smoke_test.c", file.path(tmp_dir, "smoke_test.c")) + file.copy("Makevars", file.path(tmp_dir, "Makevars")) + old_wd <- setwd(tmp_dir) + so_file <- paste0("smoke_test", .Platform$dynlib.ext) + tmp_h5 <- tempfile(fileext = ".h5") + + old_r_tests <- Sys.getenv("R_TESTS") + Sys.setenv(R_TESTS = "") + + on.exit({ + if (so_file %in% names(getLoadedDLLs())) { + dyn.unload(so_file) + gc() + Sys.sleep(0.2) + } + setwd(old_wd) + Sys.setenv(R_TESTS = old_r_tests) + try(silent = TRUE, unlink(tmp_dir, recursive = TRUE)) + }, add = TRUE) + + # Compile `smoke_test.c`: system() returns 0 on success. + compile_cmd <- paste(shQuote(file.path(R.home("bin"), "R")), 'CMD SHLIB smoke_test.c') + exit_status <- system(compile_cmd) + + if (exit_status != 0) + stop("R CMD SHLIB failed to compile smoke_test.c") + + if (!file.exists(so_file)) + stop(paste("Shared object missing at:", so_file)) + + + # Load the shared object + dyn.load(so_file) + + # Call the C function (from smoke_test.c) + version_str <- .Call("C_smoke_test", tmp_h5) + + # Verify results + if (!inherits(version_str, "character")) + stop("version_str is not a character") + + if (!file.exists(tmp_h5)) + stop("HDF5 file was not created by C code.") + + if (!grepl("^[0-9]+\\.[0-9]+\\.[0-9]+$", version_str)) + stop(paste("version_str did not match the expected pattern. Got:", version_str)) + + }) using C compiler: 'gcc.exe (GCC) 14.3.0' make[1]: Entering directory '/d/temp/2026_04_01_06_55_16_3646/RtmpUhO2PB/hdf5lib_smoke_8a007fb07751' gcc -I"D:/RCompile/recent/R/include" -DNDEBUG `D:/RCompile/recent/R/bin/Rscript -e "cat(hdf5lib::c_flags(200))"` -I"d:/rtools45/x86_64-w64-mingw32.static.posix/include" -pedantic -Wstrict-prototypes -O2 -Wall -std=gnu2x -mfpmath=sse -msse2 -mstackrealign -c smoke_test.c -o smoke_test.o gcc -shared -s -static-libgcc -o smoke_test.dll tmp.def smoke_test.o -LD:/RCompile/CRANincoming/R-devel/lib/hdf5lib/lib -lhdf5z -lpthread -lws2_32 -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools45/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R/bin/x64 -lR make[1]: Leaving directory '/d/temp/2026_04_01_06_55_16_3646/RtmpUhO2PB/hdf5lib_smoke_8a007fb07751' make[1]: Entering directory '/d/temp/2026_04_01_06_55_16_3646/RtmpUhO2PB/hdf5lib_smoke_8a007fb07751' make[1]: Leaving directory '/d/temp/2026_04_01_06_55_16_3646/RtmpUhO2PB/hdf5lib_smoke_8a007fb07751' Running Strict HDF5 Plugin Smoke Tests... Testing zlibng_gzip [OK] Testing szip_ec [OK] Testing szip_nn [OK] Testing bzip2 [OK] Testing lzf [OK] Testing lz4 [OK] Testing lz4hc [OK] Testing zstd [OK] Testing snappy [OK] Testing bshuf_pure [OK] Testing bshuf_lz4 [OK] Testing bshuf_zstd [OK] Testing zfp_rate [OK] Testing zfp_prec [OK] Testing zfp_acc [OK] Testing zfp_expert [OK] Testing zfp_rev [OK] Testing blosc_lz [OK] Testing blosc_lz4 [OK] Testing blosc_lz4hc [OK] Testing blosc_snappy [OK] Testing blosc_zlib [OK] Testing blosc_zstd [OK] Testing blosc2_lz [OK] Testing blosc2_lz4 [OK] Testing blosc2_lz4hc [OK] Testing blosc2_zlib [OK] Testing blosc2_zstd [OK] Testing blosc2_ndlz [OK] Testing b2_zfp_acc [OK] Testing b2_zfp_prec [OK] Testing b2_zfp_rate [OK] Testing blosc2_pipe [OK] > > proc.time() user system elapsed 0.75 0.26 4.79