src/arch/ppc.c FreeBSD build break
Willem Jan Withagen <email@example.com>
Currently my FreeBSD build fails due to inclusion of a file
that does not exist on FreeBSD. Next to the fact that I'm not
really certain that everything will build and run on PPC with
Perhaps we can conditionalise PPC code just as we did with ARM code?
Or perhaps even exclude pp.cc in CMakeLists.txt without upsetting the
balance of order.
[ 43%] Building C object src/CMakeFiles/common-objs.dir/arch/ppc.c.o
cd /home/jenkins/workspace/ceph-master/build/src && ccache /usr/bin/cc
-I/home/jenkins/workspace/ceph-master/src -isystem /usr/local/include
-I/home/jenkins/workspace/ceph-master/src/xxHash -Wall -Wtype-limits
-Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security
-fno-strict-aliasing -fsigned-char -Wno-unused-function
-Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator
-Wno-missing-braces -Wno-parentheses -Wno-deprecated-register
-fdiagnostics-color=auto -O0 -g -fPIC -DHAVE_CONFIG_H -D__CEPH__
-D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -std=gnu99 -o
/home/jenkins/workspace/ceph-master/src/arch/ppc.c:16:10: fatal error:
'sys/auxv.h' file not found
1 error generated.
#1 Updated by Andrew Solomon almost 3 years ago
I think I see the problem and have a fix in mind for this. I will put it up asap.
Sorry for the trouble. Since you seemingly have available access to FreeBSD
more easily than I do perhaps you could help with testing my fix once it is up?
We should be able to just move the #include <sys/auxv.h> line (ie line 16 of src/arch/ppc.c)
under the #if linux && powerpc64 (on line 18).
The call to getauxval is already under that same #if linux && powerpc64 directive. The
reason auxv.h is included is to provide the declaration for the getauxval function, which is seemingly
present in linux but not FreeBSD.