Make error: symbol lookup error: undefined symbol

Any help on this would be greatly appreciated. I am trying to install
1.9.3 on a RHEL Linux system that is pretty old. After running
./configure, I run ./make and get the error below.:

linking shared-object zlib.so
installing default zlib libraries
make[2]: Leaving directory /opt/local/src/ruby-1.9.3-p0/ext/zlib' make[2]: Entering directory /opt/local/src/ruby-1.9.3-p0’
linking ruby
make[2]: Leaving directory /opt/local/src/ruby-1.9.3-p0' make[1]: Leaving directory /opt/local/src/ruby-1.9.3-p0’
Generating RDoc documentation
./ruby: symbol lookup error:
/opt/local/src/ruby-1.9.3-p0/.ext/i686-linux/enc/encdb.so: undefined
symbol: rb_encdb_declare
make: *** [rdoc] Error 127

Here is the top of the ./make output:

make

    CC = gcc
    LD = ld
    LDSHARED = gcc -shared
    CFLAGS = -O3 -ggdb -Wall -Wno-unused-parameter -Wno-parentheses

-Wno-long-long -Wpointer-arith -Wwrite-strings
-Wdeclaration-after-statement -Werror-implicit-function-declaration
XCFLAGS = -include ruby/config.h -include ruby/missing.h
-fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -I. -I.ext/include/i686-linux -I./include -I.
DLDFLAGS =
SOLIBS =
compiling main.c

Additional Info:

/usr/libexec/gcc/i386-redhat-linux5E/4.1.2
Linux allncrkt18.edc.cingular.net 2.6.9-101.ELsmp #1 SMP Fri May 27
18:57:30 EDT 2011 i686 athlon i386 GNU/Linux

Existing Version:

ruby -e ‘puts $:’
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-linux

Thanks for your help. Please let me know how to get Ruby 1.9.3 up and
running.

A better idea would be to use RVM.

Installing RVM as a single-user is easy (multi-user instructions can be
found on their site):

  1. Download curl and git-core from your package manager.

  2. Run the following command (super user permission not needed):
    $ bash -s stable < <(curl -ss
    https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

  3. Load RVM into your bash file:
    $ echo ‘[[ -s “$HOME/.rvm/scripts/rvm” ]]’
    ‘&& . “$HOME/.rvm/scripts/rvm”’ >> ~/.bashrc

  4. Reload your bash file by restarting the terminal or by running
    source ~/.bashrc.

  5. Test for rvm with type rvm | head -1. It should output rvm is a function.

Installing Ruby 1.9.3:

  1. Make sure all dependencies are met by running rvm requirements.

  2. Install Ruby 1.9.3 with rvm install ruby-1.9.3-head.

  3. Use Ruby 1.9.3 by running rvm use ruby-1.9.3-head. You can also
    set Ruby 1.9.3 to the default ruby installation by running rvm use ruby-1.9.3-head --default.

./ruby: symbol lookup error:

/opt/local/src/ruby-1.9.3-p0/.ext/i686-linux/enc/encdb.so: undefined
symbol: rb_encdb_declare

This is declared in:

encoding.c:void rb_encdb_declare(const char *name);
encoding.c:rb_encdb_declare(const char *name)

And in:

enc/encdb.c:void rb_encdb_declare(const char *name);
enc/encdb.c:#define ENC_DEFINE(name) rb_encdb_declare(name)

Other than that I have no idea why you get this error.

It would be helpful to provide accurate versions of make, gcc, glibc and
binutils as well.

Something like:

GCC Version: GCC version 4.6.1
Glibc Version: ldd (Debian EGLIBC 2.13-20) 2.13
CFLAGS in use: -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC
-pthread
Binutils Version: GNU ld (GNU Binutils) 2.22

-----Messaggio originale-----
Da: Bryan D. [mailto:[email protected]]
Inviato: mercoled 28 dicembre 2011 00:29
A: ruby-talk ML
Oggetto: Re: make error: symbol lookup error: undefined symbol

A better idea would be to use RVM.

Installing RVM as a single-user is easy (multi-user instructions can be
found on their site):

  1. Download curl and git-core from your package manager.

  2. Run the following command (super user permission not needed):
    $ bash -s stable < <(curl -ss \

https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

  1. Load RVM into your bash file:
    $ echo '[[ -s “$HOME/.rvm/scripts/rvm” ]]
    && . “$HOME/.rvm/scripts/rvm” >> ~/.bash_profile

  2. Reload your bash file by restarting the terminal or by running
    source ~/.bashrc.

  3. Test for rvm with type rvm | head -1. It should output rvm is a function.

Installing Ruby 1.9.3:

  1. Make sure all dependencies are met by running rvm requirements.

  2. Install Ruby 1.9.3 with rvm install ruby-1.9.3-head.

  3. Use Ruby 1.9.3 by running rvm use ruby-1.9.3-head. You can also
    set Ruby 1.9.3 to the default ruby installation by running rvm use ruby-1.9.3-head --default.


Posted via http://www.ruby-forum.com/.


Caselle da 1GB, trasmetti allegati fino a 3GB e in piu’ IMAP, POP3 e
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Capodanno al parco Oltremare Riccione: Pacchetto hotel 3 stelle in
centro + ingresso al parco.