[Clfs-dev] configure: error: compiler support for visibility attribute is required

Pierre Lorenzon devel at pollock-nageoire.net
Sun Dec 9 23:09:46 PST 2012


Hi,

I am a newbie to clfs but I already
compiled 4 or 5 lfs from 5.x to 7.2.

This error occurs when trying to compile eglibc 2.15 at chapter
10 of the book. I am currently using svn version of the book in
order to construct a multilib system. Host system was a pure 32
bit system (lfs 6.6). That's why I cannot chroot and should
boot. 

Here is the complete output of the configure stage for eglibc :

>>>  -- Output 

patching file elf/dl-close.c
patching file elf/dl-deps.c
patching file elf/dl-libc.c
patching file elf/rtld.c
patching file include/link.h
mkdir: created directory '../eglibc-build'
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... gcc -m32
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m32 accepts -g... yes
checking for gcc -m32 option to accept ISO C89... none needed
checking for gcc... gcc
checking how to run the C preprocessor... gcc -m32 -E
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m32 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/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 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 sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686/multiarch nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /tools/bin/install -c
checking whether ln -s works... yes
checking whether /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/as is GNU as... yes
checking whether /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/ld is GNU ld... yes
checking for /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/as... /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/as
checking version of /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/as... 2.23, ok
checking for /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/ld... /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/ld
checking version of /tools/lib64/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../x86_64-unknown-linux-gnu/bin/ld... 2.23, ok
checking for pwd... /bin/pwd
checking for i686-pc-linux-gnu-gcc... (cached) gcc -m32
checking version of gcc -m32... 4.6.3, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.82, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.18.1, ok
checking for makeinfo... makeinfo
checking version of makeinfo... 4.13, ok
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for i686-pc-linux-gnu-readelf... no
checking for readelf... readelf
checking for autoconf... no
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: autoconf
*** 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... gawk
checking for perl... /usr/bin/perl
checking for install-info... /tools/bin/install-info
checking for bison... /tools/bin/bison
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... no
configure: error: compiler support for visibility attribute is required


>>>  -- End Output 

More detail are in the config.log :

>>>  -- config.log 

configure:6319: checking whether __attribute__((visibility())) is supported
configure:6330: gcc -m32 -Werror -S conftest.c -o conftest.s 1>&5
conftest.c:2:5: error: visibility attribute not supported in this configuration; ignored [-Werror=attributes]
conftest.c:2:5: error: visibility attribute not supported in this configuration; ignored [-Werror=attributes]
cc1: all warnings being treated as errors
configure:6333: $? = 1
configure:6344: result: no
configure:6347: error: compiler support for visibility attribute is required

>>>  -- End config.log 

After a few investigations I think that this visibility
attribute is a gcc feature that is not enabled in the gcc I am
using. It was build following instructions in chapter 6 and is
gcc 4.6.3.

Can someone at least tell me where this gcc feature comes from
so that I might try to investigate where the building process
failed. I controlled installation of kernel headers at chapter
5-6 stage as well as at chapter 10 stage and did not notice
anything wrong. More over I tried to compiled this eglibc 2.15
with another system (a pure 32 bits) but with a kernel very
near to the one used for my cross lfs and there was no
problem. So I might think that the kernel configuration is not
responsible for this problem but I might be wrong. When
googling I saw messages about the lack of visibility attribute
and it seemed that it was a system feature.

Regards

Pierre



More information about the Clfs-dev mailing list