Compling CMBEASY on Mac OSX Tiger

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Richard Holman
Posts: 5
Joined: June 21 2005
Affiliation: Carnegie Mellon University

Compling CMBEASY on Mac OSX Tiger

Post by Richard Holman » June 21 2005

Hi:

I just got Michael's new version of CMBEASY and tried to compile it. Everything goes well until the part where the gui is being created. At this point I get the following set of messages

gui/configurationdialog.cc: In member function `void
ConfigurationDialog::syncDialog(LowLevelPlot&)':
gui/configurationdialog.cc:59: error: no matching function for call to `
QLineEdit::setText(std::string)'
/Developer/qt/include/qlineedit.h:147: error: candidates are: virtual void
QLineEdit::setText(const QString&)
gui/configurationdialog.cc:60: error: no matching function for call to `
QLineEdit::setText(std::string)'
/Developer/qt/include/qlineedit.h:147: error: candidates are: virtual void
QLineEdit::setText(const QString&)
gui/configurationdialog.cc:61: error: no matching function for call to `
QLineEdit::setText(std::string)'
/Developer/qt/include/qlineedit.h:147: error: candidates are: virtual void
QLineEdit::setText(const QString&)
gui/configurationdialog.cc:67: error: no matching function for call to `
QLineEdit::setText(std::string)'
/Developer/qt/include/qlineedit.h:147: error: candidates are: virtual void
QLineEdit::setText(const QString&)
make: *** [gui/configurationdialog.o] Error 1

I'm using gcc 4.0, the open source Mac qt library 3.3.4 and gsl 1.4.

Any ideas on what to do next?

Rich Holman

Michael Doran
Posts: 41
Joined: November 22 2004
Affiliation: ITP Heidelberg
Contact:

Compling CMBEASY on Mac OSX Tiger

Post by Michael Doran » June 21 2005

Hi,

indeed, that's a mistake.
For some reason, it compiled here and I got no warning.
Background: I ask a Qt-Widget to setText() with a standard string. But Qt-strings can't initialize with standard strings -- at least for some combinations of Qt etc.
The correct syntax is

Code: Select all

setText(s.c_str())
instead
of

Code: Select all

setText(s)
for a string s.

So I'll replace the 4.0 packages by 4.0.1 and send you the configuration.cc via e-mail, Richard.

Richard Holman
Posts: 5
Joined: June 21 2005
Affiliation: Carnegie Mellon University

Compling CMBEASY on Mac OSX Tiger

Post by Richard Holman » June 21 2005

Thanks for the new code Michael. Unfortunately, I still get errors:

ld: Undefined symbols:
__ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base
__ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base
__ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_
__ZN9__gnu_cxx12__atomic_addEPVii
__ZN9__gnu_cxx18__exchange_and_addEPVii
__ZNSs4_Rep20_S_empty_rep_storageE
__ZNSt15_List_node_base4hookEPS_
__ZNSt15_List_node_base6unhookEv
_printf$LDBLStub
__ZNSs4_Rep9_S_createEmmRKSaIcE
symbol _dladdr used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt-mt.3.dylib(dlfcn.o)
symbol _dlclose used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt-mt.3.dylib(dlfcn.o)
symbol _dlerror used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt-mt.3.dylib(dlfcn.o)
symbol _dlopen used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt-mt.3.dylib(dlfcn.o)
symbol _dlsym used from dynamic library /usr/lib/libSystem.dylib(dyldAPIsInLibSystem.o) not from earlier dynamic library libqt-mt.3.dylib(dlfcn.o)
make: *** [bin/cmbeasy] Error 1

It looks like it's not being able to find libqt-mt.3.dylib. As per the Trolltech instructions, I made a symlink to this library from where it actually is to /usr/lib.

Michael Doran
Posts: 41
Joined: November 22 2004
Affiliation: ITP Heidelberg
Contact:

Compling CMBEASY on Mac OSX Tiger

Post by Michael Doran » June 22 2005

Hi,

I googled the ld statement and found something on sourceforge:

http://sourceforge.net/mailarchive/foru ... um_id=3200

it seems to be a gcc problem and there is a solution. However, I have no Mac, so I don't know the answer...

Hope that helps!

Ivan Debono
Posts: 25
Joined: April 17 2007
Affiliation: APC, Paris 7 / OBSPM

Compling CMBEASY on Mac OSX Tiger

Post by Ivan Debono » April 30 2007

Does the graphical version of CMBeasy work on intel macs? I installed the mac version, but when I try to run it, it just sits there and does nothing. I suspect it only works on powerpc.

Georg Robbers
Posts: 5
Joined: May 23 2006
Affiliation: University of Heidelberg

Compling CMBEASY on Mac OSX Tiger

Post by Georg Robbers » May 01 2007

Yes, it should work. I haven't tried any of the Mac-packages that are out there, but I have tested building from source on an Intel Mac, and that worked fine.

Ivan Debono
Posts: 25
Joined: April 17 2007
Affiliation: APC, Paris 7 / OBSPM

Compling CMBEASY on Mac OSX Tiger

Post by Ivan Debono » May 02 2007

Thanks.

Post Reply