bsnes-plus
bsnes-plus copied to clipboard
os x build issues
- OS macOS 10.12 Sierra
- QT version brew install cartr/qt4/qt => 4.8.7_3
- ERROR ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [build] Error 1
- LOG buildlog.TXT
Hmm, looks like the linker can't find the Qt frameworks... No idea why. I've migrated my branch to Qt5 and have done some more macOS UI improvements, I wonder if you'd get the same issues with that. Please note the updated Mac instructions in the readme.
Also, my latest prebuilt binaries can be found here.
Looks like it changed again (Qt4 instructions, that is). I can no longer build bsnes-plus on macOS using Qt@4, nor can I build Optiroc's Qt5 fork using brew's Qt5 or using the install downloaded from the Qt site.
Probably time for some documentation overhaul in regards to building.
What errors do you get when building my fork?
rcc ui-qt/resource/resource.qrc -o obj/resource.rcc
make: rcc: No such file or directory
moc -i ui-qt/application/application.moc.hpp -o obj/application.moc
make: moc: No such file or directory
moc -i ui-qt/base/about.moc.hpp -o obj/about.moc
make: moc: No such file or directory
moc -i ui-qt/base/filebrowser.moc.hpp -o obj/filebrowser.moc
make: moc: No such file or directory
moc -i ui-qt/base/htmlviewer.moc.hpp -o obj/htmlviewer.moc
make: moc: No such file or directory
make: *** [obj/resource.rcc] Error 1
make: *** Waiting for unfinished jobs....
make: *** [obj/application.moc] Error 1
make: *** [obj/about.moc] Error 1
make: *** [obj/filebrowser.moc] Error 1
make: *** [obj/htmlviewer.moc] Error 1
It's strange to see this when I do have qtpath=$HOME/Qt/5.8/clang_64 set in .bash_profile using nano .bash_profile. This is a clean install of macOS 10.12.4 with Xcode 8.3.2 and Qt 5.8 using the Qt online installer.
You need to export $qtpath, try changing the definition in .bash_profile to
export qtpath=$HOME/Qt/5.8/clang_64
Getting somewhere now, but it eventually fails;
In file included from ui-qt/main.cpp:1:
ui-qt/ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/base/base.cpp:1:
ui-qt/base/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/cartridge/cartridge.cpp:1:
ui-qt/cartridge/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/debugger/debugger.cpp:1:
ui-qt/debugger/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/input/input.cpp:1:
ui-qt/input/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/movie/movie.cpp:1:
ui-qt/movie/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/settings/settings.cpp:1:
ui-qt/settings/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
In file included from ui-qt/state/state.cpp:1:
ui-qt/state/../ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
1 error generated.
make: *** [obj/ui-movie.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make: *** [obj/ui-base.o] Error 1
1 error generated.
1 error generated.
make: *** [obj/ui-cartridge.o] Error 1
make: *** [obj/ui-input.o] Error 1
make: *** [obj/ui-debugger.o] Error 1
1 error generated.
make: *** [obj/ui-state.o] Error 1
1 error generated.
make: *** [obj/ui-settings.o] Error 1
1 error generated.
make: *** [obj/ui-main.o] Error 1
Hmm. When you run make, how do the compiler invokations look? Here's how they look over here, for reference.
Did everything over from scratch, it's working now (for your Qt5 builds, which are great BTW! But you've left off the export part of the macOS build instructions). Now, regarding cartr's Qt4, the instructions have changed.
Instead of brew install cartr/qt4/qt it becomes;
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt@4
I haven't tested building yet, so it may or may not work now. Probably another reason to jump to Qt5. =P
So another new macOS install, more build problems! Mainly trying to build your fork @Optiroc for the mouse/joypad improvements.
export qtpath=$HOME/Qt5.8.0/5.8/clang_64 is in .bash_profile
Here's the compiler invocations:
clang++ -std=gnu++0x -I. -Isnes -O3 -fomit-frame-pointer -DNDEBUG -Wno-switch -Wno-absolute-value -Wno-parentheses -mmacosx-version-min=10.9 -DPROFILE_COMPATIBILITY -DDEBUGGER -Iobj -I/Library/Frameworks/QtCore.framework/Versions/5/Headers -I/Library/Frameworks/QtGui.framework/Versions/5/Headers -I/Library/Frameworks/QtWidgets.framework/Versions/5/Headers -I/Library/Frameworks/QtOpenGL.framework/Versions/5/Headers -I/usr/local/lib/QtCore.framework/Versions/5/Headers -I/usr/local/lib/QtGui.framework/Versions/5/Headers -I/usr/local/lib/QtWidgets.framework/Versions/5/Headers -I/usr/local/lib/QtOpenGL.framework/Versions/5/Headers -c ui-qt/main.cpp -o obj/ui-main.o
In file included from ui-qt/main.cpp:1:
ui-qt/ui-base.hpp:5:10: fatal error: 'QApplication' file not found
#include <QApplication>
^
1 error generated.
make: *** [obj/ui-main.o] Error 1
Hmmm, QApplication thing again. I downloaded the offline Qt installer and installed everything. Using Xcode 8.3.2 too.
IMO, the macOS build instructions need revisiting and updating.
It looks like qtpath isn't actually being imported from .bash_profile at all so the makefile is just using the default location instead. What happens if you explicitly pass qtpath=... as an argument to make?
Yep, that works, thanks! Strange, it's set correctly in ~/.bash_profile and I don't see any issues.
I hope it's not some sort of macOS issue.
@BooBerry Odd, but it certainly sounds like $qtpath isn't exported. What is output when you issue the following commands in a new terminal window:
echo $qtpath
$qtpath/bin/moc --version
cat $qtpath/lib/QtWidgets.framework/Versions/Current/Headers/QApplication
@BooBerry Since it sounds that you're after the macOS gamepad support specifically, I'm certainly interested in getting some feedback from testers regarding that feature. My current commit will only capture button presses from gamepads, but feel free to report how those works for you. (: I'll probably have time to add "axis" input support in the next 24 hours or so...
Output for each:
Michaels-iMac:~ michael$ echo $qtpath
/Users/michael/Qt5.8.0/5.8/clang_64
Michaels-iMac:~ michael$
Michaels-iMac:~ michael$ $qtpath/bin/moc --version
moc 5.8.0
Michaels-iMac:~ michael$ cat $qtpath/lib/QtWidgets.framework/Versions/Current/Headers/QApplication
#include "qapplication.h"
However, with your latest commit within the last hour, I can now build without expliciting passing qtpath, YAY! Now I'll test the gamepad and post my results in that issue. 👍