Author

Topic: PlS HELP - Issue Compiling Litecoin-QT 0.8.6.2 on OSX 10.9 (Macports, QT Creatr) (Read 4360 times)

legendary
Activity: 1024
Merit: 1004
We recently went through this exercise and have built a stable development environment for Mac OS X.

The short answer is we acquired a 32-bit iMac and loaded 10.6.8 (Snow Leopard) onto it.

Instead of Macports we opted for Brew to acquire and build the dependencies.

The problem noted above is an issue with the "leveldb" sub-build.  The primary issue is that the "build_detect_platform" script needs to be set as executable in order for it to determine the ARCH.  You can also just manually set the flags in the makefile.  I can get those if you still need them.

The coind and the -qt versions work great on the development machine!  The issue we have recently run up against is the process for building a bundle for distribution.

This is especially evident when we try to move via a .dmg image to execute on a 64-bit machine.

The dylib files cause it to crash out since they are 64 bit.

I've seen a distro where the 32-bit libraries ride a long as a sub-directory in the bundle.

This might be the right way vs building a static image?

TBD

-dvd
member
Activity: 106
Merit: 10
Ever got it figured out?  The problem is boost, but I can't seem to get it working even with this https://qt-project.org/forums/viewthread/35646

bump still no luck...

I think it has something to do with how leveldb is compiled, that is new with 0.8.6... still looking for help with this issue  Roll Eyes
legendary
Activity: 1036
Merit: 1001
Syscoin- Changing the way people do business.
bump still no luck...

I think it has something to do with how leveldb is compiled, that is new with 0.8.6... still looking for help with this issue  Roll Eyes
legendary
Activity: 1036
Merit: 1001
Syscoin- Changing the way people do business.
@shai_ major thanks for the tips! I'll try compiling it without QT creator and just straight using QMake when I get home, maybe that'll do the trick. Its definitely something with QT Creator I think because using the pure makefile.osx builds without issue.

Thanks so much! If anyone else has any insights your expertise is welcome!

Will keep this thread updated once this is solved I'll let everyone know. Hopefully this can help some other people out too; I can't be the only one with this issue.
hero member
Activity: 728
Merit: 500
newbie
Activity: 128
Merit: 0
hero member
Activity: 728
Merit: 500
i'm just using qmake never qtcreator

and then i always need to edit the makefile and the .pro file

pro file edits:

Code:
RELEASE=1
USE_QRCODE=1
USE_UPNP=1

and editing

Code:
# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
    # Mac: compile for maximum compatibility (10.7, 64-bit)
    macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
    macx:QMAKE_CFLAGS += -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
    macx:QMAKE_LFLAGS += -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

then running 'qmake'
and also need to edit Makefile sometimes to look something like (i dont know what i'm doing but this worked):

Code:


CXXFLAGS      = -pipe -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -arch x86_64 -pthread -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector $(DEFINES)
INCPATH       = -I/usr/local/Cellar/qt/4.8.5/mkspecs/unsupported/macx-clang -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.5/include -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -I/opt/local/include -I/opt/local/include/db48 -Ibuild -Ibuild -F/usr/local/Cellar/qt/4.8.5/lib -I/usr/local/Cellar/boost/1.54.0/include -I/usr/local/Cellar/berkeley-db4/4.8.30/include -I/usr/local/Cellar/miniupnpc/1.8.20131007/include -I/usr/local/Cellar/qrencode/3.4.3/include
LINK          = clang++
LFLAGS        = -headerpad_max_install_names -mmacosx-version-min=10.7 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -fstack-protector-all -arch x86_64 -pthread
LIBS          = $(SUBLIBS) -F/usr/local/Cellar/qt/4.8.5/lib -L/usr/local/Cellar/qt/4.8.5/lib -lqrencode -lminiupnpc /Users/shaiw/QubitCoin/src/leveldb/libleveldb.a /Users/shaiw/QubitCoin/src/leveldb/libmemenv.a -framework Foundation -framework ApplicationServices -framework AppKit -L/opt/local/lib -L/opt/local/lib/db48 -lssl -lcrypto -ldb_cxx-4.8 -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_chrono-mt -framework QtGui -L/usr/X11/lib -L/usr/local/Cellar/qt/4.8.5/lib -F/usr/local/Cellar/qt/4.8.5/lib -framework QtCore -framework QtNetwork -L/usr/local/Cellar/boost/1.54.0/lib -L/usr/local/Cellar/berkeley-db4/4.8.30/lib -L/usr/local/Cellar/miniupnpc/1.8.20131007/lib -L/usr/local/Cellar/qrencode/3.4.3/lib


and then using macdeploy to create dmg (see doc/release-process.txt)
(editing fancy.plist and sometimes macdeployqtplus script)

Code:
python2.7 contrib/macdeploy/macdeployqtplus blablacoin-qt.app -dmg -fancy contrib/macdeploy/fancy.plist

i'm using homebrew for dependencies and xcode version 4

i hope this helps..
legendary
Activity: 1036
Merit: 1001
Syscoin- Changing the way people do business.
I am having a hell of a time compiling the latest Litecoin-QT client from the official git repo. I downloaded the latest 0.8.6.2 code and was able to compile litecoind using:
Code:
make -f makefile.osx

It takes a second but I end up with a litecoind file that works. If I try building the GUI through QT-Creator I get this error, I have scoured the googles and the internets high and low and I cannot for the life of me figure out how to fix this, pleaseee help.

- Macports
- QT Creator 4.8
- Litecoin 0.8.6.2 latest repo code
- Have installed boost +universal and db48 +universal in an attempt to fix this, still no luck

Here is the error I receive after QT Creator attempts to build:
Code:
Undefined symbols for architecture x86_64:
  "Db::verify(char const*, char const*, std::ostream*, unsigned int)", referenced from:
      CDBEnv::Verify(std::string, bool (*)(CDBEnv&, std::string)) in db.o
      CDBEnv::Salvage(std::string, bool, std::vector >, std::vector > >, std::allocator >, std::vector > > > >&) in db.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Litecoin-Qt.app/Contents/MacOS/Litecoin-Qt] Error 1


I tried removing all my boost and berkley DB libs and reinstalling because I thought maybe there were broken linkages, no dice. I uninstalled hombrew thinking maybe it messed something up, no luck. I have no issues at all compiling the 0.6.4 client and the 0.8.6.2 litecoind compiles but the GUI/QT Creator just isn't having it.

Can someone please shed some light on this? I know its something with library linkages but I don't know the exact solution.

Thanks for any help, been tearing my hair out over this and even studying makefile.osx as compared to the Makefile that qmake generates but because the contexts are so different (on being a GUI and all) its hard to tell which piece might be the source of this error.
Jump to: