[Marble-devel] Anyone able to build Marble QT Widget on Mac OS X 10.6 with QT 4.7.4

Stefan A stefan0909 at freenet.de
Mon Sep 26 21:27:18 UTC 2011


Tried adding
 -DCMAKE_OSX_ARCHITECTURES=x86_64
to the cmake call. No luck.

Finally search for the string 'i386' in all files below marble-build/src and replaced the string with 'x86_64' in all flags and link files.
(A 'file' command on one of the QT include files showed that x86_64 was the architecture they were compiled for.)

Now the build process can link to the QT libraries. Something seems to be broken not only in the way cmake detects the current architecture
and the arch the libs are build for, it also ignores the command line option to override it.
Someone with more understanding of cmake needs to fix this.

Now hunting down the next error, further down  the line:

[ 74%] Building CXX object src/plugins/declarative/CMakeFiles/MarbleDeclarativePlugin.dir/Coordinate.o
In file included from /usr/local/Trolltech/Qt-4.7.0/include/QtDeclarative/QtDeclarative:8,
                 from /Users/chaos/Projektdaten/marble/marble/src/plugins/declarative/Coordinate.h:17,
                 from /Users/chaos/Projektdaten/marble/marble/src/plugins/declarative/Coordinate.cpp:11:
/usr/local/Trolltech/Qt-4.7.0/include/QtDeclarative/qdeclarativeitem.h:45:26: error: qdeclarative.h: No such file or directory
/usr/local/Trolltech/Qt-4.7.0/include/QtDeclarative/qdeclarativeitem.h:46:35: error: qdeclarativecomponent.h: No such file or directory

Best regards

chaos



Am 22.09.2011 um 19:05 schrieb Stefan Aschenbach:

> Back at my machine.
> 
> cmake went through with two warnings:
> 
> CMake Warning (dev) at src/CMakeLists.txt:132 (INSTALL):
>   Policy CMP0006 is not set: Installing MACOSX_BUNDLE targets requires a
>   BUNDLE DESTINATION.  Run "cmake --help-policy CMP0006" for policy details.
>   Use the cmake_policy command to set the policy and suppress this warning.
> This warning is for project developers.  Use -Wno-dev to suppress it.
> 
> CMake Warning at /Applications/CMake 2.8-5.app/Contents/share/cmake-2.8/Modules/CPack.cmake:236 (MESSAGE):
>   CPack.cmake has already been included!!
> Call Stack (most recent call first):
>   CMakeLists.txt:328 (include)
> 
> 
> After that, the build fails at make with:
> 
> RoutingInputWidget.cpp:100
> 
> #if QT_VERSION >= 0x40700
>     setPlaceholderText( "Address or search term..." );
> #endif
> 
> 
> After commenting this out, it fails with
> 
> [ 69%] Building CXX object src/lib/CMakeFiles/marblewidget.dir/qrc_marble.o
> Linking CXX shared library libmarblewidget.dylib
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/QtCore, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/QtGui, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtXml.framework/QtXml, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtSvg.framework/QtSvg, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/QtNetwork, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtScript.framework/QtScript, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtWebKit.framework/QtWebKit, file was built for unsupported file format which is not the architecture being linked (i386)
> Undefined symbols:
>   "QStyleOptionButton::QStyleOptionButton()", referenced from:
>       Marble::MarbleLegendBrowser::loadResource(int, QUrl const&)in MarbleLegendBrowser.o
>       Marble::PluginItemDelegate::buttonOption(QStyleOptionViewItem const&, QModelIndex const&, Marble::PluginItemDelegate::ButtonType, int, Qt::AlignmentFlag) constin PluginItemDelegate.o
>       Marble::PluginItemDelegate::checkboxOption(QStyleOptionViewItem const&, QModelIndex const&, int, Qt::AlignmentFlag) constin PluginItemDelegate.o
> 
> and continues with about 50000 lines of more undefined symbols
> (pastebin.com or github.com both won't save such a snippet)
> 
> 
> 
> Switching to Marble1.2, I get the same first error, then another one of the same kind in
> goToDialog:358
> 
> then the second error again:
> 
> Linking CXX shared library libmarblewidget.dylib
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtCore.framework/QtCore, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtGui.framework/QtGui, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtXml.framework/QtXml, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtSvg.framework/QtSvg, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtNetwork.framework/QtNetwork, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtScript.framework/QtScript, file was built for unsupported file format which is not the architecture being linked (i386)
> ld: warning: in /usr/local/Trolltech/Qt-4.7.0/lib/QtWebKit.framework/QtWebKit, file was built for unsupported file format which is not the architecture being linked (i386)
> Undefined symbols:
>   "QMenu::addAction(QString const&)", referenced from:
>       Marble::AbstractFloatItem::contextMenu()      in AbstractFloatItem.o
>       Marble::AbstractFloatItem::contextMenu()      in AbstractFloatItem.o
>       Marble::AbstractFloatItem::contextMenu()      in AbstractFloatItem.o
> 
> and so on.
> 
> Any ideas? I suppose there is no error in the QT libraries being built for the wrong architecture.
> Maybe a wrong build target inside some build scripts?
> 
> 
> Best regards,
> 
> chaos
> 
> Am 22.09.2011 um 09:55 schrieb Dennis Nienhüser:
> 
>> Hi,
>> 
>> I just updated the website to point to our current release (1.2). Marble 1.1 is some months old. You can switch to the current release by doing a
>> 
>> git checkout -b marble-1.2 origin/KDE/4.7
>> 
>> I don't remember any Mac related commits, so the same issue will likely pop up. Please post the error message here so that we can trace it down further then.
>> 
>> If you can reproduce the error relating to the #ifdef block I'd be happy to see the error message as well.
>> 
>> Thanks,
>> Dennis
>> 
>> On 22.09.2011 08:50, stefan at binaervarianz.de wrote:
>>> Hello valued developers,
>>> 
>>> I've tried to download and build Marble as a QT widget yesterday, and
>>> failed.
>>> 
>>> What I did:
>>> 
>>> sudo /Developer/Tools/uninstall-qt.py
>>> 
>>> downloaded and installed QT 4.7.4 libs for Mac
>>> downloaded and installed cmake (Mac binary package)
>>> downloaded Marble 1.1 via git clone -b marble-1.1
>>> git://anongit.kde.org/marble
>>> 
>>> mkdir marble-build
>>> cd marble-build
>>> cmake -DQTONLY=ON -DWITH_DESIGNER_PLUGIN=ON ..
>>> make
>>> 
>>> at first this failed due to an undefined function in an #ifdef block
>>> testing for QT>= 4.7
>>> I took a bold move and commented that line out. This should be
>>> backwards-compatible after all.
>>> 
>>> make clean
>>> make
>>> 
>>> Got until 69%, then just after a linking step the
>>> build failed with tens of thousands of output lines to my console.
>>> 
>>> I'm away from my dev machine right now, so I can't report on the actual
>>> error
>>> (will do that in a few hours). So my question for now is:
>>> 
>>> Has anyone successfully built the QT Widget of Marbel with this setup?
>>> Are there any general known workarounds needed (for Mac/for QT 4.7)?
>>> Is something wrong with my initial attempts?
>>> 
>>> Sorry for the fuzzy details. I promise to deliver all the hard facts soon.
>>> It's just that this one kept me up last night and I'm eager to get some
>>> kind
>>> of comment on this.
>>> 
>>> Best regards,
>>> 
>>> Chaos
>>> _______________________________________________
>>> Marble-devel mailing list
>>> Marble-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20110926/755967b2/attachment.html>


More information about the Marble-devel mailing list