Results 1 to 9 of 9

Thread: Problems compiling Glibc

  1. #1
    Join Date
    Dec 2008
    Beans
    2

    Problems compiling Glibc

    Hey everyone,

    I've been using Linux for a few years now, having gone through all the major distributions (openSuSE, Red Hat, Fedora, and now mostly Ubuntu), and I'm trying to expand a little more by building some packages from source.

    I've run into a funny error, though, when trying to compile glibc 2.8.x or 2.9.x(Latest). The config runs flawlessly, but when I run the make command I get this error well into the compile:

    ../misc/syslog.c: In function ‘__vsyslog_chk’:
    ../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
    ../misc/syslog.c:155: sorry, unimplemented: called from here
    make[2]: *** [/mnt/adm/sources/glibc-build/misc/syslog.o] Error 1
    make[2]: Leaving directory `/mnt/adm/sources/glibc-src/misc'
    make[1]: *** [misc/subdir_lib] Error 2
    make[1]: Leaving directory `/mnt/adm/sources/glibc-src'
    make: *** [all] Error 2

    So `_vsyslog_chk' isn't implemented? Is it a deprecated function?

    I'm running Ibex 8.10 with all the updates, an Intel Dual-Core 6300 @ 1.86 GHz, 1.8 GB ram.

    Anything I can do to get around this?

  2. #2
    Join Date
    Sep 2006
    Beans
    3,170
    Distro
    Ubuntu Karmic Koala (testing)

    Re: Problems compiling Glibc

    what was your configure prefix?

  3. #3
    Join Date
    Dec 2008
    Beans
    2

    Re: Problems compiling Glibc

    I'm following the Linux From Source manual, so it's at /mnt/adm/tools. Would that change anything?

  4. #4
    Join Date
    May 2008
    Beans
    12
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Problems compiling Glibc

    Hi dianming, have you resolved your problem? I'm having the same trouble.

  5. #5
    Join Date
    Nov 2006
    Beans
    Hidden!

    Re: Problems compiling Glibc

    try adding -D_FORTIFY_SOURCE to your CFLAGS I always use some optimisation too
    sry for that -U_FORTIFY_SOURCE of course not -D_FORTIFY_SOURCE

    Code:
    export CFLAGS="-O2 -D_FORTIFY_SOURCE" <- Wrong
    export CFLAGS="-O2 -U_FORTIFY_SOURCE" <- Right"
    that's at least what i got from the glibc mailing-list and it worked for me.

    I'm not exactly sure what fortify does. Here's what Ubuntu says about it
    First enabled in Ubuntu 8.10. Provides compile-time best-practices errors for certain libc functions, and provides run-time checks of buffer lengths and memory regions. Only activated when compiled with -O2 or higher. Most problems are related to common unsafe uses of certain libc functions.
    from: https://wiki.ubuntu.com/CompilerFlags

    They use D_FORTIFY_SOURCE=2 instead of only D_FORTIFY_SOURCE. I don't know if there is a big difference.
    Last edited by frischi; July 19th, 2009 at 12:10 AM. Reason: mistake -D_FORTIFY_SOURCE is wrong -U_FORTIFY_SOURCE is right

  6. #6
    Join Date
    Feb 2009
    Beans
    1

    Re: Problems compiling Glibc

    Hi, I got it fixed by using the following flags

    CFLAGS=-O2 -U_FORTIFY_SOURCE -march=i486 -mtune=native -fno-stack-protector

  7. #7
    Join Date
    Aug 2006
    Location
    S.F. Bay Area
    Beans
    236
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Problems compiling Glibc

    Thanks for the info on the compiler flags as they solved my build problems too!

    I ended up going with:

    $ CFLAGS="-O2 -U_FORTIFY_SOURCE -fno-stack-protector" ../glibc-2.10.1/configure --prefix=/usr
    ....
    $ make

    and everything compiled without issue.

    Thanks!

    Peace...

  8. #8
    Join Date
    Jul 2009
    Location
    Toronto, Ontario, Canada
    Beans
    74
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problems compiling Glibc

    $ uname -a
    Linux K32x2 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

    Trying to build LFS, I am getting a different error for glic 2.10.1, I've tried the provided suggestions and it doesn't work. I get the following error by make:

    mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]
    mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "", subd ...
    make[1]: Leaving directory `/mnt/custom_linux/sources/glibc-2.10.1'
    make[1]: Entering directory `/mnt/custom_linux/sources/glibc-2.10.1'
    mawk -f scripts/gen-sorted.awk \
    -v subdirs='csu assert ctype locale intl catgets math setjmp signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata wctype manual shadow gshadow po argp crypt nss localedata timezone rt conform debug dlfcn elf' \
    -v srcpfx='' \
    nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend rt/Depend debug/Depend > /mnt/custom_linux/sources/build/sysd-sorted-tmp
    mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed (bad class -- [], [^] or [)
    /[^
    mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]
    mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "", subd ...
    rm -f /mnt/custom_linux/sources/build/stamp.o; > /mnt/custom_linux/sources/build/stamp.o
    rm -f /mnt/custom_linux/sources/build/stamp.os; > /mnt/custom_linux/sources/build/stamp.os
    rm -f /mnt/custom_linux/sources/build/stamp.oS; > /mnt/custom_linux/sources/build/stamp.oS
    cd /mnt/custom_linux/sources/build && /mnt/custom_linux/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.0/../../../../i686-lfs-linux-gnu/bin/ar cruv libc.a `cat stamp.o`
    : /mnt/custom_linux/sources/build/libc.a
    cd /mnt/custom_linux/sources/build && /mnt/custom_linux/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.0/../../../../i686-lfs-linux-gnu/bin/ar cruv libc_pic.a `cat stamp.os`
    : /mnt/custom_linux/sources/build/libc_pic.a
    cd /mnt/custom_linux/sources/build && /mnt/custom_linux/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.0/../../../../i686-lfs-linux-gnu/bin/ar cruv libc_nonshared.a `cat stamp.oS`
    : /mnt/custom_linux/sources/build/libc_nonshared.a
    make[1]: *** No rule to make target `/mnt/custom_linux/sources/build/Versions.all', needed by `/mnt/custom_linux/sources/build/abi-versions.h'. Stop.
    make[1]: Leaving directory `/mnt/custom_linux/sources/glibc-2.10.1'
    make: *** [all] Error 2

    --
    Kind Regards,
    Rajinder Yadav

  9. #9
    Join Date
    Jul 2009
    Location
    Toronto, Ontario, Canada
    Beans
    74
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Problems compiling Glibc

    It seems I was missing a few build essentials, got that corrected.
    Kind Regards,
    Rajinder Yadav | http://DevMentor.org | Do Good! ~ Share Freely

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
  •