Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Compiling glibc 2.7 on Ubuntu 7.10

  1. #1
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    28
    Distro
    Ubuntu UNR

    Compiling glibc 2.7 on Ubuntu 7.10

    I'm trying to compile glibc 2.7 on Ubuntu 7.10 (Kernel Version 2.6.22-14). So here's what I've done till now -

    1. Downloaded and extracted the glibc source from http://ftp.gnu.org/pub/gnu/glibc/glibc-2.7.tar.gz
    2. Made a separate glibc-build directory from which I did a configure.

    ../libidn/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.22 --libexecdir=/usr/lib/glibc

    3, This generated the Makefile and I did a make at which point it fails with the following error.

    /home/vsriram/Desktop/glibc-build/elf/librtld.os: In function `print_statistics':
    /home/vsriram/Desktop/libidn/elf/rtld.c:2800: undefined reference to `__stack_chk_fail_local'
    /home/vsriram/Desktop/glibc-build/elf/librtld.os: In function `process_dl_debug':
    /home/vsriram/Desktop/libidn/elf/rtld.c:2436: undefined reference to `__stack_chk_fail_local'
    /home/vsriram/Desktop/glibc-build/elf/librtld.os: In function `process_envvars':
    /home/vsriram/Desktop/libidn/elf/rtld.c:2695: undefined reference to `__stack_chk_fail_local'
    /home/vsriram/Desktop/glibc-build/elf/librtld.os: In function `dl_main':
    /home/vsriram/Desktop/libidn/elf/rtld.c:2316: undefined reference to `__stack_chk_fail_local'
    /home/vsriram/Desktop/glibc-build/elf/librtld.os: In function `print_search_path':
    /home/vsriram/Desktop/libidn/elf/dl-load.c:1567: undefined reference to `__stack_chk_fail_local'
    /home/vsriram/Desktop/glibc-build/elf/librtld.os:/home/vsriram/Desktop/libidn/elf/dl-load.c:1787: more undefined references to `__stack_chk_fail_local' follow
    collect2: ld returned 1 exit status
    make[2]: *** [/home/vsriram/Desktop/glibc-build/elf/ld.so] Error 1
    make[2]: Leaving directory `/home/vsriram/Desktop/libidn/elf'
    make[1]: *** [elf/subdir_lib] Error 2
    make[1]: Leaving directory `/home/vsriram/Desktop/libidn'
    make: *** [all] Error 2

    Now I googled "__stack_chk_fail_local" and found that it had to with the stack protection that Ubuntu provides and it can be disabled by setting the CFLAGS with -fno-stack-protector. Now I did this using export CFLAGS=" -fno-stack-protector -fno-stack-protector-all" and that still gives me the above error.

    Couple of notable things:

    a. I set the CFLAGS to export " -fno-stack-protector -fno-stack-protector-all" before doing the ./configure and I get the following error:

    checking whether ln -s works... yes
    checking for gcc... gcc
    checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
    See `config.log' for more details.

    If I unset CFLAGS configure works fine again.

    b. I tried compiling glibc 2.6.1 and get the exact same error.

    What is going on? How can I fix this?

    Thanks!
    ramudu

    Help a man when he is in trouble and he will remember you when he is in trouble again.

  2. #2
    Join Date
    Nov 2005
    Beans
    2,322
    Distro
    Ubuntu Intrepid Ibex (testing)

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    why exactly you want to compile newer glibc?
    Building on Ubuntu using [pbuilder]
    Other resources [Upgrading from CVS, Gaim2, Anjuta, Rhythmbox]

  3. #3
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    28
    Distro
    Ubuntu UNR

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    I am working on this checkpointing software and it fails only in Ubuntu (6.10+). I believe it is a problem with whatever changes Ubuntu people might have made to glibc and want to compile a vanilla glibc and check if the checkpointing software works using the same.
    ramudu

    Help a man when he is in trouble and he will remember you when he is in trouble again.

  4. #4
    Join Date
    Jul 2007
    Beans
    11

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    I am getting the same error. Any ideas? Thanks.

  5. #5
    Join Date
    Jan 2007
    Location
    Melbourne, Australia
    Beans
    5,096

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    Quote Originally Posted by elmasto View Post
    I am getting the same error. Any ideas? Thanks.
    Did you find a way around this error? I have run into the same problem.
    Ubuntu Newbie Help: irc: #beginners-help on network irc.freenode.net
    Help others, mark your threads solved.

  6. #6
    Join Date
    Jun 2008
    Beans
    1

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    what gcc version are you using ?

  7. #7
    Join Date
    Jan 2007
    Location
    Melbourne, Australia
    Beans
    5,096

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    I was using glibc 2.5 but I have got it compiled successfully now. Thanks
    Ubuntu Newbie Help: irc: #beginners-help on network irc.freenode.net
    Help others, mark your threads solved.

  8. #8
    Join Date
    Jun 2008
    Beans
    2

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    Hello venkat.....

    could you please tell me how u resolved ur problem.....
    ..
    Thanks in advance....

  9. #9
    Join Date
    Nov 2007
    Location
    Boston, MA
    Beans
    28
    Distro
    Ubuntu UNR

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    We did get a solution to this problem. The issue was with the Stack Smashing protection that Ubuntu's glibc has. We fixed the issue by adding -fno-stack-protection in the Makefile. A more detailed solution is available here and here.
    ramudu

    Help a man when he is in trouble and he will remember you when he is in trouble again.

  10. #10
    Join Date
    Jul 2008
    Beans
    3

    Re: Compiling glibc 2.7 on Ubuntu 7.10

    Hi Sriram, thanks for the input. I've managed to extract the build params they used for building glibc-2.7 for the Hardy release, see http://ubuntuforums.org/showthread.php?t=867674.
    --

    Regards,
    Lars.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •