Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2016 18:46:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 214405] base/gcc: -424540 for TARGET_ARCH=powerpc64 example: g++ does not find the standard c++ headers (file placement vs. lookup mismatches)
Message-ID:  <bug-214405-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214405

            Bug ID: 214405
           Summary: base/gcc: -424540 for TARGET_ARCH=3Dpowerpc64 example:
                    g++ does not find the standard c++ headers (file
                    placement vs. lookup mismatches)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: markmi@dsl-only.net

[This is after dealing with mpfr 3.1.4 vs. 3.1.5, adding gcc and g++ comman=
ds
to my environment, and updating pkg.plist for TARGET_ARCH=3Dpowerpc64 . Also
after various on-powerpc64 fixes to various gcc (and g++) file path vs. loo=
kup
mismatches via adding a few symbolic links. This is use on the powerpc64
context, not the cross build.]

This was noticed via trying to build benchmarks/bonnie++ (via portmaster):

> --- bon_csv2html.o ---
> c++ -pipe -g -fno-strict-aliasing  -DNDEBUG -Wall -W -Wshadow -Wpointer-a=
rith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpo=
inter-arith -Wwrite-strings -Wformat-security -Wswit
> ch-enum -Winit-self    -pipe -g -fno-strict-aliasing  -c bon_csv2html.cpp=
 -o bon_csv2html.o
. . .
> --- bon_csv2html.o ---
> bon_csv2html.cpp:2:19: fatal error: cstdlib: No such file or directory
> compilation terminated.
> *** [bon_csv2html.o] Error code 1
>=20
> make[2]: stopped in /usr/obj/portswork/usr/ports/benchmarks/bonnie++/work=
/bonnie++-1.97.2
> --- bonnie++.o ---
> bonnie++.cpp:31:18: fatal error: algo.h: No such file or directory
> compilation terminated.

In the file system there are:

> # find / -name "cstdlib" -print | more=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
> /usr/include/c++/v1/tr1/cstdlib
> /usr/include/c++/v1/cstdlib
> /usr/src/contrib/libc++/include/cstdlib
> /usr/src/contrib/libstdc++/include/tr1/cstdlib

Using a simpler program:

> # c++ main.cc
> main.cc:1:19: fatal error: cstdlib: No such file or directory
> compilation terminated.

"truss -f c++ main.cc" reports for cstdlib references:

> # truss -f c++ main.cc 2>&1 | grep cstdlib
> 95852: read(3,"#include <cstdlib>\n\n// Avoid n"...,1309) =3D 1309 (0x51d)
> 95852: lstat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include/cs=
tdlib",0xffffffffffffba20) ERR#2 'No such file or directory'
> 95852: stat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include/cst=
dlib.gch",0xffffffffffffcbd8) ERR#2 'No such file or directory'
> 95852: openat(AT_FDCWD,"/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/=
include/cstdlib",O_RDONLY|O_NOCTTY,00) ERR#2 'No such file or directory'
> 95852: lstat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include-fi=
xed/cstdlib",0xffffffffffffba20) ERR#2 'No such file or directory'
> 95852: stat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include-fix=
ed/cstdlib.gch",0xffffffffffffcbd8) ERR#2 'No such file or directory'
> 95852: openat(AT_FDCWD,"/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/=
include-fixed/cstdlib",O_RDONLY|O_NOCTTY,00) ERR#2 'No such file or directo=
ry'
> 95852: lstat("/usr/include/cstdlib",0xffffffffffffba20) ERR#2 'No such fi=
le or directory'
> 95852: stat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/../../../..=
/powerpc64-portbld-freebsd12.0/include/cstdlib.gch",0xffffffffffffcbd8) ERR=
#2 'No such file or directory'
> 95852: openat(AT_FDCWD,"/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/=
../../../../powerpc64-portbld-freebsd12.0/include/cstdlib",O_RDONLY|O_NOCTT=
Y,00) ERR#2 'No such file or directory'
> 95852: read(4,"#include <cstdlib>\n\n// Avoid n"...,32768) =3D 1309 (0x51=
d)
> main.cc:1:19: fatal error: cstdlib: No such file or directory

So in finding no cstdlib c++ (g++) looks for each of:

> /usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include/cstdlib
> /usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include/cstdlib.gch
> /usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include-fixed/cstdlib
> /usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include-fixed/cstdlib.gch
> /usr/include/cstdlib
> /usr/powerpc64-portbld-freebsd12.0/include/cstdlib.gch
> /usr/powerpc64-portbld-freebsd12.0/include/cstdlib

none of which match the file system. No trivially small number of symbolic
links in the file system can cover making all the involved paths for various
headers work (each "include" already exists and has files): each header mus=
t be
done separately as things are.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214405-13>