Title: Help Building -QT on Mac OSX? Post by: shakezula on May 21, 2013, 08:52:56 PM Ok, I'm stuck. I've tried a lot of things yet I can simply NOT get past this:
Undefined symbols: "MapPort()", referenced from: OptionsModel::setData(QModelIndex const&, QVariant const&, int)in optionsmodel.o "_fUseUPnP", referenced from: OptionsModel::setData(QModelIndex const&, QVariant const&, int)in optionsmodel.o ld: symbol(s) not found collect2: ld returned 1 exit status When it tries to build. I have tried on multiple VMs with multiple QT and GCC versions, nearly all end up with this error. Here's what I did on the latest build: Installed OSX 10.6 in VMWare Updated through 10.6.8 and all available software through today Installed XCode 3.2.6 Installed MacPorts $sudo port install boost db48 git-core openssl miniupnpc went in to ~/bitcoin and tried to do: qmake and then make When it errored out, I tried installing QT Creator just to take the qmake line and tried this one: $ qmake /Users/adam/bitcoin/bitcoin-qt.pro -r -spec macx-g++ CONFIG+=x86_64 "USE_UPNP=-" but when I make it errors out the same. I've tried editing the .pro file with /opt/local/ includes for MINIUPNPC and all others. I've also tried building another VM from scratch and doing the SAME thing without ports, using homebrew instead. SAME ISSUES! Please, I know this has to be something easy I'm missing, anyone anyone help? Title: Re: Help Building -QT on Mac OSX? Post by: jayo89 on May 23, 2013, 05:52:37 AM Bump for interest. I'm having trouble compiling for mac as well.
Title: Re: Help Building -QT on Mac OSX? Post by: shakezula on May 23, 2013, 01:59:06 PM I solved it, no help from the peanut gallery. ::)
The solution for me was to comment out the second bit of code in the -qt.pro file related to UPNP. Basically even if I did "qmake "USE_UPNP=-" it would return "Building without UPNP" and then just under it "Building with UPNP." Following that, I realized that the if ==/else== is seemingly wrongly syntaxed in the .pro file. I changed that section in the .pro file to look like this: # qmake "USE_UPNP=-" (not supported) contains(USE_UPNP, -) { message(Building without UPNP support) } and re-ran qmake/make and voila. Yes, this is a dirty way to do it. Yes, my -qt has no UPNP support (no, I don't care). I have no formal C/C++ training so this is how I learn, trial and error. :D |