10 4 / 2012
After much blood, sweat, and tears, I’ve finally gotten gnome-chemistry-utils running on Mac OS X. Yes, really.
Previous tribulations here.
I decided to not make a CMake project because I figured there wouldn’t be Find scripts for most of the dependencies, and I eventually realized that everything I needed had a .pc somewhere.
Major steps to getting it to find the dependencies:
- I had to give pkg-config several paths:
$ echo $PKG_CONFIG_PATH
goffice 0.9.2 compiled with
./configure -CFLAGS=-DG_CONST_RETURN=const. This has been merged into Macports r91768.
Despite the fact that
gtk+-3.0.pclists this as an include dir, gnome-chemistry-utils complained about not finding it. I looked in
configure.acand found the following gem:
dnl Not sure we need to test for glx.h
AC_CHECK_HEADER(GL/glx.h,,[AC_MSG_ERROR([Error, GL/glx.h not found.])])
I commented out the header check and, uh, it configured fine. (ran
aclocal; autoconf; ./configure)
makethrew the same type of errors goffice was throwing (about G_CONST_RETURN needing stuff before it), so I ended up using the following configure step for gnome-chemistry-utils:
$ ./configure CFLAGS=-DG_CONST_RETURN=const CXXFLAGS=-DG_CONST_RETURN=const
And I’ve got it running!
A few hiccups with importing a molecule: after going to Tools/Import molecule, the Import window was behind the main window. XQuartz is always a bit wonky. In order to paste into the text box, I enabled 3-button mouse mode, and option-click/Paste appears to properly access the OS X copied text.
I haven’t fussed with it too much, but it seems much easier to use than BKchem.
Now of course the question is whether I want to attempt to make a macport for this. The most horrifying part was getting chemical-mime-data to build. I don’t know enough about autoconf to fix the png generation problem, and I don’t even think chemical-mime-data helps OS X at all (I still got “unknown type” errors). I could remove it as a dependency and see if I can get gnome-chemistry-utils to build.
P.S. Appears to crash when I try to save or quit. Hmm.
(gchempaint-0.14:33600): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
10 4 / 2012
Right now, I’m trying to get gnome-chemistry-utils to install. Of course there’s no macport, so I’m currently in the ./configure -> install dependency via macports endless cycle.
At least it’s got screenshots that show the simple line drawings I want, and it was updated in 2012. I’m keeping my fingers crossed.
Fun things so far: requires goffice 0.9.0, macport is 0.8.17. Oh boy.
Fixed goffice and submitted the new Portfile to macports! Needed to provide a
#define type as a CFLAG to configure.
Have to manually pass goffice paths to gnome-chemistry-utils configure:
Next missing dependency is chemical-mime-data. It needs a path to an SVG converter (librsvg from macports):
rsvg-convert syntax is different from whatever rsvg they used. Fixed syntax in Makefile but PNGs still didn’t get generated. Copied their code and just made a bash script to generate the PNGs. Thankfully, made a pkgconfig. But I had to add /usr/local/share/pkgconfig to my PKG_CONFIG_PATH. And remember how to reload my profile!
Next dependency: bodr. Apparently it stands for Blue Obelisk Data Repository. That’s different. Painless autoconf install, pkgconfig, etc.
I should just make a cmake project.
And…the thing depends on openbabel. Which is in itself a molecule builder. Which has a macport. Which means I probably could have just done everything I wanted to with openbabel. Macport built without issues. So far the only thing I’m having to pass manually is goffice.
Next dep is glx.h, which may be another thing to pass manually. Have to check
./configure -h again.
./configure goffice_CFLAGS=-I/usr/local/include goffice_LIBS=-L/usr/local/lib CPPFLAGS=-I/opt/local/include configures but make fails, looks like it isn’t including cairo headers properly.
Looks like it’s not finding a single library unless I tell it exactly where it is, and I have no desire to pass 15 library paths to configure. Going to let this rest and try making a CMake project. I should be able to acquire find scripts for at least some of these.
09 4 / 2012
So I’ve been having fun trying to find a usable libre 2D molecule editor. I’m just trying to make diagrams of some simple pyridine-based molecules, nothing fancy.
Avogadro seems a bit buggy. Odd graphics glitches (atom labels showing up as white squares, ball rendering very wrong), poor interface (no menus?). It also seems overly 3D oriented for my needs. I couldn’t find a display setting that was just black lines and letters on white.
It took me a while to get BKChem up and running. It’s written in Python and uses Tk for its GUI, but the default Macports install of Python 2.6.7 doesn’t include Tkinter. After installing Tk, I tried rebuilding Python to no avail. However, installing the port py26-tkinter did the trick.
Unfortunately, BKChem seems slow and unintuitive. Naturally I didn’t read the manual but I couldn’t figure out how to do anything (zoom, edit molecules, you name it). I suppose I shouldn’t have expected snappy responses from an interpreted language running in a cross-platform GUI setup.