Mac build failures

I’m trying to build avogadro-0.8.1 on an intel Mac (10.5.5), but keep
getting some errors (some which I’ve worked around, another which I can’t).

I’ve installed openbabel-2.2.0 (into /usr/local/openlab-2.2.0),
eigen-1.0.5 (into /sw/include/eigen/.h), and eigen2-beta1 (into
/sw/include/eigen2/Eigen/
) and qt4-x11 or qt4-mac (into /sw/lib/qt4-x11
and /sw/lib/qt4-mac).

I’m using Fink to build a package for avogadro since it’s a simple way
to keep track of dependencies. My build sequence in the package is (%p
means the Fink install path, which is normally /sw):


export PATH=%p/lib/qt4-mac/bin:$PATH
export
PKG_CONFIG_PATH=/usr/local/openbabel-2.2.0/lib/pkgconfig:$PKG_CONFIG_PATH
/bin/mkdir build
cd build
%p/bin/cmake -DCMAKE_INSTALL_PREFIX=%i
-DOPENBABEL2_LIBRARIES=/usr/local/openbabel-2.2.0
-DEIGEN_INCLUDE_DIR=%p/include -DCMAKE_CXX_FLAGS=’-I%p/include
-I/usr/X11/include’ -DCMAKE_MODULE_LINKER_FLAGS=’-L/usr/X11/lib
/usr/local/openbabel-2.2.0/lib/libopenbabel.3.dylib’
-DCMAKE_SHARED_LINKER_FLAGS=’-L%p/lib -L/usr/X11/lib
/usr/local/openbabel-2.2.0/lib/libopenbabel.3.dylib’ …
VERBOSE=1 /usr/bin/make -w


Can Avogadro be built on a mac using qt4-x11? I’ve succeeded up to the
point where it tries to build macchempasteboard.o but fails
http://paste.lisp.org/display/69901#1. It successfully builds when
using qt4-mac, but then the installation requires things to be put
straight into /Library/Application Support which is not good w/ a
package manager, plus it crashes on run. If it could be built w/
qt4-x11 then it would follow the usual linux installation conventions
and wouldn’t need the .app bundle.

Hanspeter
(Snaggle on irc)


Hanspeter Niederstrasser
hanspeter AT snaggledworks DOT com

Can Avogadro be built on a mac using qt4-x11? I’ve succeeded up to
the
point where it tries to build macchempasteboard.o but fails
http://paste.lisp.org/display/69901#1.

We’ve never tried. The MacChemPasteboard bits are good ideas, in
principal (i.e., copy/paste from ChemDraw), but don’t seem to work
reliably. I will probably back them out. Certainly the build rules for
Cmake don’t expect a qt4-x11 on Mac.

package manager, plus it crashes on run. If it could be built w/

What version of Qt and/or Cmake are you using? I’ve found that some
combinations of Qt4.4.x and Cmake do not build correctly and
everything crashes on startup – before we even execute Avogadro code.
I can guarantee that Qt 4.4.0 and Cmake 2.6.0 work.

I’ve been trying to isolate that bug for Trolltech, but it’s slow going.

Hope that helps,
-Geoff

Geoffrey Hutchison wrote:

Can Avogadro be built on a mac using qt4-x11? I’ve succeeded up to the
point where it tries to build macchempasteboard.o but fails
http://paste.lisp.org/display/69901#1.

We’ve never tried. The MacChemPasteboard bits are good ideas, in
principal (i.e., copy/paste from ChemDraw), but don’t seem to work
reliably. I will probably back them out. Certainly the build rules for
Cmake don’t expect a qt4-x11 on Mac.

I’ve built other qt4 packages on the Mac that work fine as either
qt4-x11 executables (similar installed file layout as in other unix-like
OSes) or qt4-mac .app bundles, so in principle it could work for
avogadro although I realize that will probably require a good bit of
work to not make cmake/Avogrado think “Mac = must build app bundle”.

package manager, plus it crashes on run. If it could be built w/

What version of Qt and/or Cmake are you using? I’ve found that some
combinations of Qt4.4.x and Cmake do not build correctly and everything
crashes on startup – before we even execute Avogadro code. I can
guarantee that Qt 4.4.0 and Cmake 2.6.0 work.

I’m using cmake-2.6.2 and qt4-{mac,x11}-4.4.1. I’ve finally succeeded
in linking everything using qt4-mac, but the program fails on startup.
You can see the crash log at http://paste.lisp.org/display/69901#2.

Hanspeter


Hanspeter Niederstrasser
hanspeter AT snaggledworks DOT com

On Friday 07 November 2008 18:20:29 Hanspeter Niederstrasser wrote:

Geoffrey Hutchison wrote:

Can Avogadro be built on a mac using qt4-x11? I’ve succeeded up to the
point where it tries to build macchempasteboard.o but fails
http://paste.lisp.org/display/69901#1.

We’ve never tried. The MacChemPasteboard bits are good ideas, in
principal (i.e., copy/paste from ChemDraw), but don’t seem to work
reliably. I will probably back them out. Certainly the build rules for
Cmake don’t expect a qt4-x11 on Mac.

I’ve built other qt4 packages on the Mac that work fine as either
qt4-x11 executables (similar installed file layout as in other unix-like
OSes) or qt4-mac .app bundles, so in principle it could work for
avogadro although I realize that will probably require a good bit of
work to not make cmake/Avogrado think “Mac = must build app bundle”.

The main things that would need removing are the Mac conditional segments of
the CMake files. There are not many of them and the paste stuff is the only
one that should cause a failure as far as I am aware.

package manager, plus it crashes on run. If it could be built w/

What version of Qt and/or Cmake are you using? I’ve found that some
combinations of Qt4.4.x and Cmake do not build correctly and everything
crashes on startup – before we even execute Avogadro code. I can
guarantee that Qt 4.4.0 and Cmake 2.6.0 work.

I’m using cmake-2.6.2 and qt4-{mac,x11}-4.4.1. I’ve finally succeeded
in linking everything using qt4-mac, but the program fails on startup.
You can see the crash log at http://paste.lisp.org/display/69901#2.

This is the same bug we have observed. That exception is way before any
Avogadro code is executed. It seems to be some interaction between how CMake
builds/links and the Qt version. If you back out to qt-mac-4.4.0 it will
likely work. We need to make a minimal test case that reproduces this for a
bug report I think.

I have encountered this several times on the Mac but do the majority of my
development on Linux. I have never seen this bug occur on any other platform.

On Friday 07 November 2008 18:20:29 Hanspeter Niederstrasser wrote:

Geoffrey Hutchison wrote:

Can Avogadro be built on a mac using qt4-x11? I’ve succeeded up to the
point where it tries to build macchempasteboard.o but fails
http://paste.lisp.org/display/69901#1.

We’ve never tried. The MacChemPasteboard bits are good ideas, in
principal (i.e., copy/paste from ChemDraw), but don’t seem to work
reliably. I will probably back them out. Certainly the build rules for
Cmake don’t expect a qt4-x11 on Mac.

I’ve built other qt4 packages on the Mac that work fine as either
qt4-x11 executables (similar installed file layout as in other unix-like
OSes) or qt4-mac .app bundles, so in principle it could work for
avogadro although I realize that will probably require a good bit of
work to not make cmake/Avogrado think “Mac = must build app bundle”.

The main things that would need removing are the Mac conditional segments of
the CMake files. There are not many of them and the paste stuff is the only
one that should cause a failure as far as I am aware.

package manager, plus it crashes on run. If it could be built w/

What version of Qt and/or Cmake are you using? I’ve found that some
combinations of Qt4.4.x and Cmake do not build correctly and everything
crashes on startup – before we even execute Avogadro code. I can
guarantee that Qt 4.4.0 and Cmake 2.6.0 work.

I’m using cmake-2.6.2 and qt4-{mac,x11}-4.4.1. I’ve finally succeeded
in linking everything using qt4-mac, but the program fails on startup.
You can see the crash log at http://paste.lisp.org/display/69901#2.

This is the same bug we have observed. That exception is way before any
Avogadro code is executed. It seems to be some interaction between how CMake
builds/links and the Qt version. If you back out to qt-mac-4.4.0 it will
likely work. We need to make a minimal test case that reproduces this for a
bug report I think.

I have encountered this several times on the Mac but do the majority of my
development on Linux. I have never seen this bug occur on any other platform.