#322 Windows build is broken for RC5

v1.2.0
closed
5
2016-06-03
2015-12-14
Anton
No

The build is broken for both vs2010 and vs2015 with two different error scenarios.

for vs2010:
The preprocessor symbol LOG4CPLUS_HAVE_CXX11_SUPPORT gets defined, which causes msvc to attempt to compile c++11 formatted code, a format the vs2010 compiler does not support. This is probably due to my machine also having vs2015 installes, which causes problems for the guarding #if defined.

on my machine _MSC_VER is defined and the version is 1900 which is above the requested 1600.

for vs2015 (Officially unsupported by which supports c++11 syntax)
The compilation fails due to an undefined FreeAddrInfoA and FreeAddrInfoW.

Discussion

  • Václav Haisman

    Václav Haisman - 2015-12-14

    I can reproduce the issue with VS 2015 and FreeAddrInfoA. This is now fixed locally and I will eventually push it into master. See https://github.com/wilx/log4cplus/commit/9ab7c6404527a71ec1cc67fc42c19d913fa25b27.

    Regarding the other issue with VS 2010, could you please provide more information? I do not actually have access to Visual Studio 2010 any more. Where is the offending code? What error messages does it produce?

     
  • Václav Haisman

    Václav Haisman - 2015-12-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,9 +1,9 @@
     The build is broken for both vs2010 and vs2015 with two different error scenarios.
    
     for vs2010:
    -The preprocessor symbol 'LOG4CPLUS_HAVE_CXX11_SUPPORT" gets defined, which causes msvc to attempt to compile c++11 formatted code, a format the vs2010 compiler does not support. This is probably due to my machine also having vs2015 installes, which causes problems for the guarding #if defined.
    +The preprocessor symbol `LOG4CPLUS_HAVE_CXX11_SUPPORT` gets defined, which causes msvc to attempt to compile c++11 formatted code, a format the vs2010 compiler does not support. This is probably due to my machine also having vs2015 installes, which causes problems for the guarding `#if defined`.
    
    -on my machine _MSC_VER is defined and the version is 1900 which is above the requested 1600.
    +on my machine `_MSC_VER` is defined and the version is 1900 which is above the requested 1600.
    
     for vs2015 (Officially unsupported by which supports c++11 syntax)
    -The compilation fails due to an undefined FreeAddrInfoA and FreeAddrInfoW.
    +The compilation fails due to an undefined `FreeAddrInfoA` and `FreeAddrInfoW`.
    
    • assigned_to: Václav Haisman
     
  • Anton

    Anton - 2015-12-14

    I looked a little further into the build issue I have on vs2010. I found this information on stackoverflow.

    I tried changing the guard _MSC_VER >= 1600 in line 101 in config.hxx to_MSCVER >= 1700.improved things a lot. Now vs2010 behaves the same way as vs2015.

    I'm pretty certain - though not 100% - that my old vs 2010 does not support any c++11 things. So requireing the version to be 1700 or above seems to be correct.

     
  • Anton

    Anton - 2015-12-14

    I forgot the actual error messages produced. There is a cascade, starting from a failed build of log4cplus and log4cplusS

    log4cplus-1.2.0-rc5\include\log4cplus/internal/socket.h(176): error C2059: syntax error : ';'

    seems to be the root of the cascade.

    additionally I get errors from compiling Qt4DebugAppender and Qt5DebugAppender ( I don't have Qt installed, and those errors doesn't worry me because they are contained to external appenders)

    If we're being really nitty gritty, I get two warnings:

    ..\src\fileappender.cxx(1310): warning C4244: 'initializing' : conversion from 'time_t' to 'int', possible loss of data

    and

    log4cplus-1.2.0-rc5\simpleserver\loggingserver.cxx(166): warning C4355: 'this' : used in base member initializer list

     
  • Anton

    Anton - 2015-12-15

    Yes :-)

    All four build configurations (Debug, Debug_Unicode, Release and Release_Uncoded) build on my machine using VS2010.

    Thanks
    ps. Of course I still get errors for the two Qt projects, but any decent developer should have no issues figuring out the why and what of that.

     
  • Václav Haisman

    Václav Haisman - 2015-12-15

    The Qt failures are OK, unless you actually modify the projects and have Qt SDK.

     
  • Václav Haisman

    Václav Haisman - 2016-01-01
    • labels: --> fixed, v1.2.0-rc6
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks