Forum index VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
Build error on macOS: "source file is not valid UTF-8&q
Author Message
catalina 

Joined: 03 Jul 2017
Posts: 4
Posted: 2017-07-03, 15:44   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:

Code:

/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: https://gist.github.com/dunn/3e8babff458f4f828de86c6f454bd6b3#file-03-make-L612
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 389
Posted: 2017-07-03, 16:03   

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:

https://github.com/vcmi/vcmi/blob/develop/CI/mac/before_install.sh
 
     
catalina 

Joined: 03 Jul 2017
Posts: 4
Posted: 2017-07-03, 17:41   

SXX wrote:
Is it building fine with "-DENABLE_LAUNCHER=0"?


Happens with or without the launcher enabled; here's with it set to OFF: https://gist.github.com/dunn/f109ff2291babe85d4b798da0ae6f3b8

SXX wrote:
Also what Qt version do you using?


5.9.1, from Homebrew. Here's how I'm trying to build VCMI: https://github.com/dunn/homebrew-yolo/blob/vcmi/Formula/vcmi.rb
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 389
Posted: 2017-07-03, 19:29   

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:
https://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:

https://slack.vcmi.eu/

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

Joined: 03 Jul 2017
Posts: 4
Posted: 2017-07-04, 14:57   

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: https://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.

Screen Shot 2017-07-04 at 7.00.04 AM.png
2 Time(s) 95.49 KB

 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 389
Posted: 2017-07-04, 17:44   

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:

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

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

Joined: 03 Jul 2017
Posts: 4
Posted: 2017-07-04, 18:54   

SXX wrote:
Sadly dmg that built with CMake / CPack don't include all dependencies needed and I not even sure if they work at all.


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: https://gist.github.com/anonymous/6975a880ebb77284d24f67d65a655142
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 389
Posted: 2017-07-05, 08:33   

I just built it same way as our Travis build:
Code:
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.
 
     
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.03 second. SQL queries: 15