Following up on a few things here, QPID-8155 is now fixed.  After that I
encountered and fixed another build failure in QPID-8169.

https://issues.apache.org/jira/browse/QPID-8155
https://issues.apache.org/jira/browse/QPID-8169

Apache Infra setup a Windows CI job for us.  It's now linked from the Qpid
dashboard.

https://ci.appveyor.com/project/ApacheSoftwareFoundation/qpid-cpp/branch/master
http://qpid.apache.org/dashboard.html

On Fri, Apr 6, 2018 at 4:40 AM Michael Arnold <[email protected]> wrote:

> Hi Chuck,
>
> Posted to the dev group but as well, but thought it might be worthwhile to
> post here as well:
>
> Have a couple of questions wrt QPID-7926
>
> Question 1: what is the relevance of the is_pod<> result?
>
> JIRA- 7926 (https://issues.apache.org/jira/browse/QPID-7926) states that:
> "In a stand-alone windows program
> std::is_pod<PODMutex>::value
> returns false. In Linux the same statement in qpidd broker returns true."
>
> If I execute:
> grep -r is_pod
> in qpid-cpp-1.38.0 directory I get nothing i.e. from what I can see the
> broker never uses "is_pod".  What am I missing?
>
> Question 2: Is this a possible approach?
> I find 3 non-comment lines using QPID_MUTEX_INITIALIZER:
> src/qpid/sys/posix/Mutex.h:#define QPID_MUTEX_INITIALIZER {
> PTHREAD_MUTEX_INITIALIZER }
> src/qpid/sys/windows/Mutex.h:#define QPID_MUTEX_INITIALIZER 0
> src/qpid/log/Logger.cpp:sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;
>
> Where the last line is generating the compiler error under windows, due to
> the type mismatch.
>
> For windows, PODMutex, is a thin wrapper around boost::recusive_mutex,
> while under linux PODMutex is wrapper around pthread_mutex_t.
>
> From what I can see boost::recusive_mutex does not need to be initalised,
> but pthread_mutex_t does, hence under windows+boost the initialisation on
> the line:
> sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;
> is not required.  So possibly src/qpid/log/Logger.cpp can become:
> #if defined(BOOST_WINDOWS)
> sys::PODMutex loggerLock;
> #else
> sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;
> #endif
>
> Kind regards
> Michael
>
>
> On Fri, Apr 6, 2018 at 3:40 AM, Chuck Rolke <[email protected]> wrote:
>
> > Hi Michael,
> >
> > Replies in line.
> >
> > -Chuck
> >
> > ----- Original Message -----
> > > From: "Michael Arnold" <[email protected]>
> > > To: [email protected]
> > > Sent: Thursday, April 5, 2018 10:17:04 AM
> > > Subject: Re: Build QPID C++ Using Visual Studio 2013 on Windows 10
> > >
> > > Thanks Chuck,
> > >
> > > Downgrading python from 3.6.1 (python 3) to 2.7.17 (python 2), allowed
> > > cmake to generate the build files.  I did not encouter QPID-8155.
> > >
> > > On the build side, 3 types of errors:
> > > 1. QPID-7926 as you describe.
> > >
> > > 2. Link errors of the form: error LNK1104: cannot open file
> > > 'Debug\qpidcommond.lib'
> > > C:\Users\myk32\Documents\Development\qpid-bin\src\LINK
> > > --> the *.lib files don't appear to exist.  Any pointers?
> >
> > The QPID-7926 prevents building qpidcommon.lib/dll. From there on all the
> > other components fail as everything needs qpidcommon. I'm not sure
> > exactly how to fix this but the issue has been known for six months.
> >
> > >
> > > 3. Link errors of the form: error C1083: Cannot open include file:
> > > 'proton/engine.h': No such file or directory
> > > --> I assume this is because I have not run a 'make install' in the
> > proton
> > > build directory, but not sure how to do this on windows.  Any pointers?
> >
> > The best approach is to have projects qpid-proton (qpid-cpp needs this
> for
> > AMQP 1.0 support) and qpid-cpp share the same install directory. Build
> > qpid-proton 'install' project first and that populates the install area
> > with the include files and libraries that qpid-cpp needs.
> >
> > For example:
> > 1) In directory D:\git clone qpid-proton and qpid-cpp. Then you have
> >   D:\git\qpid-proton
> >   D:\git\qpid-cpp
> > 2) From qpid-proton\build launch a proton build with something like:
> >   cmake -G "Visual Studio 15 2017 Win64"
> -DCMAKE_INSTALL_PREFIX=D:\git\qpid-cpp\install_2017_x64
> > ..
> >   devenv proton.sln /build "Debug|x64"          /project INSTALL
> > 3) Then from qpid-cpp\build
> >   CMake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=D:\git\
> > qpid-cpp\install_2017_x64"
> >      "-DBoost_COMPILER=-vc141"
> "-DBOOST_ROOT=D:\boost\boost-win-1.65-64bit-vs2017"
> > D:git\qpid-cpp
> >   devenv qpid-cpp.sln /build "Debug|x64"          /project INSTALL
> >
> > I used to maintain some scripts to help me with managing multiple visual
> > studio versions
> > and the boost dependencies in https://github.com/ChugR/qpid-
> > proton-tools/tree/master/bat
> > Files build_proton.bat and build-qpid-cpp.bat took care of steps 2 and 3
> > shown above.
> >
> > >
> > > On Thu, Apr 5, 2018 at 4:12 AM, Chuck Rolke <[email protected]> wrote:
> > >
> > > > I tried a build of the qpid-cpp latest master upstream today using:
> > > >
> > > > Windows Server 2012 R2
> > > > Visual Studio 2013 x64
> > > > boost 1_58_0
> > > > cmake version 3.9.4
> > > > Python 2.7.10
> > > > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> > > >
> > > > Note that I did not include qpid-proton in this build. Also I am not
> on
> > > > Windows 10 and have widely different tool versions.
> > > >
> > > > I ran into the following issues that 'break the build':
> > > >
> > > > * https://issues.apache.org/jira/browse/QPID-8155 - cmake flags
> > issues.
> > > > ** Work around by reverting as described in the jira
> > > >
> > > > * https://issues.apache.org/jira/browse/QPID-7926 - PODmutex is not
> a
> > POD
> > > > ** No workaround available
> > > >
> > > > So I can't build on windows Visual Studio 2013 either.
> > > > However, I do not hit the same problems you have.
> > > >
> > > > Here is a transcript of my CMake. Maybe it will give you a hint.
> > > >
> > > > -Chuck
> > > >
> > > >
> > > > Running CMake in D:\Users\chug\git\qpid-cpp\build_2013_x64 : CMake -G
> > > > "Visual Studio 12 2013 Win64" "-DBUILD_DOCS=No"
> > "-DCMAKE_INSTALL_PREFIX=D:\
> > > > Users\chug\git\qpid-cpp\install_2013_x64" "-DBoost_
> > > > COMPILER=-vc120" "-DBOOST_ROOT=D:\boost\boost_1_58_0"
> > > > "-DINSTALL_QMFGEN=No" D:\Users\chug\git\qpid-cpp
> > > > -- The C compiler identification is MSVC 18.0.40629.0
> > > > -- The CXX compiler identification is MSVC 18.0.40629.0
> > > > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual
> > > > Studio 12.0/VC/bin/x86_amd64/cl.exe
> > > > -- Check for working C compiler: C:/Program Files (x86)/Microsoft
> > Visual
> > > > Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
> > > > -- Detecting C compiler ABI info
> > > > -- Detecting C compiler ABI info - done
> > > > -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft
> > Visual
> > > > Studio 12.0/VC/bin/x86_amd64/cl.exe
> > > > -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft
> > Visual
> > > > Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
> > > > -- Detecting CXX compiler ABI info
> > > > -- Detecting CXX compiler ABI info - done
> > > > -- Detecting CXX compile features
> > > > -- Detecting CXX compile features - done
> > > > -- Build types are Debug;Release;MinSizeRel;RelWithDebInfo
> > > > -- Found PythonInterp: C:/Python27/python.exe (found suitable version
> > > > "2.7.10", minimum required is "2.7")
> > > > CMake Deprecation Warning at CMakeLists.txt:138 (cmake_policy):
> > > >   The OLD behavior for policy CMP0022 will be removed from a future
> > version
> > > >   of CMake.
> > > >
> > > >   The cmake-policies(7) manual explains that the OLD behaviors of all
> > > >   policies are deprecated and that a policy should be set to OLD only
> > under
> > > >   specific short-term circumstances.  Projects should be ported to
> the
> > NEW
> > > >   behavior and not rely on setting a policy to OLD.
> > > >
> > > >
> > > > -- Found PythonInterp: C:/Python27/python.exe (found version
> "2.7.10")
> > > > -- Skipping installing qmf-gen and qmf python site-packages
> > > > -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
> > > > -- Could NOT find Ruby (missing: RUBY_LIBRARY) (found version
> "1.8.6")
> > > > -- Found Doxygen: C:/Program Files (x86)/doxygen/bin/doxygen.exe
> (found
> > > > version "1.6.3") found components:  doxygen missing components:  dot
> > > > -- Could NOT find VALGRIND (missing: VALGRIND_EXECUTABLE)
> > > > -- Could NOT find CyrusSASL (missing: CYRUS_SASL_LIBRARY
> > > > CYRUS_SASL_INCLUDE_DIR)
> > > > -- Regenerating AMQP protocol sources
> > > > -- D:/Users/chug/git/qpid-cpp/src/qpid/broker/management-schema.xml
> is
> > > > newer
> > > > -- D:/Users/chug/git/qpid-cpp/src/qpid/acl/management-schema.xml is
> > newer
> > > > -- D:/Users/chug/git/qpid-cpp/src/qpid/ha/management-schema.xml is
> > newer
> > > > -- D:/Users/chug/git/qpid-cpp/src/qpid/legacystore/
> > management-schema.xml
> > > > is newer
> > > > -- D:/Users/chug/git/qpid-cpp/src/qpid/linearstore/
> > management-schema.xml
> > > > is newer
> > > > -- Regenerating Qpid Management Framework sources
> > > > -- Looking for pthread.h
> > > > -- Looking for pthread.h - not found
> > > > -- Found Threads: TRUE
> > > > -- Boost version: 1.58.0
> > > > -- Found the following Boost libraries:
> > > > --   program_options
> > > > --   date_time
> > > > --   thread
> > > > --   system
> > > > --   chrono
> > > > --   atomic
> > > > -- Looking for uuid_generate
> > > > -- Looking for uuid_generate - not found
> > > > -- Looking for uuid_generate in uuid
> > > > -- Looking for uuid_generate in uuid - not found
> > > > -- Looking for uuid_create
> > > > -- Looking for uuid_create - not found
> > > > -- Looking for UuidToString
> > > > -- Looking for UuidToString - found
> > > > -- Check for size_t
> > > > -- Check for size_t -- distinct type
> > > > -- Looking for _init in xerces-c
> > > > -- Looking for _init in xerces-c - not found
> > > > -- Looking for C++ include xercesc/framework/MemBufInputSource.hpp
> > > > -- Looking for C++ include xercesc/framework/MemBufInputSource.hpp -
> > not
> > > > found
> > > > -- Looking for C++ include xqilla/xqilla-simple.hpp
> > > > -- Looking for C++ include xqilla/xqilla-simple.hpp - not found
> > > > -- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp
> > > > -- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp -
> > not
> > > > found
> > > > -- Looking for ibv_create_qp in ibverbs
> > > > -- Looking for ibv_create_qp in ibverbs - not found
> > > > -- Looking for rdma_create_id in rdmacm
> > > > -- Looking for rdma_create_id in rdmacm - not found
> > > > -- Looking for include file infiniband/verbs.h
> > > > -- Looking for include file infiniband/verbs.h - not found
> > > > -- Looking for include file rdma/rdma_cma.h
> > > > -- Looking for include file rdma/rdma_cma.h - not found
> > > > -- Could NOT find Proton: found neither ProtonConfig.cmake nor
> > > > proton-config.cmake (Required is at least version "0.16")
> > > > -- Qpid proton not found, amqp 1.0 support not enabled
> > > > -- Looking for LOG_AUTHPRIV
> > > > -- Looking for LOG_AUTHPRIV - not found
> > > > -- Looking for LOG_FTP
> > > > -- Looking for LOG_FTP - not found
> > > > -- Legacystore is excluded from build.
> > > > -- Linearstore is excluded from build.
> > > > -- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
> > > > -- Building Dotnet bindings
> > > > -- Configuring done
> > > > -- Generating done
> > > > -- Build files have been written to: D:/Users/chug/git/qpid-cpp/
> > > > build_2013_x64
> > > >
> > > >
> > > > ----- Original Message -----
> > > > > From: "Michael Arnold" <[email protected]>
> > > > > To: [email protected]
> > > > > Sent: Wednesday, April 4, 2018 6:56:24 AM
> > > > > Subject: Build QPID C++ Using Visual Studio 2013 on Windows 10
> > > > >
> > > > > Hi,
> > > > >
> > > > > In have an existing c++ app that run on Linux and uses the QPID
> > client
> > > > c++
> > > > > api.  I'd like to compile the same app on Windows 10.  The
> > application
> > > > > makes use of a development framework and graphics library who's
> > > > equivalents
> > > > > on Windows 10 demand the use of Visual Studio 2013.
> > > > >
> > > > > I've been followed the QPID build instructions for windows here:
> > > > > https://github.com/apache/qpid-cpp/blob/master/INSTALL-WINDOWS.txt
> > > > >
> > > > > But have replaced the cmake command:
> > > > > cmake -G "Visual Studio 10" ..
> > > > > with
> > > > > cmake -G "Visual Studio 12" ..\qpid-cpp-1.37.0
> > > > >
> > > > > The result is that cmake fails with:
> > > > > -- Configuring incomplete, errors occurred!
> > > > > See also
> > > > > "C:/Users/myk32/Documents/Development/qpid-bin/
> > > > CMakeFiles/CMakeOutput.log".
> > > > > See also
> > > > > "C:/Users/myk32/Documents/Development/qpid-bin/
> > > > CMakeFiles/CMakeError.log".
> > > > >
> > > > > I've inserted the CMakeError.log contents below, but extracted a
> > couple
> > > > of
> > > > > items here to give a flavour:
> > > > > C:\Users\myk32\Documents\Development\qpid-bin\CMakeFiles\CMakeTmp\
> > > > CheckIncludeFile.c(1):
> > > > > fatal error C1083: Cannot open include file: 'pthread.h': No such
> > file or
> > > > > directory
> > > > > [C:\Users\myk32\Documents\Development\qpid-bin\
> > CMakeFiles\CMakeTmp\cmTC_
> > > > f3397.vcxproj]
> > > > >
> > > > > C:\Users\myk32\Documents\Development\qpid-bin\CMakeFiles\CMakeTmp\
> > > > CheckSymbolExists.c(2):
> > > > > fatal error C1083: Cannot open include file: 'uuid/uuid.h': No such
> > file
> > > > or
> > > > > directory
> > > > > [C:\Users\myk32\Documents\Development\qpid-bin\
> > CMakeFiles\CMakeTmp\cmTC_
> > > > 67d04.vcxproj]
> > > > >
> > > > > CheckFunctionExists.obj : error LNK2019: unresolved external symbol
> > > > > _uuid_generate referenced in function _main
> > > > > [C:\Users\myk32\Documents\Development\qpid-bin\
> > CMakeFiles\CMakeTmp\cmTC_
> > > > 1d626.vcxproj]
> > > > >
> > > > > To me, these all look like basic things that cmake should have
> taken
> > care
> > > > > of...
> > > > >
> > > > > Please can you help me on how to get this build to work.
> > > > >
> > > > > Version details are as follows:
> > > > > Boost: 1_58_0 (lib64-msvc-12.0)
> > > > > CMake: 3.11
> > > > > Python: 3.6.1
> > > > > Ruby: 2.4.4-1
> > > > > QPID: 1.37
> > > > > Visual Studio 2013 64 bit with update 5 applied == Visual Studio
> > version
> > > > 12
> > > > > == MSVC++ 12.0  _MSC_VER == 1800
> > > > > Windows 10: Version 1709, Build: 16299.309
> > > > >
> > > > > Kind regards,
> > > > > Michael
> > > > >
> > > > > ------------------------------------------------------------
> > > > -----------------------
> > > > > CMakeError.log
> > > > > ------------------------------------------------------------
> > > > -----------------------
> > > > > Determining if the include file pthread.h exists failed with the
> > > > following
> > > > > output:
> > > > > Change Dir:
> > > > > C:/Users/myk32/Documents/Development/qpid-bin/CMakeFiles/CMakeTmp
> > > > >
> > > > > Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/
> > MSBuild.exe"
> > > > > "cmTC_f3397.vcxproj" "/p:Configuration=Debug"
> > > > "/p:VisualStudioVersion=12.0"
> > > > > Microsoft (R) Build Engine version 12.0.40629.0
> > > > >
> > > > > [Microsoft .NET Framework, version 4.0.30319.42000]
> > > > >
> > > > > Copyright (C) Microsoft Corporation. All rights reserved.
> > > > >
> > > > >
> > > > >
> > > > > Build started 03/04/2018 21:17:27.
> > > > >
> > > > > Project
> > > > > "C:\Users\myk32\Documents\Development\qpid-bin\
> > CMakeFiles\CMakeTmp\cmTC_
> > > > f3397.vcxproj"
> > > > > on node 1 (default targets).
> > > > >
> > > > > PrepareForBuild:
> > > > >
> > > > >   Creating directory "cmTC_f3397.dir\Debug\".
> > > > >
> > > > >   Creating directory
> > > > > "C:\Users\myk32\Documents\Development\qpid-bin\
> > > > CMakeFiles\CMakeTmp\Debug\".
> > > > >
> > > > >   Creating directory "cmTC_f3397.dir\Debug\cmTC_f3397.tlog\".
> > > > >
> > > > > InitializeBuildStatus:
> > > > >
> > > > >   Creating "cmTC_f3397.dir\Debug\cmTC_f3397.tlog\unsuccessfulbuild"
> > > > because
> > > > > "AlwaysCreate" was specified.
> > > > >
> > > > > ClCompile:
> > > > >
> > > > >   C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe
> > /c
> > > > /Zi
> > > > > /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D
> > "CMAKE_INTDIR=\"Debug\""
> > > > /D
> > > > > _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope
> > > > > /Fo"cmTC_f3397.dir\Debug\\" /Fd"cmTC_f3397.dir\Debug\vc120.pdb" /Gd
> > /TC
> > > > > /analyze- /errorReport:queue
> > > > > "C:\Users\myk32\Documents\Development\qpid-bin\CMakeFiles\CMakeTmp\
> > > > CheckIncludeFile.c"
> > > > >
> > > > >   Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for
> x86
> > > > >
> > > > >   Copyright (C) Microsoft Corporation.  All rights reserved.
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>

Reply via email to