Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More tests #2

Closed
kassane opened this issue Apr 25, 2023 · 4 comments
Closed

More tests #2

kassane opened this issue Apr 25, 2023 · 4 comments

Comments

@kassane
Copy link
Owner

kassane commented Apr 25, 2023

Linux-Musl

I am preparing CI tests that include aarch64-windows and embedded linux.
But there have been errors with embedded linux using musl:

Zig embedded (Windows & Linux): https://github.com/kassane/outcome/actions/runs/4789289925

Linux embedded w/ zig (musl):

zig build -DTests -Dtarget=aarch64-linux
zig build-exe issue0255 Debug aarch64-linux: error: error(compilation): clang failed with stderr: In file included from /home/kassane/outcome/test/tests/issue0255.cpp:24:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status_result.hpp:34:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_error2.hpp:28:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/error.hpp:29:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_code.hpp:29:
/home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/posix_code.hpp:47:22: error: functions that differ only in their return type cannot be overloaded
/home/kassane/zig/0.11.0-dev.2775+21aa55d34/files/lib/libc/include/generic-musl/string.h:66:5: note: previous declaration is here


zig build-exe issue0255 Debug aarch64-linux: error: the following command failed with 1 compilation errors:
/home/kassane/zig/0.11.0-dev.2775+21aa55d34/files/zig build-exe -cflags -Wall -Wextra -- /home/kassane/outcome/test/tests/issue0255.cpp -lc++ --cache-dir /home/kassane/outcome/zig-cache --global-cache-dir /home/kassane/.cache/zig --name issue0255 -target aarch64-linux -mcpu generic -I /home/kassane/outcome/test/quickcpplib/include -I /home/kassane/outcome/test/quickcpplib/include/quickcpplib --listen=-
zig build-exe issue0220 Debug aarch64-linux: error: error(compilation): clang failed with stderr: In file included from /home/kassane/outcome/test/tests/issue0220.cpp:24:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status_result.hpp:34:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_error2.hpp:28:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/error.hpp:29:
In file included from /home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_code.hpp:29:
/home/kassane/outcome/test/tests/../../include/outcome/experimental/status-code/include/status-code/posix_code.hpp:47:22: error: functions that differ only in their return type cannot be overloaded
/home/kassane/zig/0.11.0-dev.2775+21aa55d34/files/lib/libc/include/generic-musl/string.h:66:5: note: previous declaration is here


zig build-exe issue0220 Debug aarch64-linux: error: the following command failed with 1 compilation errors:
/home/kassane/zig/0.11.0-dev.2775+21aa55d34/files/zig build-exe -cflags -Wall -Wextra -- /home/kassane/outcome/test/tests/issue0220.cpp -lc++ --cache-dir /home/kassane/outcome/zig-cache --global-cache-dir /home/kassane/.cache/zig --name issue0220 -target aarch64-linux -mcpu generic -I /home/kassane/outcome/test/quickcpplib/include -I /home/kassane/outcome/test/quickcpplib/include/quickcpplib --listen=-
[...] resume - skip
├─ install issue0220 transitive failure
│  └─ zig build-exe issue0220 Debug aarch64-linux-musl 1 errors
├─ install issue0244 success
│  └─ zig build-exe issue0244 Debug aarch64-linux-musl success 2s MaxRSS:196M
├─ install issue0247 success
│  └─ zig build-exe issue0247 Debug aarch64-linux-musl success 2s MaxRSS:185M
├─ install issue0255 transitive failure
│  └─ zig build-exe issue0255 Debug aarch64-linux-musl 1 errors
└─ install issue0259 success
   └─ zig build-exe issue0259 Debug aarch64-linux-musl success 24s MaxRSS:196M

Zig w/ MSVC: https://github.com/kassane/outcome/actions/runs/4789289937

@kassane
Copy link
Owner Author

kassane commented Apr 26, 2023

bypass tests for musl abi

outcome/build.zig

Lines 193 to 201 in 2cd7aa6

