Skip to content

Conversation

@MonicaLiu0311
Copy link
Contributor

@MonicaLiu0311 MonicaLiu0311 commented Apr 13, 2023

In MSVC internal testing we found that xtime has been changed to _timespec64 since microsoft/STL#3594, causing the following errors:

D:\buildtrees\fastrtps\src\v2.7.0-5b113921c9.clean\include\fastrtps/utils/TimedMutex.hpp(93): error C2065: 'xtime': undeclared identifier
D:\buildtrees\fastrtps\src\v2.7.0-5b113921c9.clean\include\fastrtps/utils/TimedMutex.hpp(93): error C2059: syntax error: ')'

This issue can be fixed by replacing xtime with _timespec64 as a temporary workaround for upcoming releases.

I've opened an issue upstream to notify: eProsima/Fast-DDS#3451

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • 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.

@MonicaLiu0311 MonicaLiu0311 added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Apr 13, 2023
BillyONeal
BillyONeal previously approved these changes Apr 13, 2023
@Cheney-W Cheney-W marked this pull request as ready for review April 14, 2023 02:51
@Cheney-W Cheney-W added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Apr 14, 2023
@Cheney-W Cheney-W changed the title [fastrtps] Replace xtime with _timespec64 [fastrtps] Replace xtime with _timespec64 for fixing error C2065 Apr 14, 2023
@BillyONeal BillyONeal merged commit 809266d into microsoft:master Apr 14, 2023
@BillyONeal
Copy link
Member

Thanks!

@MonicaLiu0311 MonicaLiu0311 deleted the Dev/Monica/fix_fastrtps branch April 14, 2023 05:58
@dg0yt
Copy link
Contributor

dg0yt commented Jun 27, 2023

And now this breaks vcpkg CI.
https://dev.azure.com/vcpkg/public/_build/results?buildId=91242&view=results

FAILED: src/cpp/CMakeFiles/fastrtps.dir/rtps/resources/ResourceEvent.cpp.obj 
C:\PROGRA~1\MICROS~1\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 -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\thirdparty\nlohmann-json -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\thirdparty\filewatch -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\include -ID:\buildtrees\fastrtps\x64-windows-dbg\include -ID:\buildtrees\fastrtps\x64-windows-dbg\include\fastrtps -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\src\cpp -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\thirdparty\boost\include -ID:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\thirdparty\taocpp-pegtl -external:ID:\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 D:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\src\cpp\rtps\resources\ResourceEvent.cpp
D:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\include\fastrtps/utils/TimedMutex.hpp(93): error C2664: 'int _Mtx_timedlock(_Mtx_t,const xtime *)': cannot convert argument 2 from '_timespec64 *' to 'const xtime *'
D:\buildtrees\fastrtps\src\v2.7.0-d1949b3923.clean\include\fastrtps/utils/TimedMutex.hpp(93): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast

@Cheney-W
Copy link
Contributor

Fixing by #32257

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:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants