Compiling Strawberry on MacOS
-
Hi Jonaski,
I decided to move the conversation from this ticket.
I continued my little journey trying to find out why the builds I compile with my Macbook Pro 13" (2013) have such a poor performance. So, I finally managed to compile with llvm-clang (Apple) and llvm (homebrew) and on both the performance is bad. I didn't get any luck with gcc (homebrew) it fails to compile.
Since you're using Travis to compile your builds I thought to fork Strawberry and try to replicate what Travis is doing to compile the builds.
This is what Travis does:
$ export TRAVIS_COMPILER=gcc $ export CXX=${CXX:-g++} $ export CXX_FOR_BUILD=${CXX_FOR_BUILD:-g++} $ export CC=${CC:-gcc} $ export CC_FOR_BUILD=${CC_FOR_BUILD:-gcc} $ gcc --version Configured with: --prefix=/Applications/Xcode-9.4.1.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode-9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
So basically it's using the compiler that Apple provides with Xcode, which altough in my case is a newer version it should be the same... shouldn't it?
This is my version:
xxxx:build xxxx$ gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.8) Target: x86_64-apple-darwin19.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
My only question is whether the perfomance is that bad because of my computer? maybe Travis are using a "faster" or more beefy computer? Can this be the problem?
Thanks.
-
The performance of the computer does not affect the resulting binary file or the performance of the program after compilation. It only affects the speed of the compilation. Your computer is faster than Travis-CI anyway, since Travis-CI builds runs in a docker with limited resources.
You can try add a line to src/CMakeLists.txt to see the compiler flags in travis-ci.
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
That will print a message, compare that to your own mac after you run cmake -
Hi @jonaski,
I just wanted to mention that I've been compiling Strawberry and even Clementine recently and all the performance issues and sluggishness have disappeared. It runs smooth and well, there is no difference now between your builds and strawberry compiled by myself
I've no idea why since there hasn't been any change.
Thanks!