[ https://issues.apache.org/jira/browse/COUCHDB-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980361#action_12980361 ]
Randall Leeds commented on COUCHDB-562: --------------------------------------- The PKG_CHECK_MODULES macro expands to a setting of JS_CFLAGS and JS_LIBS on success only when they're not already specified. This makes for some hard to follow logic, but it's correct AFAICT. First we check the --with values, setting JS_CFLAGS and JS_LIBS, which essentially bypasses the pkg-config success path, but I also short-circuit the pkg-config fail path to not clobber JS_CFLAGS or JS_LIB_DIR if only one was set, otherwise fill in the defaults. JS_LIBS has to get modified again later because the naming of the library on windows builds has changed a few times. That's where the AC_CHECK_LIB calls come in for mozjs, js, and js3250 and is the reason I only set JS_LIB_DIR in the default case and don't add the "-l" linker flag until later (unless pkg-config got it for us, in which case you end up with -lmozjs twice, but that's harmless). > 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: 1.2 > > Attachments: couchdb-562.patch, couchdb-562_2.patch, > 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.