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

[fastrtps] Fix the macro definition in thread #32921

Closed
wants to merge 20 commits into from
Closed

[fastrtps] Fix the macro definition in thread #32921

wants to merge 20 commits into from

Conversation

jimwang118
Copy link
Contributor

@jimwang118 jimwang118 commented Aug 3, 2023

Fix vcpkg testing MSVC issues.
D:\buildtrees\fastrtps\src\v2.7.0-02c5279eff.clean\include\fastrtps/utils/TimedMutex.hpp(142): error C2065: '_Thrd_success': undeclared identifier
Starting from msvc 19.38.32926.95, the macro _Thrd_success is modified to _Thrd_result::_Success in thread, thus causing the above error.
We judge the msvc version in cmakelists.txt. If the version is greater than or equal to 19.38.32926.95, then modify the macro only used in fastrtps from _Thrd_success to _Thrd_result::_Success.
A issue 3783 has been submitted upstream.

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@jimwang118 jimwang118 added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Aug 3, 2023
LilyWangLL
LilyWangLL previously approved these changes Aug 3, 2023
@jimwang118 jimwang118 marked this pull request as ready for review August 9, 2023 01:59
LilyWangLL
LilyWangLL previously approved these changes Aug 10, 2023
@LilyWangLL LilyWangLL added the info:reviewed Pull Request changes follow basic guidelines label Aug 10, 2023
@BillyONeal
Copy link
Member

It would be better to use the cast solution suggested by @StephanTLavavej in eProsima/Fast-DDS#3783 (comment) .

@JavierMatosD JavierMatosD marked this pull request as draft August 10, 2023 21:21
@LilyWangLL LilyWangLL removed the info:reviewed Pull Request changes follow basic guidelines label Aug 11, 2023
@jimwang118 jimwang118 marked this pull request as ready for review August 17, 2023 02:07
@LilyWangLL LilyWangLL marked this pull request as draft August 21, 2023 06:07
@LilyWangLL
Copy link
Contributor

After applied this patch, fastrtps still build failed with the following error:

C:\PROGRA~1\MICROS~3\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\HostX64\x64\cl.exe   /TP -DASIO_DISABLE_VISIBILITY -DASIO_STANDALONE -DBOOST_ASIO_STANDALONE -DFASTCDR_DYN_LINK -DFASTRTPS_DYN_LINK -DFASTRTPS_SOURCE -DFOONATHAN_MEMORY=1 -DFOONATHAN_MEMORY_VERSION_MAJOR=0 -DFOONATHAN_MEMORY_VERSION_MINOR=7 -DFOONATHAN_MEMORY_VERSION_PATCH=3 -DNOMINMAX -DSHM_TRANSPORT_BUILTIN -DSQLITE_WIN32_GETVERSIONEX=0 -DTINYXML2_DEBUG -DTINYXML2_IMPORT -D_ENABLE_ATOMIC_ALIGNMENT_FIX -D_WIN32_WINNT=0x0601 -Dfastrtps_EXPORTS -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\thirdparty\nlohmann-json -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\thirdparty\filewatch -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include -IE:\Lily\fastrp\buildtrees\fastrtps\x64-windows-dbg\include -IE:\Lily\fastrp\buildtrees\fastrtps\x64-windows-dbg\include\fastrtps -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\src\cpp -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\thirdparty\boost\include -IE:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\thirdparty\taocpp-pegtl -external:IE:\Lily\fastrp\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /W4 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -MDd /w34101 /w34189 /w34555 /w34715 /w35038 /showIncludes /Fosrc\cpp\CMakeFiles\fastrtps.dir\rtps\resources\ResourceEvent.cpp.obj /Fdsrc\cpp\CMakeFiles\fastrtps.dir\ /FS -c E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\src\cpp\rtps\resources\ResourceEvent.cpp
E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include\fastrtps/utils/TimedMutex.hpp(46): error C3861: '_Mtx_init': identifier not found
E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include\fastrtps/utils/TimedMutex.hpp(56): error C3861: '_Mtx_destroy': identifier not found
E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include\fastrtps/utils/TimedMutex.hpp(117): error C3861: '_Mtx_init': identifier not found
E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include\fastrtps/utils/TimedMutex.hpp(127): error C3861: '_Mtx_destroy': identifier not found
E:\Lily\fastrp\buildtrees\fastrtps\src\v2.7.0-831b33fc2a.clean\include\fastrtps/utils/TimedMutex.hpp(142): error C2677: binary '==': no global operator found which takes type '_Thrd_result' (or there is no acceptable conversion)

@jimwang118
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jimwang118 jimwang118 closed this by deleting the head repository Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants