[ 
https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dominique Leuenberger a.k.a DimStar updated COUCHDB-562:
--------------------------------------------------------

    Attachment: couchdb-mozjs-rpath.patch

I'm the openSUSE packager for couchdb and we ran into the same problem. I 
created a patch (attached) but it is not generic enough yet.

The best option actually would be to properly use pkg-config: there all the 
information required to properly link to mozjs would be documented.
$> pkg-config --libs mozilla-js
-Wl,-rpath,/usr/lib64/xulrunner-1.9.2 -L/usr/lib64/xulrunner-devel-1.9.2.3/lib 
-lmozjs -lplds4 -lplc4 -lnspr4 -lpthread -ldl

Nevertheless, the attached patch can be applied by distros needing it for now, 
it injects the rpath only where needed (already better than LD_RUN_PATH)

> link couchjs with bound libmozjs
> --------------------------------
>
>                 Key: COUCHDB-562
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-562
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Build System
>    Affects Versions: 0.11
>         Environment: linux, ubuntu,debian
>            Reporter: Meno Abels
>             Fix For: 0.12
>
>         Attachments: couchdb-mozjs-rpath.patch
>
>
> If you build the couchdb from the source with a prefix set and 
> --with-js-[lib|include] option the resulting couchjs programm in 
> <prefix>/lib/couchdb/bin/couchjs does not know where to find the specified 
> libmozjs.so which was specified in with-js-lib. This causes that quite all 
> test will fail. 
> To fix this the rpath has to setup during the compile. I don't had a look 
> where to do this.
> but a small shell wrapper fix it also
> #!/bin/sh
> LD_LIBRARY_PATH=...  exec $0.orig $@

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to