You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Bryan Fink <br...@basho.com> on 2009/10/15 17:36:30 UTC

libjpeg dependency?

Hi.  I'm trying to play with CouchDB on my Mac (10.5.8), Erlang/OTP
R13B02 installed.  I'm getting an error when I try to start couchdb,
though:

$ couchdb
dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /opt/local/lib/libJPEG.dylib

Trace/BPT trap

The same error occurs with both couchdb-0.9.1 and -0.10, each compiled
from source tarball.

So, I have two questions:

1. Why does couchdb depend on libjpeg?

2. Is there any way to disable couchdb's dependency on libjpeg?  (Or,
of course, fix the dependency in some other way, but I've had macports
churning for a while now upgrading everything, and I'm ready to be
done.)

More details:

$ ls -l /opt/local/lib/libJPEG.dylib
lrwxr-xr-x  1 root  admin  20 Oct 15 09:27
/opt/local/lib/libJPEG.dylib -> libjpeg.62.0.0.dylib
$ ls -l /opt/local/lib/libjpeg.62.0.0.dylib
-rwxr-xr-x  2 root  admin  139616 Oct 15 09:27
/opt/local/lib/libjpeg.62.0.0.dylib

$ port info jpeg
jpeg @6b, Revision 3 (graphics)
...

I've tried the various DYLD_LIBRARY_PATH workarounds that Google turns
up, but they don't make any difference.

-Bryan

Re: libjpeg dependency?

Posted by Jan Lehnardt <ja...@apache.org>.
On 15 Oct 2009, at 18:19, Sebastian Cohnen wrote:

> On 15.10.2009, at 17:57, Jan Lehnardt wrote:
>
>>> 2. Is there any way to disable couchdb's dependency on libjpeg?   
>>> (Or,
>>> of course, fix the dependency in some other way, but I've had  
>>> macports
>>> churning for a while now upgrading everything, and I'm ready to be
>>> done.)
>>
>> Try `port disable libjpeg`. If that doesn't help, recompile all  
>> your MacPorts (sorry :).
>
> the problem is, that some people depend on libjpeg (e.g. for  
> imagemagick :-/

The alternative is in the second sentence :)

Cheers
Jan
--


Re: libjpeg dependency?

Posted by Sebastian Cohnen <se...@googlemail.com>.
On 15.10.2009, at 17:57, Jan Lehnardt wrote:

>> 2. Is there any way to disable couchdb's dependency on libjpeg?  (Or,
>> of course, fix the dependency in some other way, but I've had  
>> macports
>> churning for a while now upgrading everything, and I'm ready to be
>> done.)
>
> Try `port disable libjpeg`. If that doesn't help, recompile all your  
> MacPorts (sorry :).

the problem is, that some people depend on libjpeg (e.g. for  
imagemagick :-/


Sebastian

Re: libjpeg dependency?

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Bryan,

On 15 Oct 2009, at 17:36, Bryan Fink wrote:

> Trace/BPT trap
>
> The same error occurs with both couchdb-0.9.1 and -0.10, each compiled
> from source tarball.
>
> So, I have two questions:
>
> 1. Why does couchdb depend on libjpeg?

It doesn't. This is an artificial dependency that MacPorts introduces.

> 2. Is there any way to disable couchdb's dependency on libjpeg?  (Or,
> of course, fix the dependency in some other way, but I've had macports
> churning for a while now upgrading everything, and I'm ready to be
> done.)

Try `port disable libjpeg`. If that doesn't help, recompile all your  
MacPorts (sorry :).

Or try CouchDBX: http://janl.github.com/couchdbx/

Cheers
Jan
--


>
> More details:
>
> $ ls -l /opt/local/lib/libJPEG.dylib
> lrwxr-xr-x  1 root  admin  20 Oct 15 09:27
> /opt/local/lib/libJPEG.dylib -> libjpeg.62.0.0.dylib
> $ ls -l /opt/local/lib/libjpeg.62.0.0.dylib
> -rwxr-xr-x  2 root  admin  139616 Oct 15 09:27
> /opt/local/lib/libjpeg.62.0.0.dylib
>
> $ port info jpeg
> jpeg @6b, Revision 3 (graphics)
> ...
>
> I've tried the various DYLD_LIBRARY_PATH workarounds that Google turns
> up, but they don't make any difference.
>
> -Bryan
>


Re: libjpeg dependency?

Posted by Bryan Fink <br...@basho.com>.
On Thu, Oct 15, 2009 at 11:52 AM, Adam Kocoloski <ko...@apache.org> wrote:
> On Oct 15, 2009, at 11:36 AM, Bryan Fink wrote:
>> 1. Why does couchdb depend on libjpeg?
>
> It doesn't, really.  But the command `icu-config --invoke` ends up prefixing
> /opt/local/lib to DYLD_LIBRARY_PATH, at which point all those MacPorts libs
> start trumping the Apple defaults.  It sucks, and in trunk we don't do it
> anymore.

Ah - ICU again.  Same reason I had to recompile Erlang in 32bit mode.
Don't suppose you have any hints in that department?  :)

>> 2. Is there any way to disable couchdb's dependency on libjpeg?  (Or,
>> of course, fix the dependency in some other way, but I've had macports
>> churning for a while now upgrading everything, and I'm ready to be
>> done.)
>
> You can safely remove the call to icu-config --invoke from the couchdb
> startup script.  Turns out it isn't really necessary to get the ICU
> libraries linked in properly.

Ah, fantastic.  That did it.  Thanks much, Adam.

-Bryan

Re: libjpeg dependency?

Posted by Adam Kocoloski <ko...@apache.org>.
Heya Brian, nice to see a fellow Erlang/JSON/REST/NoSQL/... DB dev  
over here!

On Oct 15, 2009, at 11:36 AM, Bryan Fink wrote:

> Hi.  I'm trying to play with CouchDB on my Mac (10.5.8), Erlang/OTP
> R13B02 installed.  I'm getting an error when I try to start couchdb,
> though:
>
> $ couchdb
> dyld: Symbol not found: __cg_jpeg_resync_to_restart
>  Referenced from:
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ 
> Frameworks/ImageIO.framework/Versions/A/ImageIO
>  Expected in: /opt/local/lib/libJPEG.dylib
>
> Trace/BPT trap
>
> The same error occurs with both couchdb-0.9.1 and -0.10, each compiled
> from source tarball.
>
> So, I have two questions:
>
> 1. Why does couchdb depend on libjpeg?

It doesn't, really.  But the command `icu-config --invoke` ends up  
prefixing /opt/local/lib to DYLD_LIBRARY_PATH, at which point all  
those MacPorts libs start trumping the Apple defaults.  It sucks, and  
in trunk we don't do it anymore.

> 2. Is there any way to disable couchdb's dependency on libjpeg?  (Or,
> of course, fix the dependency in some other way, but I've had macports
> churning for a while now upgrading everything, and I'm ready to be
> done.)

You can safely remove the call to icu-config --invoke from the couchdb  
startup script.  Turns out it isn't really necessary to get the ICU  
libraries linked in properly.  Cheers,

Adam