You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Joshua Boyd <jd...@jdboyd.net> on 2008/12/03 21:56:35 UTC

Link trouble on Solaris/SPARC

I am trying to build 0.8.1 on Solaris Express on SPARC.

Here is the error, the steps I took to install it are below:
$ LD_LIBRARY_PATH=/opt/spidermonkey/lib/ ./couchdb
Apache CouchDB 0.8.1-incubating (LogLevel=info)
Apache CouchDB is starting.

{"init terminating in do_boot","ld.so.1: beam.smp: fatal: relocation
error: file
/opt/couchdb-0.8.1//lib/couchdb/erlang/lib/couch-0.8.1-incubating/priv/lib/couch_erl_driver.so:
symbol ucol_close_4_0: referenced symbol not found"}
init terminating in do_boot (ld.so.1: beam.smp: fatal: relocation error:
file
/opt/couchdb-0.8.1//lib/couchdb/erlang/lib/couch-0.8.1-incubating/priv/lib/couch_erl_driver.so:
symbol ucol_close_4_0: r

I have built spider monkey to /opt/spidermonkey.  I installed ICU using
these commands:
./runConfigureICU Solaris
./configure
gmake
sudo gmake install

and I can confirm that the libraries are present at /usr/lib and
/usr/lib/sparcv9 and /usr/local/lib/.  I'm not sure why it is there 3
times.  I believe that ICU came preinstalled, and nm shows that
/usr/lib/libicui18n.so does not have the symbol that is being complained
about.  The version in /usr/lib is really old.

So, I guess the question is A) can I just use the old libicu that was
already installed?  B) how to I force this to use the new version in
/usr/local/lib instead of the old version in /usr/lib?

I

Re: Link trouble on Solaris/SPARC

Posted by Joshua Boyd <jd...@jdboyd.net>.
On Dec 5, 2008, at 6:16 AM, Noah Slater wrote:

> On Fri, Dec 05, 2008 at 12:06:26AM -0500, Joshua Boyd wrote:
>> In the end, it turned out that the ICU install in /usr/local/lib  
>> was 64bits,
>> and that is why no amount of command line over-rides would make it  
>> link to
>> /usr/local/lib/libicu* instead of /usr/lib/libicu*.
>
> Great! I'm glad you got it sorted. Could you add any information to:
>
>   http://wiki.apache.org/couchdb/Error_messages
>
> Thanks,
>

OK.

Err, I seem to have made a mess of the page, but I think I've fixed  
it now.

Re: Link trouble on Solaris/SPARC

Posted by Noah Slater <ns...@apache.org>.
On Fri, Dec 05, 2008 at 12:06:26AM -0500, Joshua Boyd wrote:
> In the end, it turned out that the ICU install in /usr/local/lib was 64bits,
> and that is why no amount of command line over-rides would make it link to
> /usr/local/lib/libicu* instead of /usr/lib/libicu*.

Great! I'm glad you got it sorted. Could you add any information to:

  http://wiki.apache.org/couchdb/Error_messages

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater

Re: Link trouble on Solaris/SPARC

Posted by Joshua Boyd <jd...@jdboyd.net>.
On Dec 4, 2008, at 6:35 PM, Joshua Boyd wrote:
> $ ldd /opt/couchdb-0.8.1/lib/couchdb/erlang/lib/couch-0.8.1- 
> incubating/priv/lib/couch_erl_driver.so
>         libicuuc.so.3 =>         /usr/lib/libicuuc.so.3
>         libicudata.so.3 =>       /usr/lib/libicudata.so.3
>         libicui18n.so.3 =>       /usr/lib/libicui18n.so.3
>         libmozjs.so =>   /opt/spidermonkey/lib/libmozjs.so
>         libpthread.so.1 =>       /lib/libpthread.so.1
>         libc.so.1 =>     /lib/libc.so.1
>         libm.so.2 =>     /lib/libm.so.2
>         libCrun.so.1 =>  /usr/lib/libCrun.so.1
>         /platform/SUNW,Ultra-80/lib/libc_psr.so.1

In the end, it turned out that the ICU install in /usr/local/lib was  
64bits, and that is why no amount of command line over-rides would  
make it link to /usr/local/lib/libicu* instead of /usr/lib/libicu*.

