Linking Error
Thanks. It appears the spidermonkey libraries are being recognized.
However, during the build, I am now encountering the following:
make[4]: Entering directory `/opt/membase-2.0-repo/couchdb/src/couchdb/priv'
/bin/sh ../../../libtool --tag=CC --mode=link gcc -D_BSD_SOURCE -g -O2 -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/home/dev/erlang/lib/erlang/usr/include -I/usr/local/include/ -DXP_UNIX -lm -o couchjs couchjs-http.o couchjs-main.o couchjs-utf8.o -lcurl -ljs -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -lcrypt
libtool: link: gcc -D_BSD_SOURCE -g -O2 -I/home/dev/erlang/lib/erlang/usr/include -I/usr/local/include/ -DXP_UNIX -o couchjs couchjs-http.o couchjs-main.o couchjs-utf8.o -L/usr/local/lib -L/opt/local/lib -lm -lcurl -ljs -lcrypt
/usr/bin/ld: couchjs: hidden symbol `__gtdf2' in /usr/bin/../lib/gcc/tile-unknown-linux-gnu/4.4.3/libgcc.a(_FLOAT64_GCC_GT.o) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[4]: *** [couchjs] Error 1
make[4]: Leaving directory `/opt/membase-2.0-repo/couchdb/src/couchdb/priv'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/opt/membase-2.0-repo/couchdb/src/couchdb'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/membase-2.0-repo/couchdb/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/membase-2.0-repo/couchdb'
make: *** [make-install-couchdb] Error 2
-sh-4.1# vi Makefile
Any suggestions on the nature of this error?
Thanks in advance.
-Jon
Hi Perry,
I was able to get it to build in the following way (although I am not sure this is correct). I noticed in my /usr/local/lib directory where CouchDB looks for spidermonkey libraries there was a static library libjs.a and a dynamic library libjs.so. I simply moved the dynamic library out of the way and it finished the build.
I did notice some calls to git in the build. I don't have git on that machine. Do I need it for the build? The build did complete without any fatal errors.
However, now when I run CouchBase, it crashes with the following:
=SUPERVISOR REPORT==== 5-Aug-2011::15:30:34 ===
Supervisor: {local,ns_server_cluster_sup}
Context: start_error
Reason: {'EXIT',{undef,[{couch_app,start,[fake,[]]},
{supervisor,do_start_child,2},
{supervisor,start_children,3},
{supervisor,init_children,2},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}}
Offender: [{pid,undefined},
{name,couch_app},
{mfargs,{couch_app,start,[fake,[]]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,supervisor}]
=INFO REPORT==== 5-Aug-2011::15:30:34 ===
application: ns_server
exited: {shutdown,{ns_server,start,[normal,[]]}}
type: temporary
{"init terminating in do_boot",{{badmatch,{error,{shutdown,{ns_server,start,[normal,[]]}}}},[{init,start_it,1},{init,start_em,1}]}}
/opt/erlang/otp_src_R14B/lib/os_mon/priv/bin/memsup: Erlang has closed
Erlang has closed.
init terminating in do_boot ()
Any thoughts on that?
-Jon
There should be some more error messages above that...something with "error" or "crash"?
Hi Perry,
The full output is below.
I tried to use the gcc linker instead of ld by replacing LD=/usr/bin/ld with LD=/usr/bin/gcc in the Makefiles.
However, it seems ld was picked up somewhere else. Do you happen to know if there is some other change I need to make.
Anyway, here is the output when running after linking with the static libraries:
bash-4.1$ ./membase-server
Erlang R14B (erts-5.8.1) [source] [smp:64:10] [rq:64] [async-threads:16] [kernel-poll:true]
Eshell V5.8.1 (abort with ^G)
1>
=PROGRESS REPORT==== 7-Aug-2011::19:47:55 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.40.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:55 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.41.0>},
{name,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:55 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.39.0>},
{name,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:55 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.42.0>},
{name,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:55 ===
application: sasl
started_at: nonode@nohost
=PROGRESS REPORT==== 7-Aug-2011::19:47:56 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.48.0>},
{name,disksup},
{mfargs,{disksup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:56 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.49.0>},
{name,memsup},
{mfargs,{memsup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:56 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.51.0>},
{name,cpu_sup},
{mfargs,{cpu_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 7-Aug-2011::19:47:56 ===
application: os_mon
started_at: nonode@nohost
=PROGRESS REPORT==== 7-Aug-2011::19:47:56 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.54.0>},
{name,timer_server},
{mfargs,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
=INFO REPORT==== 7-Aug-2011::19:47:56 ===
Static config terms:
[{error_logger_mf_dir,"/opt/membase-2.0-repo/install/var/lib/membase/logs"},
{error_logger_mf_maxbytes,10485760},
{error_logger_mf_maxfiles,20},
{path_config_bindir,"/opt/membase-2.0-repo/install/bin"},
{path_config_etcdir,"/opt/membase-2.0-repo/install/etc/membase"},
{path_config_libdir,"/opt/membase-2.0-repo/install/lib"},
{path_config_datadir,"/opt/membase-2.0-repo/install/var/lib/membase"},
{path_config_tmpdir,"/opt/membase-2.0-repo/install/var/lib/membase/tmp"}]
=SUPERVISOR REPORT==== 7-Aug-2011::19:47:56 ===
Supervisor: {local,ns_server_cluster_sup}
Context: start_error
Reason: {'EXIT',{undef,[{couch_app,start,[fake,[]]},
{supervisor,do_start_child,2},
{supervisor,start_children,3},
{supervisor,init_children,2},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}}
Offender: [{pid,undefined},
{name,couch_app},
{mfargs,{couch_app,start,[fake,[]]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,supervisor}]
=INFO REPORT==== 7-Aug-2011::19:47:56 ===
application: ns_server
exited: {shutdown,{ns_server,start,[normal,[]]}}
type: temporary
{"init terminating in do_boot",{{badmatch,{error,{shutdown,{ns_server,start,[normal,[]]}}}},[{init,start_it,1},{init,start_em,1}]}}
/opt/erlang/otp_src_R14B/lib/os_mon/priv/bin/memsup: Erlang has closed.
Erlang has closed
init terminating in do_boot ()
This really answered my problem, thank you!
Hair extensions End
Jon,
If you're still hitting this error, it looks like you need to be using 'gcc' as a linker, instead of 'ld'. It links in libgcc when building the shared object, which should solve this problem.
Tim