ceph is still using the Makefile based building system for building
DPDK. and DPDK enables -Werror if RTE_DEVEL_BUILD is 'y' which is
enabled by default when the dpdk is built from a git repo.
but newer GCC is more picky than the older versions, to prevent
the possible FTBFS when we switch to newer GCC for building old
branches whose dpdk submodule might be include the changes addressing
those warnings. let's just disable this option.
the only effect of this option is to add -Werror to CFLAGS. but
the building warnings from DPDK is not our focus when developing
Ceph in the most cases. so it should be fine.
see also
eac901ce29/doc/build-sdk-quick.txt (L18)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
when download/building grafonnet-lib, dpdk, spdk, liburing and fio,
they dump lots of output during configuration and building phrases,
all of which is irrelevant to us. so let's just silence it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
otherwise we have:
src/spdk/dpdk/lib/librte_eal/linux/eal.c:591:11: error: variable 'total_mem' set but not used [-Werror,-Wunused-but-set-variable]
uint64_t total_mem = 0;
^
1 error generated.
when building dpdk with Clang. dpdk passes -Werror to compiler, so
we have to disable this option.
Signed-off-by: Kefu Chai <kchai@redhat.com>
on the newest DPDK/SPDK some libraries were removed, while some of them
were added. so update the list accordingly to address linking errors.
Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
it's a shorthand for finding "make" or "gmake" (for FreeBSD), and set
the path to the executable and the command to use in the generated
"Makefile" or whatever build script generated by cmake.
Signed-off-by: Kefu Chai <kchai@redhat.com>
librte_eal.a refers to libpthread.so and libdl.so, and libceph-common.so
refers to librte_eal.a. Many test application link libceph-common.so
without linking pthread, it will cause link error.
Such as unittest_interval_set, target_link_libraries (unittest_interval_set
ceph-common)
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Find and link the numa library for DPDK.
Fixes: https://tracker.ceph.com/issues/42275
Signed-off-by: Hu Ye <yehu5@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
* BuildDPDK.cmake, BuildSPDK.cmake:
* give priority to build with gmake
* throw error if make not found
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
src/spdk/dpdk and src/seastar/dpdk are both at their private branches
with project-specific modifications, so select proper dpdk source
directory according to flags WITH_SPDK and Seastar_DPDK.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
* extract `do_export_dpdk()` into a separated function
* no need to check for `dpdk-ext` target before calling `build_dpdk()`,
as the name of this target should be hidden from the caller of this
function.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* update execenv to remove "app", the targets ending with "app" changed
to the ones without "app" now.
* pass CC by make variables not env variables, otherwise the default
`cc` is used
Signed-off-by: Kefu Chai <kchai@redhat.com>
* modules/BuildDPDK.cmake: always use "make"
* modules/BuildSPDK.cmake: always use "make"
DPDK only support "make". if user wants to use other generator than
"make", we will fail to build DPDK support. so we should always use
"make" here. and before using "make", we need to detect it.
* cmake/modules/BuildRocksDB.cmake: use cmake for build
* src/compressor/zstd/CMakeLists.txt: use cmake for build
just use whatever generator use specifies, and use ${CMAKE_COMMAND}
for building the specified target, no need to repeat
${CMAKE_GENERATOR} for building the target.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Make sure the mbuf and ethdev libraries are created as they export
required symbols.
Fixes: http://tracker.ceph.com/issues/36341
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
we build dpdk as static library, linking against them without specifying
--whole-archive will get the constructor symbols droppped by the linker
as they are not referenced directly by the excecutable. so we need to do
so to make sure we call all the constructors.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* add dpdk::dpdk if dpdk is built or found, as seastar checks for
it before adding its component libraries. if user installs libdpdk
and builds WITH_SEASTAR=ON or WITH_DPDK=ON, cmake fails to configure
the building system without this fix.
* add dpdk::cflags target for populating the -march=<arch> compile
option.
* also use pkg-config for finding dpdk.
* link common_async_dpdk against dpdk::dpdk instead
please note, the reason why we can remove the "-march=native" compile
option from Finddpdk.cmake, is that the distro shipped header files
are "generic" in the sense of "-march=<ARCH>", they do not enable
the arch specific intrinsic by default, hence the source files
including them do not need specific compiler options.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* after upgrading to gcc-8, seems dpdk requires more settings to compile.
in which, CONFIG_RTE_MAX_VFIO_GROUPS=64 is copied from config/common_base.
* librte_bus_pci.a depends on librte_pci.a, so reorder the libraries
in DPDK_LIBRARIES.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake/modules/BuildSPDK.cmake: add lvol
* cmake/modules/BuildDPDK.cmake: add pci and bus_pci
* ceph.spec.in, cmake/modules/BuildSPDK.cmake, debian/control:
re-introduce libuuid dependency, as 17.07 added lvol. and the latter
depends on uuid.
* cmake/modules/BuildSPDK.cmake: avoid introducing local variable of
`iface_libs`.
* cmake/modules/patch-dpdk-conf.sh: disable
CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES, this option introduces the
balanced allocation of memory. but it also requires libnuma-dev.
let's disable it for now.
Signed-off-by: Kefu Chai <kchai@redhat.com>
DPDK requires GNU Make. see
spdk/dpdk/doc/guides/freebsd_gsg/build_dpdk.rst. so, we should use the
configured make program to do the job.
Signed-off-by: Kefu Chai <kchai@redhat.com>