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

Is magic_enum supported on WindRiver VxWorks 7 SR 0640 LLVM/Clang 9.0.1 #344

Open
fnj7 opened this issue Apr 22, 2024 · 3 comments
Open

Comments

@fnj7
Copy link

fnj7 commented Apr 22, 2024

I have a multi-platform project that uses magic_enum.

Have successfully compiled and ran in the following configurations:

  • Windows 10 VS2019 CL compiler
  • Windows 10 VS2019 LLVM/Clang 9.0.1 compiler
  • Redhat 8 GNU 10 compiler

Attempting to compile example.cpp using WR Workbench 4.0, VxWorks 7 SR 0640, LLVM/Clang 9.0.1 and am experiencing several compilation issues similar to the following (full compile output can be provided if needed):

[ 50%] Building CXX object magic_enum-master/example/CMakeFiles/example.dir/C_/TEMP/enum_test/EnumTest/magic_enum-master/example/example.o
cd /c/TEMP/enum_test/EnumTest/vsb_SIMNTllvm_LP64/build/magic_enum-master/example && /C/Apps/WindRiver/WorkBench4.0/compilers/llvm-9.0.1.1/WIN64/bin/clang -I/C/TEMP/enum_test/EnumTest/magic_enum-master/include/magic_enum -gdwarf-3 --target=x86_64 -m64 -mcmodel=large -fno-omit-frame-pointer -mno-red-zone -ansi -fno-strict-aliasing -fno-builtin -D__vxworks -D__VXWORKS__ -D__RTP__ -D__ELF__ -nostdlibinc -nostdinc++ -D_USE_INIT_ARRAY -ftls-model=local-exec -std=c++17 -MD -MP -D_VX_CPU=VX_SIMNT -D_VX_TOOL_FAMILY=llvm -D_VX_TOOL=llvm -D_VSB_CONFIG_FILE="C:/TEMP/enum_test/EnumTest/../vxsim/vsb/h/config/vsbConfig.h" -IC:/TEMP/enum_test/EnumTest/../vxsim/vsb/share/h -isystem C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public -isystem C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h -Wall -Wextra -pedantic-errors -Werror -std=c++17 -o CMakeFiles/example.dir/C/TEMP/enum_test/EnumTest/magic_enum-master/example/example.o -c C:/TEMP/enum_test/EnumTest/magic_enum-master/example/example.cpp
In file included from C:/TEMP/enum_test/EnumTest/magic_enum-master/example/example.cpp:23:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\iostream:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\istream:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\ostream:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\ios:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xlocnum:8:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\streambuf:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xiosbase:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xlocale:6:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\stdexcept:5:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xstring:6:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xstring_view:4:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xmemory0:8:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xutility:6:
In file included from C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\utility:7:
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\type_traits:2988:24: error: no matching constructor for initialization of 'std::equal_to'
_NOTHROW_TEST(_Ret(_Func(_STD declval<_Func>(),
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\type_traits:228:37: note: expanded from macro '_NOTHROW_TEST'
#define _NOTHROW_TEST(x) noexcept(x)
^
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\type_traits:3006:5: note: in instantiation of template class 'std::_Is_nothrow_callable<true, std::equal_to (char, char), void>' requested here
: _Is_nothrow_callable<is_function<_Func(_Types...)>::value,
^
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\type_traits:3037:5: note: in instantiation of template class 'std::is_nothrow_callable<std::equal_to (char, char), void>' requested here
: is_nothrow_callable<_Func(_Types...)>
^
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\type_traits:3512:3: note: in instantiation of template class 'std::is_nothrow_invocable<std::equal_to, char, char>' requested here
is_nothrow_invocable<_Func, _Types...>::value;
^
C:/TEMP/enum_test/EnumTest/magic_enum-master/include/magic_enum/magic_enum.hpp:339:15: note: in instantiation of variable template specialization 'std::is_nothrow_invocable_r_v<bool, std::equal_to, char, char>' requested here
std::is_nothrow_invocable_r_v<bool, BinaryPredicate, char_type, char_type>;
^
C:/TEMP/enum_test/EnumTest/magic_enum-master/include/magic_enum/magic_enum.hpp:1358:117: note: in instantiation of function template specialization 'magic_enum::detail::is_nothrow_invocable<std::equal_to >' requested here
[[nodiscard]] constexpr auto enum_cast(string_view value, [[maybe_unused]] BinaryPredicate p = {}) noexcept(detail::is_nothrow_invocable()) -> detail::enable_if_t<E, optional<std::decay_t>, BinaryPredicate> {
^
C:/TEMP/enum_test/EnumTest/magic_enum-master/example/example.cpp:52:13: note: in instantiation of exception specification for 'enum_cast<Color, magic_enum::detail::enum_subtype::common, std::equal_to >' requested here
auto c2 = magic_enum::enum_cast("BLUE");
^
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xstddef:319:9: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct equal_to
^
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xstddef:319:9: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
C:/TEMP/enum_test/EnumTest/../vxsim/vsb/usr/h/public\xstddef:319:9: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided

@fnj7
Copy link
Author

fnj7 commented May 7, 2024

Is there any information that can be shared to help me move forward.

Am I trying to do something that is not supported?

Has anyone tried Magic Enum on VxWorks 7 SR0640?

@Neargye
Copy link
Owner

Neargye commented May 7, 2024

Hi,
I can’t understand what the problem is, and unfortunately I’m not familiar with VxWorks.
I found only this issues #46

@fnj7
Copy link
Author

fnj7 commented May 8, 2024

Hi, I can’t understand what the problem is, and unfortunately I’m not familiar with VxWorks. I found only this issues #46

Thank you for taking the time to look. If I ever figure it out, I will let you know.

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

No branches or pull requests

2 participants