This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84744] New: cannot use glibc 2.27 with gcc 7.3
- From: "development at faf-ltd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Mar 2018 23:13:57 +0000
- Subject: [Bug c++/84744] New: cannot use glibc 2.27 with gcc 7.3
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84744
Bug ID: 84744
Summary: cannot use glibc 2.27 with gcc 7.3
Product: gcc
Version: 7.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: development@faf-ltd.com
Target Milestone: ---
Created attachment 43581
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43581&action=edit
error messages
I have installed gcc 7.3 in the /FaF directory and glibc 2.27 in the /FaF/glibc
directory.
Compiling this code
-------------------
#include <cstdlib>
#include <cmath>
int main( int argc, char * argv [] )
{
if ( argc != 2 )
{
return 1;
}
return std::abs(std::atoi(argv[1]));
}
with g++ -c foo.cpp works fine.
Adding the glibc 2.27 include path fails horrible: g++ -c foo.cpp -I
/FaF/glibc/include
Here the full error list: https://gofile.io/?c=J2Zwlv or see the attached file.
Compiling it with the system gcc 4.8.5 works fine even the glibc 2.27 include
path is added.
Output for g++ -xc++ -E -v - -I /FaF/glibc/include/
---------------------------------------------------
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-suse-linux
Configured with: ../gcc-7.3.0/configure --prefix=/FaF --infodir=/FaF/share/info
--mandir=/FaF/share/man --libdir=/FaF/lib64 --libexecdir=/FaF/lib64
--enable-languages=c,c++ --enable-checking=release --with-gmp=/FaF/
--with-mpfr=/FaF --with-gmc=/FaF --with-gxx-include-dir=/FaF/include/c++/7.3
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/--with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--enable-linux-futex --program-suffix=-7.3 --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
--host=x86_64-suse-linux --disable-multilib
Thread model: posix
gcc version 7.3.0 (SUSE Linux)
COLLECT_GCC_OPTIONS='-E' '-v' '-I' '/FaF/glibc/include/' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
/FaF/lib64/gcc/x86_64-suse-linux/7.3.0/cc1plus -E -quiet -v -I
/FaF/glibc/include/ -D_GNU_SOURCE - -mtune=generic -march=x86-64
ignoring nonexistent directory
"/FaF/lib64/gcc/x86_64-suse-linux/7.3.0/../../../../x86_64-suse-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/FaF/glibc/include/
/FaF/include/c++/7.3
/FaF/include/c++/7.3/x86_64-suse-linux
/FaF/include/c++/7.3/backward
/FaF/lib64/gcc/x86_64-suse-linux/7.3.0/include
/usr/local/include
/FaF/include
/FaF/lib64/gcc/x86_64-suse-linux/7.3.0/include-fixed
/usr/include
End of search list.
First error lines - for some reasons g++ starts to use the g++ starts to use
the g++ 4.8.5 - which is installed on the system - include path.
In file included from /usr/include/math.h:48:0,
from /FaF/include/c++/7.3/cmath:45,
from foo.cpp:11:
/FaF/glibc/include/bits/mathdef.h:19:3: error: #error "Never use
<bits/mathdef.h> directly; include <complex.h> instead"
# error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
^~~~~
In file included from /FaF/include/c++/7.3/cstdlib:75:0,
from foo.cpp:10:
/usr/include/stdlib.h:95:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a
type; did you mean ‘__BEGIN_DECLS’?
__BEGIN_NAMESPACE_STD
^~~~~~~~~~~~~~~~~~~~~
__BEGIN_DECLS
/usr/include/stdlib.h:101:5: error: ‘div_t’ does not name a type; did you mean
‘size_t’?
} div_t;
^~~~~