Building OpenEXR libraries on Linux ( openSUSE 11.4 )

 

OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications. In order to develop plugins and tools that can handle OpenEXR file formats, you need to have the OpenEXR libraries built for your OS.

I had been not using Maya for the past few months since I have been dealing with proprietary applications used at my workplace. So I decided to continue work on Maya whenever I get back home after the days work. And what better way to start things all over again than starting with the API.

So I made a checklist of the libraries and other tools which I need to get built to start working on the same.So here I was building OpenEXR on openSUSE 11.4 and I stumbled across few things here and there which I felt would be valuable if I share with you all.

Building OpenEXR on you OS requires the zlib and ilmbase libraries which has to be linked at the time of configuring.So the first task is to get zlib and ilmbase libraries built on your machine.
I had my libraries installed in my sandbox folder which is /usr/local/sandbox referred by environment variable $SANDBOX. In case you have installed in locations other than standard paths like(/usr/include and /usr/lib) you need to make the build aware of the same.

setting the the environment variable PKG_CONFIG_PATH to $SANDBOX/lib/pkgconfig will let OpenEXR get the package info regarding zlib and ilmbase.

./configure –prefix $SANDBOX LDFLAGS=-L$SANDBOX/lib CPPFLAGS=-I$SANDBOX/include

make

While executing make if you come across the following error

main.cpp:195:28: error: ‘strcmp’ was not declared in this scope
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/anoop/apps/sources/openexr-1.6.1/exrenvmap’
make: *** [all-recursive] Error 1

you can fix it by including

#include <string.h>

in the header file list of main.cpp in both exrmaketiled and exrenvmap dirs.

and then execute

make install

About these ads

About anoop a k
Technical artist by profession. Technophile to the core! Love dancing , sketching and photography.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: