Page 1 of 1

Mac OS X 10.12 cs-1.6.1 build error

Posted: Tue Nov 12 2019 9:05 am
by charlest
Hi, Just new to CopperSpice and trying to build on Mac OS/X 10.12.6 (Sierra), which I am attached to since it allows my older 17" MacBookPro to run.
Came across this name clash with an Apple defined macro:
FAILED: src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp.o
/Applications/ @src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp.o.rsp -MD -MT src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp.o -MF src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp.o.d -o src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp.o -c /Users/ct/Projects/copperspice/src/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp
In file included from /Users/ct/Projects/copperspice/src/3rdparty/webkit/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp:40:
In file included from /Users/ct/Projects/copperspice/src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h:24:
In file included from include/QtNetwork/QNetworkAccessManager:1:
In file included from include/QtNetwork/qnetworkaccessmanager.h:32:
In file included from include/QtNetwork/QSslConfiguration:1:
In file included from include/QtNetwork/qsslconfiguration.h:28:
In file included from include/QtNetwork/qsslsocket.h:33:
In file included from include/QtNetwork/qsslerror.h:28:
include/QtNetwork/qsslcertificate.h:122:83: error: too many arguments provided to function-like macro invocation
static QList<QSslError> verify(const QList<QSslCertificate> &certificateChain, const QString &hostName = QString());
/usr/include/AssertMacros.h:1339:11: note: macro 'verify' defined here
#define verify(assertion) __Verify(assertion)
1 error generated.
So the static QSslCertificate::verify function definition is clashing with the Apple verify macro. However I do note that in the AssertMacros.h file it says just before the block of macro defs that define the verify macro:
* Prior to Mac OS X 10.6 the macro names used in this file conflicted with some
* user code, including libraries in boost and the proposed C++ standards efforts,
* and there was no way for a client of this header to resolve this conflict. Because
* of this, most of the macros have been changed so that they are prefixed with
* __ and contain at least one capital letter, which should alleviate the current
* and future conflicts. However, to allow current sources to continue to compile,
* compatibility macros are defined at the end with the old names. A tops script
* at the end of this file will convert all of the old macro names used in a directory
* to the new names. Clients are recommended to migrate over to these new macros as
* they update their sources because a future release of Mac OS X will remove the
* old macro definitions ( without the double-underscore prefix ). Clients who
* want to compile without the old macro definitions can define the macro
* included.


/* If we haven't set this yet, it defaults to on. In the next release, this will default to off. */
So am just wondering if this __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES needs setting to zero on OS/X 10.12 ?
Has anyone else hit this. I suppose I could use the binary distribution.

I did the simple cmake initial command:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../cs_lib ../copperspice
EDIT: Ah. Have realised I have not installed Homebrew or MacPorts. Do I assume I need to do this?

Re: Mac OS X 10.12 cs-1.6.1 build error

Posted: Thu Nov 14 2019 2:34 pm
by janwilmans
I have not seen this before, can you provide the sequence of commands you used to configure cmake ?

I build MacOs on Azure, here is the last succesful build:

Also, here you can see my build script:
I basically use homebrew only to install ninja, but I think we indeed rely on both homebrew and macports to install dependencies.

Re: Mac OS X 10.12 cs-1.6.1 build error

Posted: Sun Nov 17 2019 8:50 pm
by charlest
Hi Jan
Thanks for that. Have put this on the back burner for the last week but will take a look at your scripts and double check how I go.

However for info:
1. I installed homebrew using the standard ruby command line.
2. Did not (yet) install macports.
3. cloned CopperSpice into a directory copperspice
4. Made a cs_build directory at the same level as the cloned copperspice
(Planning to build from ./copperspice into ./cs_build and install into ./cs_lib as per web site sequence. THough I notice you make the build directory below the copperspice one)
5. Then went into cs_build and did:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../cs_lib ../copperspice
6. Followed by (8 core usage instead of 12 on my machine to stop it getting too hot! Its an old MacBookPro which is susceptible to that I am afraid):
ninja -j8
7. It takes a while but gets about 2500 files in and the blows with the macro error.
8. Please note I am on OSX 10.12.6 and I did NOT set the CMAKE_OSX_DEPLOYMENT_TARGET as you did so will try some of that.

Thanks for the links. I will go through and see how I get on since I really want to come away from Qt usage.

Re: Mac OS X 10.12 cs-1.6.1 build error

Posted: Tue Nov 19 2019 4:18 pm
by barbara
We have not seen this issue in CopperSpice CI and we build for Mac OS X 10.12 and 10.13. We are looking at what libraries you may installed which are different from our configuration.

Please let us know the exact version of Xcode you have installed.


Re: Mac OS X 10.12 cs-1.6.1 build error

Posted: Sun Nov 24 2019 3:14 pm
by charlest
Hello Barbara
Xcode version is 9.2 (9c40b). No need to push at this since I am continuing main app development on Qt at the moment, but will return to this bit by bit and let you know what I find.
Many thanks for the replies

Re: Mac OS X 10.12 cs-1.6.1 build error

Posted: Sun Mar 01 2020 2:06 am
by ansel
Just for reference, as of CopperSpice 1.6.2 released on Feb 21st the requirements for a build environment have changed on OS X. Our minimum supported version is now OS X 10.13 with Xcode 10.1.