Having trouble installing PIL in Snow Leopard - osx-snow-leopard

I followed these instructions:
http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/
And everything went as described.
However, at the end, I tried running:
python selftest.py
to verify that everything is working properly, but I get:
*** The _imaging C module is not installed
I then run the python interpreter and tried:
import _imaging
and get this error:
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /Library/Python/2.6/site-packages/PIL/_imaging.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/PIL/_imaging.so
This is on my first Mac, so apologize if I'm missing anything obvious, but any help you could provide would be greatly appreciated.
Thanks!

The problem happens because jpeglib is not available as part of standard MAC OS X distribution for Leopard and Snow Leopard.
The solution is as follows:
- compile lib jpeg
- make sure tha libjpeg62.dylib is available on your DYLD_LIBRARY_PATH (you might like to put it in places like /usr/local/lib)
Useful instructions are available here

Ok, got it working thanks to Shailesh's help. First, I ran this:
otool -L /Library/Python/2.6/site-packages/PIL/_imaging.so
to see where the dependencies were. I removed those references to libjpeg, and then recompiled libjpeg and PIL (following the instructions in the link below) and then everything worked.
http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/

Related

library rt not found on Mac, while configuring sfft (sparse fast fourier transformation)

I'm a green hand, and apology for the following could be simple question:
I'm trying to install the package
sfft on my Mac (OS X YOSEMITE).
The configuration step halts and give an error:
checking for library rt:not found
How can I fix this?
librt is a thing on Linux but not on OS X. You don't need it. Try editing the wscript file in the package you downloaded and remove this line:
conf.check_cxx(lib='rt', uselib_store='RT')
Then remove RT from common_use in the same file and try to build.

Haskell: Missing C library on Arch Linux works on Ubuntu

I recently switched my PC at work from Ubuntu to Arch Linux.
And I am now getting the following error (I am using stack to build my project):
setup-Simple-Cabal-1.22.4.0-ghc-7.10.2: Missing dependency on a
foreign
library:
* Missing C library: HSrts-ghc7.10.2
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
As far as I understand it, the difference in Linux Distribution should not cause any issue.
Things I have tried:
-add the path where the library is with --extra-lib-dirs
-make sure that the version of stack/ghc are the same acrose both systems
-tried unsucesfully to find a relevant difference between the 2 systems
(gcc version was different but didn't change anything)
I have a docker container based on ubutu where it builds without an issue.
The only thing I can think of is that this library gets handled differently from some random C-library since it contains the Haskell-Runtime. But I have no idea what this difference would be. Or how a differnent handling would cause an issue on my Arch System.
Here my .cabal file (the folder also contains the whole project):
https://github.com/opencog/atomspace/blob/master/tests/haskell/libExecutionOutputTest/opencoglib.cabal
Okay i figured out a workaround, instead of specifiyc the library in the .cabal file:
...
extra-libraries: HSrts-ghc7.10.2
...
you add it to your stack.yaml file:
...
ghc-options:
package-name: -lHSrts-ghc7.10.2
...
If you also have a exectuable defined in your .cabal file this will break the executable, since the library is not only included in the library. And including the runtime library in an executable results in an instant segementation fault.

Xcode cannot find installed library

I am using Mac OS X 10.8 with Xcode. I have installed the jansson library, with the following commands:
./configure
make
make check
sudo make install
Everything went fine and the library installed correctly. I have created a smple .c file with a text editor and tried to include the <jansson.h> file. I builded everything and it gave no errors, meaning that the library is installed on my system.
Now, Xcode doesn't find the library at all, saying that <jansson.h> is not found. I have tried to restart my Mac, but nothing happens. If anyone knows a possible solution, I will be grateful. Thanks!
I resolved the issue, by going under Build phases, and searching for HEADER_SEARCH_PATH. Then I changed the search path label with /usr/local/include, where the library was installed.

Why do I get "Header file missing" (make error)?

I'm trying to install a geocoder for a website I'm building. I'm using Geocoder because the query limit for the Google Maps API falls short of my needs. I installed all the gems required and have SQLite3. When I'm actually trying to install the geocoder gem (Geocoder::US) I get an error while running the make file.
I'm getting an error I cannot figure out. It mentions the error (in the title) then talks of an non-existent file (sqlite3ext.h). Here is the error:
I know this is vague but I've been working for 10+ hours trying to install this and have found little help online. Any advice on which direction to go would be appreciated.
This is from the project's Readme:
To build Geocoder::US, you will need gcc/g++, make, bash or equivalent,
the standard *NIX ‘unzip’ utility, and the SQLite 3 executable and
development files installed on your system.
It seems that you lack the SQLite3 development headers.
This is relevant:
NOTE: If you do not have /usr/include/sqlite3ext.h installed, then
your sqlite3 binaries are probably not configured to support dynamic
extension loading. If not, you must compile and install SQLite from
source, or rebuild your system packages. This is not believed to be a
problem on Debian/Ubuntu, but is known to be a problem with Red
Hat/CentOS.
Also they do not mention Windows. You should:
Ask them if someone uses it on Windows and if there are instructions for that.
Evaluate the thing on Linux, Debian/Ubuntu especially.
-fPiC is not your problem. As the log states, the compiled code is already position independent. The problem is, that the sqllite3ext.h is not in the compiler include path.

Problems building libmemcached on Mac OSX (and Mint, and CentOS)

Downloaded the tarball from https://launchpad.net/libmemcached/+download/libmemcached-1.0.12.tar.gz (linked to from libmemcached.org). Ran the usual ./configure + make protocol, got a number of errors related to implicitly converting 64-bit value to 32-bit, and eventually a failure to find event.h.
Earlier, tried installing on Mint (./libtool: line 1125: g++: command not found) and CentOS (./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory)
I'm not too bright when it comes to debugging this, but I'm very used to ./configure + make "just working". Anybody able to help?
Thanks,
Chap
I meet it yet. And, I found it :
https://github.com/mxcl/homebrew/issues/20635
In the page, the error been found is a libmemcahed bug that had been report as https://bugs.launchpad.net/libmemcached/+bug/1216521

Resources