Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have been trying to build a LFS system on 12.04 64-bit. In the configuration stage of glibc, I receive the error

configure: error: linker with -z relro support required

How can I enable the RELRO support?

/media/lfs/sources/glibc-build$ ../glibc-2.15/configure                             \
>       --prefix=/tools                                 \
>       --host=$LFS_TGT                                 \
>       --build=$(../glibc-2.15/scripts/config.guess) \
>       --disable-profile                               \
>       --enable-add-ons                                \
>       --enable-kernel=2.6.25                          \
>       --with-headers=/tools/include                   \
>       libc_cv_forced_unwind=yes                       \
>       libc_cv_ctors_header=yes                        \
>       libc_cv_c_cleanup=yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-lfs-linux-gnu
checking for x86_64-lfs-linux-gnu-gcc... x86_64-lfs-linux-gnu-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-lfs-linux-gnu-gcc accepts -g... yes
checking for x86_64-lfs-linux-gnu-gcc option to accept ISO C89... unsupported
checking for gcc... gcc
checking how to run the C preprocessor... x86_64-lfs-linux-gnu-gcc -E
checking for x86_64-lfs-linux-gnu-g++... no
checking for x86_64-lfs-linux-gnu-c++... no
checking for x86_64-lfs-linux-gnu-gpp... no
checking for x86_64-lfs-linux-gnu-aCC... no
checking for x86_64-lfs-linux-gnu-CC... no
checking for x86_64-lfs-linux-gnu-cxx... no
checking for x86_64-lfs-linux-gnu-cc++... no
checking for x86_64-lfs-linux-gnu-cl.exe... no
checking for x86_64-lfs-linux-gnu-FCC... no
checking for x86_64-lfs-linux-gnu-KCC... no
checking for x86_64-lfs-linux-gnu-RCC... no
checking for x86_64-lfs-linux-gnu-xlC_r... no
checking for x86_64-lfs-linux-gnu-xlC... no
checking for g++... g++
configure: WARNING: using cross tools not prefixed with host triplet
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
checking for assembler gnu_indirect_function symbol type support... yes
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for assembler .type directive prefix... @
checking sysdep dirs... sysdeps/x86_64/elf nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86_64/multiarch nptl/sysdeps/x86_64 sysdeps/x86_64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/as is GNU as... yes
checking whether /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/ld is GNU ld... yes
checking for /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/as... /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/as
checking version of /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/as... 2.22, ok
checking for /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/ld... /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/ld
checking version of /media/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.0/../../../../x86_64-lfs-linux-gnu/bin/ld... 2.22, ok
checking for pwd... /bin/pwd
checking for x86_64-lfs-linux-gnu-gcc... (cached) x86_64-lfs-linux-gnu-gcc
checking version of x86_64-lfs-linux-gnu-gcc... 4.7.0, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.18.1, ok
checking for makeinfo... no
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for x86_64-lfs-linux-gnu-readelf... x86_64-lfs-linux-gnu-readelf
checking for autoconf... autoconf
checking whether autoconf works... yes
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: makeinfo
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/bash
checking for gawk... no
checking for mawk... mawk
checking for perl... /usr/bin/perl
checking for install-info... /usr/bin/install-info
checking for bison... no
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking for .set assembler directive... yes
checking for assembler gnu_unique_object symbol type... yes
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking whether to use .ctors/.dtors header and trailer... (cached) yes
checking for libunwind-support in compiler... no
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -z relro option... no
configure: error: linker with -z relro support required
share|improve this question
Can you post the complete output of configure at, and edit your question to include a link to it? It may also help if you were to include a link to whatever you consider the most relevant LFS documentation to the step during which the problem occurred. (After you've edited your post to add this information, I recommend flagging this comment a obsolete.) – Eliah Kagan May 30 '12 at 6:30
up vote 4 down vote accepted

I had the same problem during my installation (on Debian), I resolved it by installing gawk, and using it instead of mawk. Maybe it'll work for you too.

share|improve this answer
İt worked for me, too. Thanks. – Servet Jun 6 '12 at 15:22
Yep, "sudo apt-get install gawk" fixed it for me too. Thanks! – Shannon_VanWagner Feb 11 '13 at 17:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.