You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Carel Combrink <ca...@gmail.com> on 2025/11/03 06:18:51 UTC
Re: Thrift 0.22.0 breaks building a shared library on Windows with MSVC
Hi Jens, Uilian,
> Would it make sense to add some automated tests in that regard? If we
> support it, we should test it, to detect such kind of issues early, not
> 6 months after.
>
This option should probably be added to the Windows AppVeyor builds since
I don't see GitHub action support for Windows. Will see what can be done
since I am not familiar with AppVeyor nor how and when those builds are
executed as part of the code review process.
> So if the consensus now is that we should do it, send a PR to export
> this specific symbol again. Someone will take care.
I will try to create a ticket and PR today for a possible solution to the
problem based on my initial tests here: Singleton instance function
instead of the GlobalOutput by CJCombrink · Pull Request #5 ·
CJCombrink/thrift <https://github.com/CJCombrink/thrift/pull/5>
I have tested with conan locally and it seems to work as expected.
Regards,
Carel
Re: Thrift 0.22.0 breaks building a shared library on Windows with MSVC
Posted by Uilian Ries <ui...@gmail.com>.
Thank you very much you all!
On Mon, Nov 3, 2025 at 1:36 PM Carel Combrink <ca...@gmail.com>
wrote:
> Hi,
>
> I have created the following ticket: [THRIFT-5898] Unable to build Thrift
> as a shared library on Windows - ASF JIRA
> <https://issues.apache.org/jira/browse/THRIFT-5898>
> and associated PR: https://github.com/apache/thrift/pull/3077/files
>
>
> >
> >> Would it make sense to add some automated tests in that regard? If we
> >> support it, we should test it, to detect such kind of issues early, not
> >> 6 months after.
> >>
> >
> > This option should probably be added to the Windows AppVeyor builds
> since
> > I don't see GitHub action support for Windows. Will see what can be done
> > since I am not familiar with AppVeyor nor how and when those builds are
> > executed as part of the code review process.
> >
> > Looking at the current AppVeyor builds of Thrift I see that the Windows
> shared build is failing for the exact same reason but this is probably not
> highlighted enough during the PR process.
> Just looking at the latest PR: Bump com.ncorti.ktfmt.gradle from 0.24.0 to
> 0.25.0 in /lib/kotlin by dependabot[bot] · Pull Request #3225 ·
> apache/thrift <https://github.com/apache/thrift/pull/3225>
> On the associated AppVeyor build for "PROFILE=MSVC2017, PROFILE_CLASS=MSVC,
> APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2017, PLATFORM=x64,
> CONFIGURATION=Release, BUILD_SHARED_LIBS=ON"
> thrift 0.23.0.8357 - AppVeyor
> <
> https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/builds/53004510/job/w2nhxlj7hng6esxa
> >
> one see the same compiler error
>
> {code}
> ThrifttReadCheckTests.obj : error LNK2019: unresolved external symbol
> "class apache::thrift::TOutput apache::thrift::GlobalOutput"
> (?GlobalOutput@thrift@apache@@3VTOutput@12@A) referenced in function
> __catch$??1TFDTransport@transport@thrift@apache@@UEAA@XZ$0
> [C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
> testgencpp.lib(OneWayService.obj) : error LNK2001: unresolved external
> symbol "class apache::thrift::TOutput apache::thrift::GlobalOutput"
> (?GlobalOutput@thrift@apache@@3VTOutput@12@A)
> [C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
> C:\projects\build\MSVC2017\x64\bin\Release\UnitTests.exe : fatal error
> LNK1120: 1 unresolved externals
> [C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
> {code}
>
> Regards,
> Carel
>
--
Cordialmente,
Uilian Ries
<ui...@gmail.com>
Re: Thrift 0.22.0 breaks building a shared library on Windows with MSVC
Posted by Carel Combrink <ca...@gmail.com>.
Hi,
I have created the following ticket: [THRIFT-5898] Unable to build Thrift
as a shared library on Windows - ASF JIRA
<https://issues.apache.org/jira/browse/THRIFT-5898>
and associated PR: https://github.com/apache/thrift/pull/3077/files
>
>> Would it make sense to add some automated tests in that regard? If we
>> support it, we should test it, to detect such kind of issues early, not
>> 6 months after.
>>
>
> This option should probably be added to the Windows AppVeyor builds since
> I don't see GitHub action support for Windows. Will see what can be done
> since I am not familiar with AppVeyor nor how and when those builds are
> executed as part of the code review process.
>
> Looking at the current AppVeyor builds of Thrift I see that the Windows
shared build is failing for the exact same reason but this is probably not
highlighted enough during the PR process.
Just looking at the latest PR: Bump com.ncorti.ktfmt.gradle from 0.24.0 to
0.25.0 in /lib/kotlin by dependabot[bot] · Pull Request #3225 ·
apache/thrift <https://github.com/apache/thrift/pull/3225>
On the associated AppVeyor build for "PROFILE=MSVC2017, PROFILE_CLASS=MSVC,
APPVEYOR_BUILD_WORKER_IMAGE=Visual Studio 2017, PLATFORM=x64,
CONFIGURATION=Release, BUILD_SHARED_LIBS=ON"
thrift 0.23.0.8357 - AppVeyor
<https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/builds/53004510/job/w2nhxlj7hng6esxa>
one see the same compiler error
{code}
ThrifttReadCheckTests.obj : error LNK2019: unresolved external symbol
"class apache::thrift::TOutput apache::thrift::GlobalOutput"
(?GlobalOutput@thrift@apache@@3VTOutput@12@A) referenced in function
__catch$??1TFDTransport@transport@thrift@apache@@UEAA@XZ$0
[C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
testgencpp.lib(OneWayService.obj) : error LNK2001: unresolved external
symbol "class apache::thrift::TOutput apache::thrift::GlobalOutput"
(?GlobalOutput@thrift@apache@@3VTOutput@12@A)
[C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
C:\projects\build\MSVC2017\x64\bin\Release\UnitTests.exe : fatal error
LNK1120: 1 unresolved externals
[C:\projects\build\MSVC2017\x64\lib\cpp\test\UnitTests.vcxproj]
{code}
Regards,
Carel