Build error on macOS: "source file is not valid UTF-8&q

Trying to build VCMI with the editor on macOS (10.12.5), and it fails with a bunch of “source file is not valid UTF-8” errors:

/usr/local/opt/qt/lib/QtWidgets.framework/QtWidgets:1:1: error: source file is not valid UTF-8
<CF><FA><ED><FE><U+0007><U+0000><U+0000><U+0001><U+0003><U+0000><U+0000><U+0000><U+0006><U+0000><U+0000><U+0000><U+001F><U+0000><U+0000><U+0000><D0><U+0010><U+0000><U+0000><85><80><U+0011><U+0002><U+0000><U+0000><U+0000><U+0000><U+0019><U+0000><U+0000><U+0000><B8><U+0003><U+0000><U+0000>__TEXT<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><E0>D<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><E0>D<U+0000><U+0000><U+0000><U+0000><U+0000><U+0007><U+0000><U+0000><U+0000><U+0005><U+0000><U+0000><U+0000><U+000B><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>__text<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>__TEXT<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><A0>\<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><EA><B0>;<U+0000><U+0000><U+0000><U+0000><U+0000><A0>\<U+0000><U+0000><U+0004><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0004><U+0000><80><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>__stubs<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>__TEXT<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><8A>
^

Full logs, including build configuration: gist.github.com/dunn/3e8babff45 … -make-L612

Is it building fine with “-DENABLE_LAUNCHER=0”?

Also what Qt version do you using? Our Travis CI build just using one from brew and it’s working fine:

github.com/vcmi/vcmi/blob/devel … install.sh

Happens with or without the launcher enabled; here’s with it set to OFF: gist.github.com/dunn/f109ff2291 … da0ae6f3b8

5.9.1, from Homebrew. Here’s how I’m trying to build VCMI: github.com/dunn/homebrew-yolo/b … la/vcmi.rb

Oh I see what’s wrong. There is “DENABLE_EDITOR=ON”. You should disable it because we don’t have C++ editor anyway and might be it’s time to purge it from our repository.

Our editor in Free Pascal and hosted separately:
github.com/vcmi/vcmi_editor
No one tried to build it for Mac yet.

I think when you disable it everything will be built just fine, but in any case you can jump to our slack if you going to find some other problems:

slack.vcmi.eu/

PS: I purged editor from our repository so it’s will not confuse anyone.

Thank you! I’ll jump on Slack if I run into more issues.

Do you distribute the macOS DMGs anywhere, though? I see they’re built and uploaded during the CI but I only see the Windows package here: github.com/vcmi/vcmi/releases/tag/0.99

EDIT: I see the Windows package is hosted on Dropbox but you can upload the binaries to GitHub as well, which might be more reliable.


Sadly dmg that built with CMake / CPack don’t include all dependencies needed and I not even sure if they work at all. In any case they uploaded here:

builds.vcmi.download/branch/develop/macOS/

We’ll certainly upload something to github releases, but only when we sure they actually work.

Ah, makes sense. I tried building it that way (cmake -G Xcode etc.) and got a runtime crash that has something to do with Boost: gist.github.com/anonymous/6975a … d65a655142

I just built it same way as our Travis build:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install wget git boost smpeg2 innoextract freetype sdl2 sdl2_ttf sdl2_image qt5 ffmpeg
brew install cmake
brew install sdl2_mixer --with-smpeg2
sudo xcode-select --install
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
export CMAKE_PREFIX_PATH="/usr/local/opt/qt5:$CMAKE_PREFIX_PATH"
cd ~
mkdir vcmi
cd vcmi
git clone https://github.com/vcmi/vcmi.git
wget https://github.com/sparkle-project/Sparkle/releases/download/1.17.0/Sparkle-1.17.0.tar.bz2
mkdir sparkle && cd sparkle
tar -xf ../Sparkle-*.tar.bz2
sudo mv Sparkle.framework /Library/Frameworks/
mkdir build
cd build
cmake ..
cd ..
xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release CONFIGURATION_BUILD_DIR=..
cd build
make -j 8

# Then run it this way:
~/Library/Application Support/vcmi/game_data_prepared
~/vcmi/vcmi/bin/vcmiclient.app/Contents/MacOS/vcmiclient

It’s running fine as far as I see, but I have no idea if “vcmibuilder” work properly. Most likely we should just implement work with assets into our Qt launcher.