RES: Do Eclipse work's with glibc2.3?

From: Christian Cleber Masdeval Braz - DATAPREVMS <christian.braz_at_previdencia.gov.br>
Date: Tue 11 May 2004 11:40:14 PM GMT
Message-ID: <7ADACC016F363D4E8A140E631B3246F10B8F7682@wtrjo098>
	
        I will pass here a solution for this problem where you can
        hack your glibc2.3 to work around the problem. I'm using a
        redhat i386 linux system (Fedora) with glibc2.3.2 and
        gcc3.3.2-1.

        1 - Ftp the sources of glibc2.3.2: http://ftp.gnu.org/gnu/glibc
            Get glibc-2.3.2.tar.gz and glibc-linuxthreads.tar.gz

        2 - Uncompress glibc-2.3.2.tar.gz, move linuxthreads to the
        created directory and uncompress glibc-linuxthreads.tar.gz

            tar -zxvf /usr/local/glibc-2.3.2.tar.gz
            tar -zxvf /usr/local/glibc-2.3.2/glibc-linuxthreads.tar.gz

        3 - Make a directory to the build process

            mkdir /usr/local/glibc-2.3.2-build

        4 - Make a directory for the installation

            mkdir /usr/local/glibc-installed

        5 - Correct the bug of sscanf.c

                I modify the file sscanf.c
    (I hope that my modify don't damage something)

    Original:
        int
        sscanf (s, format)
             const char *s;
             const char *format;
        {
          va_list arg;
          int done;

          va_start (arg, format);
          done = __vsscanf (s, format, arg);
          va_end (arg);

          return done;
        }
        libc_hidden_def (sscanf)

    Modified (add ",..." in function argument):
        int
        sscanf (const char *s, const char *format, ...)
        {
          va_list arg;
          int done;

          va_start (arg, format);
          done = __vsscanf (s, format, arg);
          va_end (arg);

          return done;
        }
        libc_hidden_def (sscanf)

    6 - To eclipse.lib work with glibc-2.3.2 remove the
    "compat-symbol" lines form
    /usr/local/glibc-2.3.2/ctype/ctype-info.c.

    7 - Go to the build directory and do
    /usr/local/glibc-2.3.2/configure
    -prefix=/usr/local/glibc-installed -enable-add-ons

    The new glibc will be installed in this directory and so
    will prevent damage your system.

    8 - run: make

    9 - If no error occur run: make install

    Ok, until here you have a new version of glibc-2.3.2 to use to run your
    eclipse programs. I'm not install the lib in my system
    overwriting the default. I use that only with the eclipse
    programs. But, how to do the programs use the new lib instead
    of the default? Here is,

    10 - Put this options in the LDFFLAGS of makefile

    -Wl,-dynamic-linker,-rpath,/usr/local/glibc-installed/lib/ld-linux.so.2,
 
/usr/local/glibc-installed/lib/libc.so.6,/usr/local/glibc-installed/lib/libd
l.so

    11 - To run a program do: /lib/ld-linux.so.2 ./program_name


    That's all folks.

    I hope this work to you.



-----Mensagem original-----
De: Joachim Schimpf [mailto:j.schimpf@icparc.ic.ac.uk]
Enviada em: quinta-feira, 6 de maio de 2004 13:34
Para: eclipse-users@icparc.ic.ac.uk
Cc: Christian Cleber Masdeval Braz - DATAPREVMS; pagliosa@brturbo.com.br
Assunto: Re: [eclipse-users] Do Eclipse work's with glibc2.3?


Christian Cleber Masdeval Braz - DATAPREVMS wrote:
> 
>    
> I'm trying to link to the eclipse libraries on a I386/Linux system. It
> uses glibc-2.3.2, and I get these undefined symbols at link time:
> 
> .../eclipse/lib/i386_linux/libeclipse.so: undefined reference to
`__ctype_b'
> .../eclipse/lib/i386_linux/libeclipse.so: undefined reference to
> `__ctype_toupper'
> 
> Looking around the web, it appears that these symbols have been removed
> in libc-2.3.2.

Redhat has annoyed a lot of people with this incompatible change, see e.g.
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86465

The eclipse we are currently distributing works with glibc 2.0-2.2.
I have experimented a bit and it seems impossible to build a library
that works with 2.0-2.3, but i can build one that works with 2.1-2.3.

So, if there are no objections, we could drop support for glibc 2.0
and make things work on 2.3, any opinions? Hopefully in the future
such problems will not occur any longer since glibc seems to use
versioned symbols now.

-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
 
Received on Wed May 12 00:46:04 2004

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:28 PM GMT GMT