[Bug 214405] base/gcc: -424540 for TARGET_ARCH=powerpc64 example: g++ does not find the standard c++ headers (file placement vs. lookup mismatches)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Nov 10 18:46:59 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214405
Bug ID: 214405
Summary: base/gcc: -424540 for TARGET_ARCH=powerpc64 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 at FreeBSD.org
Reporter: markmi at dsl-only.net
[This is after dealing with mpfr 3.1.4 vs. 3.1.5, adding gcc and g++ commands
to my environment, and updating pkg.plist for TARGET_ARCH=powerpc64 . Also
after various on-powerpc64 fixes to various gcc (and g++) file path vs. lookup
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-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-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
>
> 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
> /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) = 1309 (0x51d)
> 95852: lstat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include/cstdlib",0xffffffffffffba20) ERR#2 'No such file or directory'
> 95852: stat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.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/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-fixed/cstdlib",0xffffffffffffba20) ERR#2 'No such file or directory'
> 95852: stat("/usr/lib/gcc/powerpc64-portbld-freebsd12.0/5.4.0/include-fixed/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 directory'
> 95852: lstat("/usr/include/cstdlib",0xffffffffffffba20) ERR#2 'No such file 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_NOCTTY,00) ERR#2 'No such file or directory'
> 95852: read(4,"#include <cstdlib>\n\n// Avoid n"...,32768) = 1309 (0x51d)
> 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 must be
done separately as things are.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list