Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 21/05/2018 09:33, Nikolaus Waxweiler wrote: Everything you got ;) Gosh, this is embarrassing... I just tried a CMake build for you and it's now working perfectly. It generates the VC project files with no errors at all !! Regarding the MSVC build though, I mentioned previously that I don't see any errors when building freetype itself. It's only later that the error occurs - when I try to use the (statically built) library in some other project. In that case (if I built without enabling Intrinsic Functions), the linker will then complain that it can't find '_BitScanReverse()' John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
Everything you got ;) ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 21/05/2018 08:20, Nikolaus Waxweiler wrote: I actually use the very latest MSVC to build freetype 2.9.1 for freetype-py and didn't have any problems. Can you post the error log? Hi Nikolaus - do you mean the error log from CMake or the error from MSVC ? John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
I actually use the very latest MSVC to build freetype 2.9.1 for freetype-py and didn't have any problems. Can you post the error log? ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
> I haven't looked into it in any depth so it could easily be a configuration > issue at my end. Or is VS2010 the latest version that can build freetype2? The stock freetype.vcxproj should work with all recent versions. I just use msbuild however. You might need to retarget to a recent Windows SDK if you did not install Windows SDK 8.1 along with Visual Studio 2017. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 19/05/2018 13:07, Alexei Podtelezhnikov wrote: FreeType vs2010 project makes both static and dynamic and turns on intrinsics. I do not know how to backport it to vs2005. How much need is there for it really? There won't be much need for VS2005 these days (in fact, even I only use it for 1 project). In theory though, CMake can generate MSVC project files for more recent versions of Visual Studio (which I guess would also have the 'Intrinsic' value set incorrectly). Having said that, I just tried building with CMake and VC14 (Visual Studio 2015) and I was surprised to find that the CMake build failed (apparently while generating the file:- 'CompilerIdC.vcxproj') I haven't looked into it in any depth so it could easily be a configuration issue at my end. Or is VS2010 the latest version that can build freetype2? John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On Sat, May 19, 2018 at 3:28 AM, John Emmaswrote: > ... freetype itself gets built as a static library ... > > So the bottom line is that freetype's own projects (including the project > you generate from cmake) all now need to set "yes" for the option to enable > Intrinsic Functions. FreeType vs2010 project makes both static and dynamic and turns on intrinsics. I do not know how to backport it to vs2005. How much need is there for it really? ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
Okay, thanks. So it's a case for a smoke test after compilation. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 18/05/2018 21:39, Nikolaus Waxweiler wrote: Do you have cmake installed? If so and you're bored, what happens when you use it to generate a project file? Hi Nikolaus, The project file generated by cmake has Intrinsic Functions set to "no" (so it'll also create the problem I reported). Having said that, I need to be clearer about the problem... freetype itself gets built as a static library - and as such, the fact that _BitScanReverse is missing doesn't show up (at that stage). It's only later (when I try to use freetype in some other project) that the linker suddenly complains. So the bottom line is that freetype's own projects (including the project you generate from cmake) all now need to set "yes" for the option to enable Intrinsic Functions. Hope that makes sense, John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 18/05/2018 15:30, Alexei Podtelezhnikov wrote: Do you use our stock project file? Could there be an option to enable/disable intrinsics? Please investigate it. Oh wow... very well spotted ! I'm using my own VC project file where instrinsic functions were disabled. Enabling that option allows me to build without errors - even from the earlier git version (i.e. before Werner added the test for VS2013). So with intrinsic functions enabled, that test isn't needed (though the underscored __inline is still needed, of course...) I don't use your stock projects but it looks like the one for VC2010 has intrinsics enabled. AFAICT though, the others are simply using the default setting which I'd assume is (most likely) disabled. Thanks again, John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On Fri, May 18, 2018 at 9:30 AM, John Emmaswrote: > On 18/05/2018 14:00, Alexei Podtelezhnikov wrote: >> >> >> Actually since VS2005 >> https://en.wikipedia.org/wiki/Find_first_set >> >> and references therein. >> > > Hmmm, the plot thickens... I'm using VS2005 which doesn't find it - although > 'intrin.h' defines it like this:- Do you use our stock project file? Could there be an option to enable/disable intrinsics? Please investigate it. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 18/05/2018 14:00, Alexei Podtelezhnikov wrote: Actually since VS2005 https://en.wikipedia.org/wiki/Find_first_set and references therein. Hmmm, the plot thickens... I'm using VS2005 which doesn't find it - although 'intrin.h' defines it like this:- __MACHINEIW64(unsigned char _BitScanReverse(unsigned long* Index, unsigned long Mask)) So I wonder if it was initially only available for 64-bit compilation, then later got ported to 32-bit?? Also, it's MSDN entry doesn't specify that any link lib is needed so I've been assuming it gets implemented as a macro (?) John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On Fri, May 18, 2018 at 4:58 AM, Werner LEMBERGwrote: > >> Fixing that issue has simply highlighted another problem five lines >> later, namely:- >> >> _BitScanReverse ( %where, x ); >> >> Bear in mind that Visual Studio didn't introduce _BitScanReverse >> until VS2013 (MSDN says VS2010 but I think that's wrong). Actually since VS2005 https://en.wikipedia.org/wiki/Find_first_set and references therein. ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
Seems to be building fine again now, thanks... On 18/05/2018 09:58, Werner LEMBERG wrote: I see a question about `BitScanReverse' on stackoverflow asked in December 2011... https://stackoverflow.com/questions/8626891/bitscanforward64-issue-in-visual-studio-11-developer-preview On the other hand, it doesn't really matter :-) Ah, okay - I was only going by the fact that its MSDN entry is dated early in 2013 so I assumed it (maybe?) got introduced towards the end of VS2012. Thanks for all your help with this, John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
> Fixing that issue has simply highlighted another problem five lines > later, namely:- > > _BitScanReverse ( %where, x ); > > Bear in mind that Visual Studio didn't introduce _BitScanReverse > until VS2013 (MSDN says VS2010 but I think that's wrong). Really? I see a question about `BitScanReverse' on stackoverflow asked in December 2011... https://stackoverflow.com/questions/8626891/bitscanforward64-issue-in-visual-studio-11-developer-preview On the other hand, it doesn't really matter :-) > Either way, the above change has made freetype2 unbuildable now > with anything earlier :-( Thanks, should be fixed in git now. Please test. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 17/05/2018 18:41, Werner LEMBERG wrote: However, MSVC-8 seems happy with this underscored variant, if that helps... static __inline FT_Int32 Fixed in git, thanks. Thanks Werner - another heads-up though... Fixing that issue has simply highlighted another problem five lines later, namely:- _BitScanReverse ( %where, x ); Bear in mind that Visual Studio didn't introduce _BitScanReverse until VS2013 (MSDN says VS2010 but I think that's wrong). Either way, the above change has made freetype2 unbuildable now with anything earlier :-( John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
> However, MSVC-8 seems happy with this underscored variant, if that > helps... > > static __inline FT_Int32 Fixed in git, thanks. Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 17/05/2018 06:10, John Emmas wrote: I seem to have several other libraries which use inline (i.e. the non-underscored version) and they're all building correctly. So could it be that freetype2 has re-defined it somehow? Or maybe it #includes a file somewhere that re-defines the meaning of inline ?? Some extra information's come to light (from this MSDN article...) https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx Quote: " The *inline* keyword is available only in C++. The |__inline| and |__forceinline| keywords are available in both C and C++ " I think that explains it !! John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
On 16/05/2018 19:38, Alexei Podtelezhnikov wrote: However, MSVC-8 seems happy with this underscored variant, if that helps... static __inline FT_Int32 Do you happen to know what _MSC_VER introduced __inline? I'm afraid I don't but I realised something interesting this morning. I seem to have several other libraries which use inline (i.e. the non-underscored version) and they're all building correctly. So could it be that freetype2 has re-defined it somehow? Or maybe it #includes a file somewhere that re-defines the meaning of inline ?? John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
> However, MSVC-8 seems happy with this underscored variant, if that helps... > >static __inline FT_Int32 > Do you happen to know what _MSC_VER introduced __inline? ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel
[ft-devel] commit #84eebf4802 breaks compilation with older version of MSVC
Arkady Shapkin's commit #84eebf4802 (from May 12th) has broken a compilation that I need to do with MSVC-8. It's because of introducing this change at line 365 of 'freetype/internal/ftcalc.h':- static inline FT_Int32 However, MSVC-8 seems happy with this underscored variant, if that helps... static __inline FT_Int32 Just a heads-up, John ___ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel