[Openchemistry-users] Problem with Avogadro 2 build on OSX
Marc-André Dubois
marc-andre.dubois at polymtl.ca
Fri Mar 11 10:40:30 EST 2016
I am still working on this problem on osx (See my previous message at the bottom of this one). By modifying the cmake file (adding the libraries in the link target command), I was able to build avogadro2. The problems are now just more complicated... First, it seems some libraries are missing in the Avogadro2.app bundle. I added libGLEW.1.10.dylib manually inside the bundle, but I'm still having a lot of problems with the frameworks of Qt. When I try to run Avogadro2 from the terminal, I get for instance:
dyld: Library not loaded: @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets
Referenced from: /usr/local/lib/libAvogadroQtOpenGL.dylib
Reason: image not found
Trace/BPT trap: 5
As I understand, the app is trying to find the Qt frameworks that are supposed to be inside the bundle. Is it the case? Is it supposed to be automatically added when I build Avogadro2.app? Similar problems seem to appear on 10.11 as well, so I think it is not exclusively a problem with osx 10.7.5. Any help would be greatly appreciated since I am not a dedicated computer programming guy. Thank you,
Marc
> Hi,
> I am a long time user of Avogadro. I recently saw Open Chemistry with Avogadro 2 and Molequeue and I really want to use the project for my work. However, I had a lot of trouble building the apps. I am currently running osx 10.7.5, osx 10.11.x and Ubuntu (not tested yet). The state of the build is the following:
>
> on osx 10.7.5:
> Molequeue: Built and installed (fully functional)
> Avogadrolibs: Built and installed
> Avogadroapp: Build incomplete... I have a linking problem. Here is my output:
>
> [100%] Linking CXX executable ../bin/Avogadro2.app/Contents/MacOS/Avogadro2
> Undefined symbols for architecture x86_64:
> "Avogadro::Io::FileFormat::readFile(std::string const&, Avogadro::Core::Molecule&)", referenced from:
> Avogadro::BackgroundFileFormat::read() in backgroundfileformat.cpp.o
> "Avogadro::Io::FileFormat::writeFile(std::string const&, Avogadro::Core::Molecule const&)", referenced from:
> Avogadro::BackgroundFileFormat::write() in backgroundfileformat.cpp.o
> "Avogadro::Io::CjsonFormat::CjsonFormat()", referenced from:
> Avogadro::MainWindow::openFile() in mainwindow.cpp.o
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> Avogadro::MainWindow::saveFileAs(bool) in mainwindow.cpp.o
> "Avogadro::Io::FileFormatManager::registerFormat(Avogadro::Io::FileFormat*)", referenced from:
> Avogadro::MainWindow::fileFormatsReady() in mainwindow.cpp.o
> "Avogadro::Io::FileFormatManager::instance()", referenced from:
> Avogadro::MainWindow::exportGraphics() in mainwindow.cpp.o
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> Avogadro::MainWindow::registerMoleQueue() in mainwindow.cpp.o
> Avogadro::RpcListener::messageReceived(MoleQueue::Message const&) in rpclistener.cpp.o
> "Avogadro::Io::CmlFormat::CmlFormat()", referenced from:
> Avogadro::MainWindow::openFile() in mainwindow.cpp.o
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> Avogadro::MainWindow::saveFileAs(bool) in mainwindow.cpp.o
> "Avogadro::Core::Molecule::setData(std::string const&, Avogadro::Core::Variant const&)", referenced from:
> Avogadro::MainWindow::openFile(QString const&, Avogadro::Io::FileFormat*) in mainwindow.cpp.o
> Avogadro::MainWindow::backgroundReaderFinished() in mainwindow.cpp.o
> Avogadro::MainWindow::backgroundWriterFinished() in mainwindow.cpp.o
> "Avogadro::version()", referenced from:
> Avogadro::AboutDialog::AboutDialog(QWidget*) in aboutdialog.cpp.o
> "Avogadro::Io::FileFormatManager::readString(Avogadro::Core::Molecule&, std::string const&, std::string const&) const", referenced from:
> Avogadro::RpcListener::messageReceived(MoleQueue::Message const&) in rpclistener.cpp.o
> "Avogadro::Io::FileFormatManager::writeString(Avogadro::Core::Molecule const&, std::string&, std::string const&) const", referenced from:
> Avogadro::MainWindow::exportGraphics() in mainwindow.cpp.o
> "Avogadro::Io::FileFormatManager::fileExtensions(int) const", referenced from:
> Avogadro::MainWindow::registerMoleQueue() in mainwindow.cpp.o
> "Avogadro::Io::FileFormatManager::fileFormatsFromFileExtension(std::string const&, int) const", referenced from:
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> "Avogadro::Io::FileFormatManager::error() const", referenced from:
> Avogadro::RpcListener::messageReceived(MoleQueue::Message const&) in rpclistener.cpp.o
> "Avogadro::Io::FileFormatManager::readFile(Avogadro::Core::Molecule&, std::string const&, std::string const&) const", referenced from:
> Avogadro::RpcListener::messageReceived(MoleQueue::Message const&) in rpclistener.cpp.o
> "Avogadro::Core::Molecule::hasCustomElements() const", referenced from:
> Avogadro::MainWindow::reassignCustomElements() in mainwindow.cpp.o
> "Avogadro::Core::Molecule::data(std::string const&) const", referenced from:
> Avogadro::MainWindow::updateWindowTitle() in mainwindow.cpp.o
> Avogadro::MainWindow::exportGraphics() in mainwindow.cpp.o
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> "Avogadro::Core::Molecule::hasData(std::string const&) const", referenced from:
> Avogadro::MainWindow::updateWindowTitle() in mainwindow.cpp.o
> Avogadro::MainWindow::saveFile(bool) in mainwindow.cpp.o
> "Avogadro::Core::Molecule::atomCount() const", referenced from:
> Avogadro::MainWindow::setMolecule(Avogadro::QtGui::Molecule*) in mainwindow.cpp.o
> Avogadro::MainWindow::backgroundReaderFinished() in mainwindow.cpp.o
> Avogadro::MainWindow::exportGraphics() in mainwindow.cpp.o
> "Avogadro::Core::Molecule::bondCount() const", referenced from:
> Avogadro::MainWindow::backgroundReaderFinished() in mainwindow.cpp.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[2]: *** [bin/Avogadro2.app/Contents/MacOS/Avogadro2] Error 1
> make[1]: *** [avogadro/CMakeFiles/avogadro.dir/all] Error 2
> make: *** [all] Error 2
>
>
> As I understand, it look like some libraries are missing. Is there a connection between avogadrolibs and avogadroapp? When I prepare avogadrolibs with cmake, I get this warning:
>
> MACOSX_RPATH is not specified for the following targets:
>
> AvogadroCore
> AvogadroIO
> AvogadroQuantumIO
>
>
> Avogadrolibs build just fine with my setup despite of this message, but is it possible, this could be the source of my linking problem? I tried to use the binaries directly, but those were compiled with a 10.8+ version of OSX so it does not work with my 10.7.5 osx, so I would prefer to build the apps myself instead. Thank you for your help.
>
> Marc
>
More information about the Openchemistry-users
mailing list