Cannot install OpenOnload on AWS Server - amazon-web-services

I am trying to install OpenOnload on an AWS server running Ubuntu server 18.04.3. I downloaded the DEB release package from version 7.1.0.265 (the latest) from here: https://support.solarflare.com/index.php/component/cognidox/?view=categories&id=361
and then extract out of it just the folder \onload_7.1.0.265-debiansource.tgz\onload_7.1.0.265.orig.tar.gz and untar that. Then I can run
$ ./scripts/onload_install
as per the instructions in the README file. On Ubuntu 20 on my local machine this all worked and installed OpenOnload fine but on an AWS server instance this error is thrown:
onload_install: Building Onload.
Build tree made for linux as x86_64_linux-4.15.0-1057-aws
make: Entering directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws'
# Build both autocompat.h files: linux_net and linux_affinity.
make -C driver/linux_net
make[1]: Entering directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net'
make -C /usr/src/linux-headers-4.15.0-1057-aws CC="cc" M=$(pwd)
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-1057-aws'
/home/ubuntu/onload-7.1.0.265/src/driver/linux_net/Makefile:61: SFE4001/Falcon is no longer supported
CHK /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/autocompat.h
UPD /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/autocompat.h
CHK /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/config.h
UPD /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/config.h
CC [M] /home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c: In function ‘efx_init_struct’:
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5225:2: error: implicit declaration of function ‘efx_mtd_free’; did you mean ‘efx_mtd_probe’? [-Werror=implicit-function-declaration]
efx_mtd_free(efx);
^~~~~~~~~~~~
efx_mtd_probe
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5224:1: warning: label ‘fail’ defined but not used [-Wunused-label]
fail:
^~~~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c: In function ‘efx_fini_struct’:
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5247:9: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
if (efx->mtd_struct) {
^~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5248:6: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
efx->mtd_struct->efx = NULL;
^~
/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.c:5249:6: error: ‘struct efx_nic’ has no member named ‘mtd_struct’
efx->mtd_struct = NULL;
^~
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o' failed
make[3]: *** [/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net/efx.o] Error 1
Makefile:1580: recipe for target '_module_/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net' failed
make[2]: *** [_module_/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-1057-aws'
/home/ubuntu/onload-7.1.0.265/src/driver/linux_net/Makefile:300: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws/driver/linux_net'
../../src/mmake.mk:57: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/ubuntu/onload-7.1.0.265/build/x86_64_linux-4.15.0-1057-aws'
onload_build: ERROR: Failed to build driver components.
onload_install: ERROR: Build failed. Not installing.
Could this be due to incompatibility with some specific features on AWS? I checked the version compatibility for the downloaded source and it says compatible with Ubuntu server 18.04. Any ideas on how to fix it would be greatly appreciated!

Based on the comments.
The solution was to use Onload-7.0.0.176 instead of Onload-7.1.0.265.
Seems version Onload-7.1.0.265 has some compilation bugs on Ubuntu 18.04.

Related

Compiler Error k4a-calibration Aruco dictionary is protected

Project Link: https://github.com/stytim/k4a-calibration
I want to run the project but it can't compile
Error message
[ 33%] Building CXX object CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o
/home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp: In member function ‘bool ExtrinsicsCalibration::CalculateExtrinsics(const std::vector<FrameInfo>&, std::vector<AlignmentTransform>&)’:
/home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp:213:51: error: ‘cv::Ptr<cv::aruco::Dictionary> cv::aruco::Board::dictionary’ is protected within this context
cv::aruco::detectMarkers(gray, board->dictionary, markerCorners, markerIds, params);
^~~~~~~~~~
In file included from /usr/local/include/opencv4/opencv2/aruco_detector.hpp:6:0,
from /usr/local/include/opencv4/opencv2/aruco.hpp:7,
from /usr/local/include/opencv4/opencv2/aruco/charuco.hpp:9,
from /home/ccnam/Downloads/k4a-calibration/include/camera_extrinsics.hpp:11,
from /home/ccnam/Downloads/k4a-calibration/src/camera_extrinsics.cpp:1:
/usr/local/include/opencv4/opencv2/aruco/board.hpp:89:29: note: declared protected here
CV_PROP Ptr<Dictionary> dictionary;
^~~~~~~~~~
CMakeFiles/calib_k4a.dir/build.make:75: recipe for target 'CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o' failed
make[2]: *** [CMakeFiles/calib_k4a.dir/src/camera_extrinsics.cpp.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/calib_k4a.dir/all' failed
make[1]: *** [CMakeFiles/calib_k4a.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
Step
git clone https://github.com/stytim/k4a-calibration.git
cd k4a-calibration
mkdir build && cd build
cmake ..
make
Environment
Ubuntu 18.04
Change it to board->getDictionary(). When you use project dependencies with newer versions then you need to deal with the involved changes.

install opencv on ubuntu 18.04

I've been trying to install opencv, using this referance. But when I try to run make command, I get error as follows:
/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error:
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o'
failed
make[2]: ***
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error
1
CMakeFiles/Makefile2:6307: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I tried so many times to install opencv, when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv.
I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).
I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.

Build using 0.5 libyaml-cpp-dev fails with boost errors

I installed libyaml-cpp-dev via sudo apt install libyaml-cpp-dev and got yaml-cpp 0.5 version installed on my machine.
dpkg -s libyaml-cpp-dev | grep Version
Version: 0.5.2-4ubuntu1
Using this , I tried to build a testing code, demo.cpp as below:
#include <string>
#include "yaml-cpp/yaml.h"
int main(){
std::string config_file{"/home/freyr/exper/yamp-cpp/rvs.conf"};
YAML::Node config = YAML::LoadFile(config_file);
return 0;
}
with a cmake,
cmake_minimum_required (VERSION 2.8.11)
project (HELLO)
find_package(yaml-cpp REQUIRED)
add_executable (helloDemo demo.cpp)
include_directories(${YAML_CPP_INCLUDE_DIRS})
target_link_libraries(helloDemo ${YAML_CPP_LIBRARIES})
When I tried to build , I get below error:
make: Entering directory '/home/freyr/exper/yamp-cpp/build' make[1]: Entering directory '/home/freyr/exper/yamp-cpp/build' make[2]: Entering directory '/home/freyr/exper/yamp-cpp/build' Scanning dependencies of target helloDemo make[2]: Leaving directory '/home/freyr/exper/yamp-cpp/build' make[2]: Entering directory '/home/freyr/exper/yamp-cpp/build' [ 50%] Building CXX object CMakeFiles/helloDemo.dir/demo.cpp.o In file included from /usr/include/yaml-cpp/node/iterator.h:13:0,
from /usr/include/yaml-cpp/node/impl.h:11,
from /usr/include/yaml-cpp/yaml.h:17,
from /home/freyr/exper/yamp-cpp/demo.cpp:3: /usr/include/yaml-cpp/node/detail/iterator.h: In member function ‘void YAML::detail::iterator_base<V>::increment()’: /usr/include/yaml-cpp/node/detail/iterator.h:48:54: error: ‘next’ is not a member of ‘boost’ void increment() { this->base_reference() = boost::next(this->base()); }
^~~~ /usr/include/yaml-cpp/node/detail/iterator.h:48:54: note: suggested alternatives: In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /home/freyr/exper/yamp-cpp/demo.cpp:1: /usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: ‘std::next’
next(_ForwardIterator __x, typename
^~~~ In file included from /usr/local/include/boost/mpl/next.hpp:17:0,
from /usr/local/include/boost/mpl/bind.hpp:25,
from /usr/local/include/boost/mpl/lambda.hpp:18,
from /usr/local/include/boost/mpl/apply.hpp:25,
from /usr/local/include/boost/iterator/iterator_facade.hpp:36,
from /usr/include/yaml-cpp/node/detail/node_iterator.h:12,
from /usr/include/yaml-cpp/node/detail/iterator.h:12,
from /usr/include/yaml-cpp/node/iterator.h:13,
from /usr/include/yaml-cpp/node/impl.h:11,
from /usr/include/yaml-cpp/yaml.h:17,
from /home/freyr/exper/yamp-cpp/demo.cpp:3: /usr/local/include/boost/mpl/next_prior.hpp:29:8: note: ‘boost::mpl::next’ struct next
^~~~ CMakeFiles/helloDemo.dir/build.make:62: recipe for target 'CMakeFiles/helloDemo.dir/demo.cpp.o' failed make[2]: *** [CMakeFiles/helloDemo.dir/demo.cpp.o] Error 1 make[2]: Leaving directory '/home/freyr/exper/yamp-cpp/build' CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/helloDemo.dir/all' failed make[1]: *** [CMakeFiles/helloDemo.dir/all] Error 2 make[1]: Leaving directory '/home/freyr/exper/yamp-cpp/build' Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
I see in latest https://github.com/jbeder/yaml-cpp/blob/master/include/yaml-cpp/node/detail/iterator.h there are no references to boost ad it is all std c++ alone.
How do I install latest version of libyaml-cpp-dev which has no boost dependencies ? I dont want to build and install from latest version as git cloning from master every time will not be a very secure practice.
yaml-cpp introduced boost dependency in version 0.5 and removed it in version 0.6. You need to upgrade your Ubuntu to a newer release or install yaml-cpp from sources, or install a version of yaml-cpp older than 0.5.
See: https://yaml-cpp.docsforge.com/#how-to-build
yaml-cpp 0.6.0 has been released! This release requires C++11, and no longer depends on Boost.
See also https://www.ubuntuupdates.org/package/core/hirsute/main/base/yaml-cpp - the current version of yaml-cpp in Ubuntu 21.4 is 0.6.3-9ubuntu1

Is it possible to get list of libraries set that produce fine build?

Trying to build GCC for Raspberry Pi from source according to project in my Ubuntu 20.04 machine with gcc 9.3.0 . Getting different problems while taking different sets of libraries
Configuration below brings __uint128_t error:
GCC_VERSION="9.3.0"
BINUTILS_VERSION="2.34"
GLIBC_VERSION="2.31"
MPFR_VERSION="3.1.6"
MPC_VERSION="1.0.3"
GMP_VERSION="6.2.0"
CLOOG_VERSION="0.18.1"
In file included from ../sysdeps/unix/sysv/linux/bits/sigcontext.h:30,
from ../signal/signal.h:291,
from ../include/signal.h:2,
from ../misc/sys/param.h:28,
from ../include/sys/param.h:1,
from ../sysdeps/generic/hp-timing-common.h:39,
from ../sysdeps/generic/hp-timing.h:25,
from ../nptl/descr.h:27,
from ../sysdeps/arm/nptl/tls.h:42,
from ../sysdeps/unix/sysv/linux/arm/tls.h:23,
from ../sysdeps/unix/sysv/linux/arm/sysdep.h:30,
from <stdin>:1:
/home/a/gcc_buildings/1/xc-arm-linux-gnueabi/arm-linux-gnueabi/include/asm/sigcontext.h:77:2: error: unknown type name ‘__uint128_t’
77 | __uint128_t vregs[32];
| ^~~~~~~~~~~
Configurations below brings the same mpfr_fmma error:
GCC_VERSION="9.3.0"
BINUTILS_VERSION="2.34"
GLIBC_VERSION="2.31"
MPFR_VERSION="4.1.0"
MPC_VERSION="1.0.3"
GMP_VERSION="6.2.0"
CLOOG_VERSION="0.18.1"
GCC_VERSION=9.3.0"
MPFR_VERSION="4.1.0"
MPC_VERSION="1.2.1"
GMP_VERSION="6.2.1"
ISL_VERSION="0.18"
CLOOG_VERSION="0.18.1"
/home/a/gcc-cross-compiler/xc-arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/tmp/gcc-4.9.2/mpfr/src/mpfr.h:765:21: note: previous declaration of ‘mpfr_fmma’ was here
765 | __MPFR_DECLSPEC int mpfr_fmma (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr,
| ^~~~~~~~~
make[3]: *** [Makefile:532: mul.lo] Error 1
make[3]: Leaving directory '/home/a/gcc-cross-compiler/xc-arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/tmp/build-gcc/mpc/src'
make[2]: *** [Makefile:462: all-recursive] Error 1
make[2]: Leaving directory '/home/a/gcc-cross-compiler/xc-arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/tmp/build-gcc/mpc'
make[1]: *** [Makefile:373: all] Error 2
make[1]: Leaving directory '/home/a/gcc-cross-compiler/xc-arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/tmp/build-gcc/mpc'
make: *** [Makefile:5289: all-mpc] Error
In other libraries combinations I'm getting other errors.
Is it possible to get list of libraries set that produce fine build?

Error while running make command [Packet Generator in DPDK]

I am trying to install packet generator in my system. I have downloaded packet generator from DPDK.org. I follow the instructions mentioned in the following link.
When I run the make command I get the below error:
/root/DPDK/pktgen-dpdk/app/pktgen-latency.c:17:25: fatal error: rte_bus_pci.h: No such file or directory
compilation terminated.
/root/DPDK/dpdk-stable-17.08.1//mk/internal/rte.compile-pre.mk:138:
recipe for target 'pktgen-latency.o' failed
make[2]: *** [pktgen-latency.o] Error 1
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extapp.mk:47: recipe for
target 'pktgen' failed
make[1]: *** [pktgen] Error 2
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extsubdir.mk:48: recipe for
target 'app' failed
make: *** [app] Error 2
Upgrading the version of DPDK solves this issue. I used a version of 17.08 and later on upgraded it to 17.11
Looks like the RTE_TARGET is set incorrectly or DPDK is not compiled. First we set:
export RTE_SDK=<DPDKInstallDir>
export RTE_TARGET=x86_64-native-linuxapp-gcc
Then we compile DPDK and then Pktgen.