I am receiving the following error on FreeBSD 10 when trying to compile and install Plone 5.0.4:
"Unable to find libjpeg library and headers. These are required to build Plone."
I believe i have all dependencies correctly installed using pkg, the FreeBSD binary package manager. I have tried the "jpeg" package as well as the "jpeg-turbo" package, both of which have a libjpeg.so library which is what I assume Plone is looking for. It seems that Plone either can't find it or doesn't like the library. Mine is located in /usr/local/lib/libjpeg.so.
How can I get past this error? I've searched Google for an answer but found nothing useful when searching for Plone+FreeBSD+libjpeg.
FYI, I was able to get Plone running easily using the pkg/ports system, but it's an older version (4.3.x) and doesn't seem to support buildout, which I need in order to install a plone-based application, Bikalims... so I need to install Plone from source. I'm stuck at the error above.
Without knowing details about FreeBSD: libjpeg and its header files (often packaged separate) are needed to build the Python Imaging Library (PIL/ best packaged under the name Pillow).
Check if your source buildout uses PIL, PILwoTK or Pillow. If PIL or PILwoTK is used exchange this with Pillow. Latest version works fine with all Plone 4.3.x and 5.x (and is recommended).
I just installed py27-pillow, but the Plone installer still stops with the same error about jpeg and its headers.
Pillow appears to have libjpeg as a dependency too, but it installed fine since I have jpeg already installed. I still wonder if the Plone install script is not looking in the right part of the filesystem to find libjpeg and its headers. I'm not sure where to look in the install script to check that.
I was able to do the build with the following commands:
% sh # use Bourne shell because it's the one where I know how to control the environment
$ export CFLAGS="-I/usr/local/include"
$ export CPPFLAGS="-I/usr/local/include"
$ export LDFLAGS="-L/usr/local/lib"
$ ./install.sh standalone
I've no idea why 10.x freebsd is leaving /usr/local out of the build environment. We do have some BSD folks in the community. Maybe they can help us out.
That is excellent, thank-you so much! With this I was able to successfully install Plone on FreeBSD 10... and inside a secure jail, in fact. As I'm using csh for my shell instead of Bourne, the syntax is just very slightly different:
In your buildout, consider pinning your Pillow version number to the same one you have installed already, if you feel it is sufficient and it works. This prevents buildout from installing (another) Pillow (yet again).