Hack of the Day: running CFD-ACE+ on Gentoo Linux

CFD-ACE+ is a multiphysics and computational fluid dynamics (CFD) simulation tool that was originally developed by CFD Research Corp. and is now distributed by ESI Software. The only platforms officially supported by CFD-ACE+ are Red Hat Enterprise Linux, SUSE Linux and Windows. Fortunately, it seems that ACE+ runs on other Linux distributions with only a little hacking. I just installed and tested CFD-ACE+ successfully (albeit not very thoroughly) on an up-to-date Gentoo Linux system.  The process will require hacking some config files to build an external library from source.

I started by downloading the files intended for Red Hat 6. Each package is a strange self-extracting executable file that unpacks itself when run. They also provide a C-shell script called install.com that automates the install process. The install script is very well behaved in that it doesn’t try to spew libraries and binaries throughout your filesystem, and you can run it as an ordinary user and install the file in your home directory.  The tricky part about the installation is that the unpacking software (which is bundled into the self-extracting executable) needs the library selinux.so.1 in order to run. That library isn’t normally installed on a Gentoo system unless you’ve specifically set up SELinux.  In order to avoid the potential problems of installing this library in my system paths,  I  created src and include directories in my home directory.  I downloaded source tarballs for libsepol and libselinux from the download page of the selinux project.  First, build libsepol using make.  Then, copy the libsepol.so.1 binary from the src directory to the lib directory you just created in your home directory. Copy the include/sepol directory with all of its contents to the include directory in your home directory.  When you are done, you should have:

include/
└── sepol
    ├── av_permissions.h
    ├── boolean_internal.h
    ├── boolean_record.h
    ├── booleans.h
    [output truncated]

Now, edit the Makefile in the src directory of libselinux. Change the INCLUDEDIR variable so that it points to include in your home directory:

 INCLUDEDIR ?= /home/yourusername/include

Now, it shouldn’t complain about finding the header files for libsepol.  Build libselinux and copy the library from src to the lib directory where you put libsepol.so.

lib/
├── libselinux.so -> libselinux.so.1
├── libselinux.so.1
├── libsepol.so -> libsepol.so.1
└── libsepol.so.1

Finally, you need to tell ACE+ installer where to find these libraries. I defined the LD_LIBRARY_PATH variable on the command line like this:

 LD_LIBRARY_PATH=/home/cfinch/lib ./install.com

These libraries are ONLY needed for the ACE+ unpacker. Once you have unpacked the files, you don’t need the libraries anymore (until the next upgrade)

Leave a Reply