if (!lib.target_info.target.isMusl()) {
buildTest(b, .{
.lib = lib,
.path = "test/tests/issue0220.cpp",
});
buildTest(b, .{
.lib = lib,
.path = "test/tests/issue0255.cpp",
});

@kassane
Copy link
Owner Author

kassane commented Jun 20, 2023

New tests with MSVC (test-msvc branch)

outcome/build.zig

Lines 271 to 277 in d154f77

if (info.lib.target.isWindows()) {
if (info.lib.target.getAbi() != .msvc)
test_exe.linkLibCpp()
else
test_exe.linkLibC();
test_exe.subsystem = .Console;
}

https://github.com/kassane/outcome/actions/runs/5323326728

x86_64

 +- install experimental-p0709a success
|  +- zig build-exe experimental-p0709a Debug x86_64-windows-msvc success 961ms MaxRSS:50M
+- install experimental-core-outcome-status success
|  +- zig build-exe experimental-core-outcome-status Debug x86_64-windows-msvc success 4s MaxRSS:50M
+- install experimental-core-result-status success
|  +- zig build-exe experimental-core-result-status Debug x86_64-windows-msvc success 4s MaxRSS:50M
+- install issue0259 success
   +- zig build-exe issue0259 Debug x86_64-windows-msvc success 4s MaxRSS:50M
error: lld-link: undefined symbol: class outcome_v2::basic_result<int, class std::error_code, struct outcome_v2::policy::error_code_throw_as_system_error<int, class std::error_code, void>> __cdecl unknown(void)
    note: referenced by D:\a\outcome\outcome\test\constexprs\max_result_get_value.cpp:36
    note:               D:\a\outcome\outcome\zig-cache\o\ce08a147e079231f107601dc4113081c\max_result_get_value.obj:(int __cdecl test1(void))
error: lld-link: undefined symbol: class outcome_v2::basic_result<int, class std::error_code, struct outcome_v2::policy::error_code_throw_as_system_error<int, class std::error_code, void>> __cdecl unknown(void)
    note: referenced by D:\a\outcome\outcome\test\constexprs\max_result_construct_value_move_destruct.cpp:37
    note:               D:\a\outcome\outcome\zig-cache\o\34e14b8115d5109bb306347cf955a4ab\max_result_construct_value_move_destruct.obj:(int __cdecl test1(void))

x86 and aarch64

# x86
error: lld-link: undefined symbol: void __cdecl __ExceptionPtrDestroy(void *)
    note: referenced by C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\include\exception:232
    note:               D:\a\outcome\outcome\zig-cache\o\13d54646001d4ebcc6381e697d836a82\single-header-test.obj:(public: __thiscall std::exception_ptr::~exception_ptr(void))
error: lld-link: libcmtd.lib(std_type_info_static.obj): machine type x64 conflicts with x86
error: lld-link: libcmtd.lib(std_type_info_static.obj): machine type x64 conflicts with x86
error: lld-link: libcmtd.lib(delete_scalar_size.obj): machine type x64 conflicts with x86
error: lld-link: libcmtd.lib(chkstk.obj): machine type x64 conflicts with x86
error: lld-link: libcmtd.lib(delete_scalar.obj): machine type x64 conflicts with x86
error: lld-link: libucrtd.lib(debug_heap.obj): machine type x64 conflicts with x86
error: lld-link: libcmtd.lib(gs_report.obj): machine type x64 conflicts with x86
#[...]

# arm64
+- install issue0259 transitive failure
   +- zig build-exe issue0259 Debug aarch64-windows-msvc 298 errors
error: lld-link: libcmtd.lib(amdsecgs.obj): machine type x64 conflicts with arm64
error: lld-link: libcmtd.lib(gs_cookie.obj): machine type x64 conflicts with arm64
error: lld-link: libcpmtd.lib(excptptr.obj): machine type x64 conflicts with arm64
error: lld-link: libcmtd.lib(gs_report.obj): machine type x64 conflicts with arm64
error: lld-link: libcmtd.lib(delete_scalar_size.obj): machine type x64 conflicts with arm64
error: lld-link: libcmtd.lib(utility.obj): machine type x64 conflicts with arm64
error: lld-link: libvcruntimed.lib(memcpy.obj): machine type x64 conflicts with arm64
error: lld-link: libvcruntimed.lib(memset.obj): machine type x64 conflicts with arm64
error: lld-link: libucrtd.lib(free.obj): machine type x64 conflicts with arm64

cc: @michal-z @ned14

related in ziglang/zig#15448

@kassane
Copy link
Owner Author

kassane commented Jun 20, 2023

Latest commit: 1403dad

successful build to x86_64:
https://github.com/kassane/outcome/actions/runs/5324168411/jobs/9643086657

@kassane
Copy link
Owner Author

kassane commented Jun 29, 2023

successful build: https://github.com/kassane/outcome/actions/runs/5415320216
zig + xwin (hermetic build - MSVC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant