[Openchemistry-users] Problem with Avogadro 2 build on OSX

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Mar 14 10:48:47 EDT 2016


On Fri, Mar 11, 2016 at 10:40 AM, Marc-André Dubois
<marc-andre.dubois at polymtl.ca> wrote:
> 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,
>
I am not clear on what you did to make the package, but in order to
create a valid app bundle on the Mac you should run (from the
avogadroapp build directory,

make package

Before doing that you would want to change some CPACK defaults, and I
think we should change these in the source in future. You can use
cmake-gui, toggle advanced variables, search for CPACK_BINARY_ and
turn everything off, turn CPACK_BINARY_DRAGNDROP on.

The Windows and Mac installer generation uses CPACK in order to
satisfy the packaging requirements, I have never really liked the fact
that make install doesn't behave as expected. You will get a bundle,
the same as the one we distribute, in the binary directory, that
should contain all dependencies, with the paths fixed up.

Marcus


More information about the Openchemistry-users mailing list