You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2021/12/01 18:26:46 UTC
Minimum msvc version to compile apr/trunk on Windows
So I tried few Microsoft Visual Studio versions...
#1 Visual Studio 2008
>cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DAPR_BUILD_TESTAPR=ON
-- The C compiler identification is MSVC 15.0.30729.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
>ninja
...
C:\Workplace\apacheapr\trunk\xml\apr_xml_xmllite.c(629) : error C4233:
nonstandard extension used : '__uuidof' keyword only supported in C++, not C
C:\Workplace\apache\apr\trunk\xml\apr_xml_xmllite.c(629) : error C2059:
syntax error : ','
[33/386] Building ...
ninja: build stopped: subcommand failed.
So it fails
Delete build directory and setup another version
#2 Visual Studio 2010
>cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DAPR_BUILD_TESTAPR=ON
-- The C compiler identification is MSVC 16.0.40219.1
-- Detecting C compiler ABI info
>ninja
...
C:\Workplace\apache\apr\trunk\dso\win32\dso.c(84) : error C2065:
'LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR' : undeclared identifier
[48/386] Building ...
ninja: build stopped: subcommand failed.
OK it went further, but still fails
Delete build directory and setup another version
#3 Visual Studio 2012
>cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DAPR_BUILD_TESTAPR=ON
-- The C compiler identification is MSVC 17.0.50727.1
-- Detecting C compiler ABI info
>ninja
...
C:\Workplace\apache\apr\trunk\json\apr_json_encode.c(110) : error C2275:
'apr_size_t' : illegal use of this type as an expression
...
C:\Workplace\apache\apr\trunk\json\apr_json_encode.c(137) : error C2065:
'left': undeclared identifier
[72/386] ...
ninja: build stopped: subcommand failed.
I'll check VS2015 and VS2017.
So far only VS2019 works.
Regards
--
^TM
Re: Minimum msvc version to compile apr/trunk on Windows
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Fri, Dec 10, 2021 at 8:47 AM Ivan Zhakov <iv...@visualsvn.com> wrote:
>
> On Thu, 2 Dec 2021 at 22:33, Mladen Turk <mt...@apache.org> wrote:
>>
>> Issues with API beyond Windows SDK 7.1.A
>> (Latest one supporting Windows 7.1sp1)
>>
>> It just means apr-2 won't be able to run on anything below Windows 10.
>> There a lots of code you added recently that uses that new API
>> breaking also possibility to port that back to 1.7.x, 1.6.x branch.
>>
>> Dunno, maybe that's a good thing after all.
>>
> We discussed some time ago that minimum version for APR trunk is Windows 7/Windows Server 2008 R2:
> https://lists.apache.org/thread.html/de5af5247324db3e0636a654f2c23d3ff3a94a91f9d35adf5402b927@%3Cdev.apr.apache.org%3E
>
> As far I'm aware APR trunk should work fine in Windows 7/Windows Server 2008 R2.
Correct, although we should begin ignoring these EOL operating systems
which expired
2 years ago at this point.
Oct 10, 2023 is the end of Extended EOL of Windows Server 2012 and Windows 8.1,
and by the end of next year, they should also be dropped.
As we call API functions that aren't present before the Windows 10
API, we simply need
to add new dll's such as ws2tcpip.dll to misc/win32/misc.c and api
function prototypes
to include/arch/win32/apr_arch_misc.h.
Right now we should be axing a number of these in apr_arch_misc.h
which have been
present since Server 2012 for the apr 2.0 master branch.
There's a lot of confusion; we should simply define WIN32_WINNT now as
0x0A0A and
be done with it. We simply need to do the work around missing calls.
And will need a
somewhat more dynamic expression for things like APR_HAS_ macros which depend
on the -current- os level.
Re: Minimum msvc version to compile apr/trunk on Windows
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Thu, 2 Dec 2021 at 22:33, Mladen Turk <mt...@apache.org> wrote:
>
>
> On 02/12/2021 13:21, Ivan Zhakov wrote:
> > On Wed, 1 Dec 2021 at 21:26, Mladen Turk <mturk@apache.org
> > <ma...@apache.org>> wrote:
> >
> >
> > So no uuidof used in recent Windows SDK.
> >
> > Btw Visual Studio 2008 support ended April 10, 2018 [1].
> >
>
> Sure, being abld to build with VS2008 is not a problem.
> Issues with API beyond Windows SDK 7.1.A
> (Latest one supporting Windows 7.1sp1)
>
> It just means apr-2 won't be able to run on anything below Windows 10.
> There a lots of code you added recently that uses that new API
> breaking also possibility to port that back to 1.7.x, 1.6.x branch.
>
> Dunno, maybe that's a good thing after all.
>
> We discussed some time ago that minimum version for APR trunk is Windows
7/Windows Server 2008 R2:
https://lists.apache.org/thread.html/de5af5247324db3e0636a654f2c23d3ff3a94a91f9d35adf5402b927@%3Cdev.apr.apache.org%3E
As far I'm aware APR trunk should work fine in Windows 7/Windows Server
2008 R2.
--
Ivan Zhakov
Re: Minimum msvc version to compile apr/trunk on Windows
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Thu, Dec 2, 2021 at 1:33 PM Mladen Turk <mt...@apache.org> wrote:
>
> On 02/12/2021 13:21, Ivan Zhakov wrote:
> > On Wed, 1 Dec 2021 at 21:26, Mladen Turk <mturk@apache.org
> > <ma...@apache.org>> wrote:
> >
> > So no uuidof used in recent Windows SDK.
> >
> > Btw Visual Studio 2008 support ended April 10, 2018 [1].
>
> Sure, being abld to build with VS2008 is not a problem.
> Issues with API beyond Windows SDK 7.1.A
> (Latest one supporting Windows 7.1sp1)
Got it backwards. We'll need -builders- to use an SDK that supports 20H2
to pick up the logic for AF_UNIX and 21H2 for as advanced tcp constructs
to resolve origin ip etc.
The fact the SDK is for a newer OS does not render it incompatible
with the older OS.
Only once we use the new API binding and try to load it directly in
the old OS, without
using delayed binding and fallback on failure to resolve the new function.
Re: Minimum msvc version to compile apr/trunk on Windows
Posted by Mladen Turk <mt...@apache.org>.
On 02/12/2021 13:21, Ivan Zhakov wrote:
> On Wed, 1 Dec 2021 at 21:26, Mladen Turk <mturk@apache.org
> <ma...@apache.org>> wrote:
>
>
> So no uuidof used in recent Windows SDK.
>
> Btw Visual Studio 2008 support ended April 10, 2018 [1].
>
Sure, being abld to build with VS2008 is not a problem.
Issues with API beyond Windows SDK 7.1.A
(Latest one supporting Windows 7.1sp1)
It just means apr-2 won't be able to run on anything below Windows 10.
There a lots of code you added recently that uses that new API
breaking also possibility to port that back to 1.7.x, 1.6.x branch.
Dunno, maybe that's a good thing after all.
Regards
--
^TM
Re: Minimum msvc version to compile apr/trunk on Windows
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Wed, 1 Dec 2021 at 21:26, Mladen Turk <mt...@apache.org> wrote:
> So I tried few Microsoft Visual Studio versions...
>
> #1 Visual Studio 2008
> >cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DAPR_BUILD_TESTAPR=ON
> -- The C compiler identification is MSVC 15.0.30729.1
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
>
> >ninja
> ...
> C:\Workplace\apacheapr\trunk\xml\apr_xml_xmllite.c(629) : error C4233:
> nonstandard extension used : '__uuidof' keyword only supported in C++, not
> C
>
Hi Mladen,
What Windows SDK do you use with Visual Studio 2008?
The code in question is:
[[[
hr = CreateXmlReader(&IID_IXmlReader, &parser->xp->xml_reader, NULL);
]]]
In recent Windows SDK IID_IXmlReader is defined as following:
[[
static const IID _IID_IXmlReader = { 0x7279FC81, 0x709D, 0x4095, { 0xB6,
0x3D, 0x69, 0xFE, 0x4B, 0x0D, 0x90, 0x30 } };
static const IID _IID_IXmlWriter = { 0x7279FC88, 0x709D, 0x4095, { 0xB6,
0x3D, 0x69, 0xFE, 0x4B, 0x0D, 0x90, 0x30 } };
static const IID _IID_IXmlResolver = { 0x7279FC82, 0x709D, 0x4095, { 0xB6,
0x3D, 0x69, 0xFE, 0x4B, 0x0D, 0x90, 0x30 } };
#define IID_IXmlReader _IID_IXmlReader
#define IID_IXmlWriter _IID_IXmlWriter
#define IID_IXmlResolver _IID_IXmlResolver
]]
So no uuidof used in recent Windows SDK.
Btw Visual Studio 2008 support ended April 10, 2018 [1].
[1]
https://devblogs.microsoft.com/visualstudio/end-of-support-for-visual-studio-2008-in-one-year/
--
Ivan Zhakov