Skip to content

criterion: Could not initialize inheritable arena: Not enough space, lib 2.3.2 msvc, Windows 10 X64 #525

Description

@Raduq91

v2.3.2
Tried this criterion-v2.3.2-windows-msvc-x86_64.tar.bz2

In VS2022 using msvc/Visual Studio 2022 (v143); (same with intel compiler):
sample code:

#include <criterion/criterion.h>

Test(misc, failing, .description = "Just a failing test") {
    cr_assert(0);
}

Test(misc, skipped, .description = " This one is skipped", .disabled = true) {
}

running the output exe:
criterion: Could not initialize inheritable arena: Not enough space

I built from the latest source using msys64 mingw, it built the same sample I tried and it worked:

E:\msys64\home\Radu\Criterion\build\samples>description.c.bin.exe
[----] ../samples/description.c:4: Assertion Failed
[----]
[----]   The expression 0 is false.
[----]
[FAIL] misc::failing: (0.00s)
[====] Synthesis: Tested: 1 | Passing: 0 | Failing: 1 | Crashing: 0

I tried the new "E:\msys64\home\Radu\Criterion\build\src\libcriterion.dll.a" as > criterion.lib (and the new include files and new built libcriterion-3.dll), same issue.

Tried this command from VS2022 project command prompt:

C:\Users\Radu\source\repos\clang_llvm_toolset>cl.exe clang_llvm_toolset.cpp /EHsc /I"C:\Users\Radu\source\repos\clang_llvm_toolset\Include" /link "C:\Users\Radu\source\repos\clang_llvm_toolset\criterion.lib" /ENTRY:mainCRTStartup
Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

clang_llvm_toolset.cpp
Microsoft (R) Incremental Linker Version 14.38.33130.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:clang_llvm_toolset.exe
C:\Users\Radu\source\repos\clang_llvm_toolset\criterion.lib
/ENTRY:mainCRTStartup
clang_llvm_toolset.obj
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_malloc referenced in function "void __cdecl criterion::`dynamic initializer for 'malloc''(void)" (??__Emalloc@criterion@@YAXXZ)
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_calloc referenced in function "void __cdecl criterion::`dynamic initializer for 'calloc''(void)" (??__Ecalloc@criterion@@YAXXZ)
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_realloc referenced in function "void __cdecl criterion::`dynamic initializer for 'realloc''(void)" (??__Erealloc@criterion@@YAXXZ)
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_free referenced in function "void __cdecl criterion::`dynamic initializer for 'free''(void)" (??__Efree@criterion@@YAXXZ)
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_asprintf referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_asprintf_free referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_send_assert referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_abort_test referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_test_die referenced in function __catch$?misc_failing_jmp@@YAXXZ$0
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_log referenced in function "void __cdecl criterion::logging::`dynamic initializer for 'log''(void)" (??__Elog@logging@criterion@@YAXXZ)
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cr_translate_assert_msg referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__cri_asserts_passed_incr referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_internal_test_setup referenced in function _misc_failing_impl
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_internal_test_main referenced in function __catch$?misc_failing_jmp@@YAXXZ$1
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_internal_test_teardown referenced in function __catch$?misc_failing_jmp@@YAXXZ$4
clang_llvm_toolset.obj : error LNK2019: unresolved external symbol __imp__criterion_options referenced in function _misc_failing_impl
LIBCMT.lib(exe_main.obj) : error LNK2019: unresolved external symbol _main referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
C:\Users\Radu\source\repos\clang_llvm_toolset\criterion.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
clang_llvm_toolset.exe : fatal error LNK1120: 17 unresolved externals

Added /machine:x64:

C:\Users\Radu\source\repos\clang_llvm_toolset>cl.exe clang_llvm_toolset.cpp /EHsc /I"C:\Users\Radu\source\repos\clang_llvm_toolset\Include" /link "C:\Users\Radu\source\repos\clang_llvm_toolset\criterion.lib" /ENTRY:mainCRTStartup /machine:x64
Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

clang_llvm_toolset.cpp
Microsoft (R) Incremental Linker Version 14.38.33130.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:clang_llvm_toolset.exe
C:\Users\Radu\source\repos\clang_llvm_toolset\criterion.lib
/ENTRY:mainCRTStartup
/machine:x64
clang_llvm_toolset.obj
clang_llvm_toolset.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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