You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Meno Abels (JIRA)" <ji...@apache.org> on 2009/11/05 08:59:32 UTC
[jira] Created: (COUCHDB-562) link couchjs with bound libmozjs
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
Environment: linux, ubuntu,debian
Reporter: Meno Abels
Fix For: 0.10
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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773956#action_12773956 ]
Adam Kocoloski commented on COUCHDB-562:
----------------------------------------
I'd like to avoid LD_LIBRARY_PATH if at all possible. It seems to have so many side-effects on OS X when a user has a fairly large MacPorts install.
Definitely in favor of the rpath solution, though.
> 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
> Environment: linux, ubuntu,debian
> Reporter: Meno Abels
> Fix For: 0.10
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noah Slater updated COUCHDB-562:
--------------------------------
Fix Version/s: (was: 0.10)
0.11
> 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.11
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Joseph Davis updated COUCHDB-562:
--------------------------------------
Skill Level: Regular Contributors Level (Easy to Medium)
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Brian Candler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774931#action_12774931 ]
Brian Candler commented on COUCHDB-562:
---------------------------------------
I belive that setting rpath is done using LD_RUN_PATH at compile time.
The following works for me:
$ ./bootstrap
$ LD_RUN_PATH=/usr/lib/xulrunner-1.9.1.4 ./configure --with-js-lib=/usr/lib/xulrunner-1.9.1.4 --with-js-include=/usr/lib/xulrunner-devel-1.9.1.4/include
$ LD_RUN_PATH=/usr/lib/xulrunner-1.9.1.4 make && sudo make install
You can confirm that the binary has the library location coded into it:
$ ldd /usr/local/lib/couchdb/bin/couchjs | grep moz
libmozjs.so => /usr/lib/xulrunner-1.9.1.4/libmozjs.so (0x0031e000)
So the solution might be just to include the above in the documentation. It would be nice if ./configure could carry the LD_RUN_PATH setting forward. And/or, it could append the --with-js-lib value onto any existing 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
> Environment: linux, ubuntu,debian
> Reporter: Meno Abels
> Fix For: 0.10
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Meno Abels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773958#action_12773958 ]
Meno Abels commented on COUCHDB-562:
------------------------------------
LD_LIBRARY_PATH is not a solution, it's just a hotfix. I make all js stuff slower and has side effects.
> 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
> Environment: linux, ubuntu,debian
> Reporter: Meno Abels
> Fix For: 0.10
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Noah Slater (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noah Slater updated COUCHDB-562:
--------------------------------
Fix Version/s: (was: 0.11)
0.12
> 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
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt updated COUCHDB-562:
---------------------------------
Affects Version/s: 0.11
Bump to 0.11.
> 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.10
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-562) link couchjs with bound libmozjs
Posted by "Dominique Leuenberger a.k.a DimStar (JIRA)" <ji...@apache.org>.
[ 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