Project

General

Profile

Bug #19454

src/arch/ppc.c FreeBSD build break

Added by Andrew Solomon over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Category:
build
Target version:
Start date:
04/03/2017
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Reported by:
Willem Jan Withagen <>

Issue:
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
FreeBSD. :)

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.

--WjW

[ 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
-DCEPH_LIBDIR=\"/usr/local/lib\"
-DCEPH_PKGLIBDIR=\"/usr/local/lib/ceph\"
-I/home/jenkins/workspace/ceph-master/build/src/include
-I/home/jenkins/workspace/ceph-master/src -isystem /usr/local/include
-isystem /home/jenkins/workspace/ceph-master/build/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
CMakeFiles/common-objs.dir/arch/ppc.c.o -c
/home/jenkins/workspace/ceph-master/src/arch/ppc.c
/home/jenkins/workspace/ceph-master/src/arch/ppc.c:16:10: fatal error:
'sys/auxv.h' file not found
#include <sys/auxv.h>
^
1 error generated.

History

#1 Updated by Andrew Solomon over 2 years ago

Willem-

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.

Thanks,
Andy Solomon

Also available in: Atom PDF