Re: Link trouble on Solaris/SPARC

Posted by Joshua Boyd <jd...@jdboyd.net>.
On Thu, Dec 04, 2008 at 01:27:31PM +0000, Noah Slater wrote:
> On Wed, Dec 03, 2008 at 03:56:35PM -0500, Joshua Boyd wrote:
> > So, I guess the question is A) can I just use the old libicu that was already 
> > installed?  B) how to I force this to use the new version in /usr/local/lib
> > instead of the old version in /usr/lib?
> 
> ICU comes with a script called icu-config that the CouchDB build process uses to
> gather information for linking and compiling, and what not. Whatever icu-config
> script is found first on the path when you run ./configure is the one that
> decides what libraries are linked against.
> 
> Run the following two commands to see what your default setup is:
> 
>   icu-config --cppflags-searchpath
> 
>   icu-config --ldflags-searchpath
> 
> There are four ways you can configure this, all using environment variables:
> 
>   * Alter your PATH so that the chosen icu-config script is found first
> 
>   * Override ICU_CONFIG to point to the chosen icu-config script
> 
>   * Override ICU_LOCAL_CFLAGS to the value of "icu-config --cppflags-searchpath"
> 
>   * Override ICU_LOCAL_LDFLAGS to the value of "icu-config --ldflags-searchpath"
> 

/usr/local/bin/icu-config is the first icu-config in the search path,
and icu-config --ldflags-searchpath does show the correct output for
what I desire.

Here is the command line I'm trying:

ICU_LOCAL_CFLAGS=-I/usr/local/include/ ICU_LOCAL_LDFLAGS=-L/usr/local/lib ./configure --prefix=/opt/couchdb-0.8.1/ --with-js-include=/opt/spidermonkey/include/js/ --with-js-lib=/opt/spidermonkey/lib  

After I install, I still have the same error when trying to run it.

$ ldd /opt/couchdb-0.8.1/lib/couchdb/erlang/lib/couch-0.8.1-incubating/priv/lib/couch_erl_driver.so 
        libicuuc.so.3 =>         /usr/lib/libicuuc.so.3
        libicudata.so.3 =>       /usr/lib/libicudata.so.3
        libicui18n.so.3 =>       /usr/lib/libicui18n.so.3
        libmozjs.so =>   /opt/spidermonkey/lib/libmozjs.so
        libpthread.so.1 =>       /lib/libpthread.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        libCrun.so.1 =>  /usr/lib/libCrun.so.1
        /platform/SUNW,Ultra-80/lib/libc_psr.so.1

>From config.log, I find these lines:
configure:20302: checking ICU_LIBS
configure:20305: result: -xtarget=ultra -xarch=sparc -m64 -lpthread -lm -L/usr/local/lib -licui18n -licuuc -licudata -lpthread -lm

I've tried swapping the order of /usr/lib and /usr/local/lib in crle:
crle -c /var/ld/ld.config -l
/lib:/usr/local/lib:/usr/lib:/opt/spidermonkey/lib

But a gmake clean ; gmake ; gmake install doesn't fix the problem
still.  ldd still shows the same output.

Re: Link trouble on Solaris/SPARC

Posted by Noah Slater <ns...@apache.org>.
On Wed, Dec 03, 2008 at 03:56:35PM -0500, Joshua Boyd wrote:
> So, I guess the question is A) can I just use the old libicu that was already
> installed?  B) how to I force this to use the new version in /usr/local/lib
> instead of the old version in /usr/lib?

ICU comes with a script called icu-config that the CouchDB build process uses to
gather information for linking and compiling, and what not. Whatever icu-config
script is found first on the path when you run ./configure is the one that
decides what libraries are linked against.

Run the following two commands to see what your default setup is:

  icu-config --cppflags-searchpath

  icu-config --ldflags-searchpath

There are four ways you can configure this, all using environment variables:

  * Alter your PATH so that the chosen icu-config script is found first

  * Override ICU_CONFIG to point to the chosen icu-config script

  * Override ICU_LOCAL_CFLAGS to the value of "icu-config --cppflags-searchpath"

  * Override ICU_LOCAL_LDFLAGS to the value of "icu-config --ldflags-searchpath"

Best,

-- 
Noah Slater, http://tumbolia.org/nslater