[Openchemistry-users] Problem with Avogadro 2 build on OSX
Marc-André Dubois
marc-andre.dubois at polymtl.ca
Wed Mar 9 20:57:56 EST 2016
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