I cross compiled libuv successfully and I'm trying to cross compile libwebsockets but I get the following error in make for arm with a buildroot toolchain.
Please advise.
libwebsockets
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=~/buildroot/output/host/share/buildroot/toolchainfile.cmake \
-DLWS_LIBUV_INCLUDE_DIRS=/tmp/cross/include \
-DLWS_ZLIB_LIBRARIES=/tmp/cross/lib/libuv.so
make
[ 31%] Building C object CMakeFiles/websockets_shared.dir/lib/roles/http/server/server.c.o
[ 32%] Building C object CMakeFiles/websockets_shared.dir/lib/roles/http/server/lws-spa.c.o
[ 33%] Building C object CMakeFiles/websockets_shared.dir/lib/event-libs/poll/poll.c.o
[ 33%] Building C object CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o
~/libwebsockets/lib/event-libs/libuv/libuv.c: In function ‘elops_destroy_context1_uv’:
~/libwebsockets/lib/event-libs/libuv/libuv.c:526:7: error: ‘m’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (m)
^
cc1: all warnings being treated as errors
CMakeFiles/websockets_shared.dir/build.make:1166: recipe for target 'CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o' failed
make[2]: *** [CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o] Error 1
CMakeFiles/Makefile2:363: recipe for target 'CMakeFiles/websockets_shared.dir/all' failed
make[1]: *** [CMakeFiles/websockets_shared.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Why are you building libwebsockets manually, instead of using the libwebsockets package that we have in Buildroot ?
Related
I'm trying to install caffe on ubuntu but I'm getting errors.
root#c8f75a5e7268:/work/caffe# make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/solvers/sgd_solver.cpp
In file included from ./include/caffe/common.hpp:19:0,
from ./include/caffe/blob.hpp:8,
from ./include/caffe/net.hpp:10,
from ./include/caffe/solver.hpp:7,
from ./include/caffe/sgd_solvers.hpp:7,
from src/caffe/solvers/sgd_solver.cpp:4:
./include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No
such file or directory
compilation terminated.
Makefile:591: recipe for target '.build_release/src/caffe/solvers/sgd_solver.o' failed
make: *** [.build_release/src/caffe/solvers/sgd_solver.o] Error 1
While compiling the dpdk 17.04 version, i'm getting following error at the end.
== Build drivers/event/skeleton
== Build drivers/event/sw
== Build drivers/event/octeontx
== Build app
== Build app/test-pmd
LD testpmd
/usr/bin/ld: cannot find -lnuma
collect2: error: ld returned 1 exit status
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.app.mk:280: recipe for target 'testpmd' failed
make[5]: *** [testpmd] Error 1
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.subdir.mk:63: recipe for target 'test-pmd' failed
make[4]: *** [test-pmd] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkbuild.mk:76: recipe for target 'app' failed
make[3]: *** [app] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkroot.mk:128: recipe for target 'all' failed
make[2]: *** [all] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkroot.mk:107: recipe for target 'install' failed
make: *** [install] Error 2
Please suggest the solution.
DPDK requires libnuma-devel as described in System Requirements:
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html
Libnuma packages are optional build dependency. You can disable the same by editing the RTE_TARGET config file. So you can either install libnuma-dev package or disable on target. Please do the need ful
everytime I want to build the rpi-basic-image I get the following error:
DEBUG: Executing shell function do_compile
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source as source for kernel
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
In file included from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler.h:54:0,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/stddef.h:1,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/stddef.h:4,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/posix_types.h:4,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/uapi/linux/types.h:13,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/types.h:5,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/mod_devicetable.h:11,
from /home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/mod/devicetable-offsets.c:2:
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory
#include gcc_header(__GNUC__)
^
compilation terminated.
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[4]: *** [scripts/mod/devicetable-offsets.s] Error 1
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[3]: *** [scripts/mod] Error 2
/home/dennis/poky/build-toaster-3/tmp/work-shared/raspberrypi2/kernel-source/Makefile:555: recipe for target 'scripts' failed
make[2]: *** [scripts] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/dennis/poky/build-toaster-3/tmp/work/raspberrypi2-poky-linux-gnueabi/linux-raspberrypi/1_4.1.21+gitAUTOINC+ff45bc0e89-r0/temp/log.do_compile.11315)
Does anybody know how to solve it and what's the reason for it?
Thanks
This has been noticed on the yocto#yoctoproject.org mailing list.
Seems to be resolved with a patch, but I did not test it- I'm only forwarding the conversation and hoping this will help.
Last mail from the thread:
http://article.gmane.org/gmane.linux.embedded.yocto.general/30168/match=gcc+6.1+raspi
Patch used: http://article.gmane.org/gmane.linux.embedded.yocto.general/30093/
I'm trying to build a program which requieres libpq-fe.h include file.
This file is in E:\MinGW\msys\1.0\local\pgsql\include
In my CMakeLists.txt I have:
cmake_minimum_required(VERSION 3.0)
# declare project
PROJECT(localscp)
set(pg_SOURCE_DIR /usr/local/pgsql)
INCLUDE_DIRECTORIES(
"E:/MinGW/msys/1.0/local/psql/include"
)
# declare executables
ADD_EXECUTABLE(localscp localscp.cc)
TARGET_LINK_LIBRARIES(localscp
dl pthread z pq)
When I do cmake . I get:
-- Configuring done
-- Generating done
-- Build files have been written to: E:/informemedico/localscp
When I do mingw32-make I get:
[ 50%] Building CXX object CMakeFiles/localscp.dir/localscp.cc.obj
E:\informemedico\localscp\localscp.cc:24:22: fatal error: libpq-fe.h: No such file or directory compilation terminated.
CMakeFiles\localscp.dir\build.make:62: recipe for target 'CMakeFiles/localscp.dir/localscp.cc.obj' failed
mingw32-make[6]: *** [CMakeFiles/localscp.dir/localscp.cc.obj] Error 1
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/localscp.dir/all' failed
mingw32-make[5]: *** [CMakeFiles/localscp.dir/all] Error 2
makefile:82: recipe for target 'all' failed
mingw32-make[4]: *** [all] Error 2
Why the compiler can't find that include file?.
I am trying to build the Standford Dune OS with:
git clone http://dune.scs.stanford.edu/dune.git
make -C kern
but I get the following errors:
make[1]: Entering directory `/home/think/Desktop/build/dune/kern'
mkdir -p /home/think/Desktop/build/dune/kern/tmp/.tmp_versions
make -C /lib/modules/3.11.0-12-generic/build M=/home/think/Desktop/build/dune/kern MODVERDIR=/home/think/Desktop/build/dune/kern/tmp/.tmp_versions modules
make[2]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
CC [M] /home/think/Desktop/build/dune/kern/vmx.o
/home/think/Desktop/build/dune/kern/vmx.c: In function ‘vmx_setup_initial_guest_state’:
/home/think/Desktop/build/dune/kern/vmx.c:793:10: error: ‘X86_CR4_RDWRGSFS’ undeclared (first use in this function)
cr4 |= X86_CR4_RDWRGSFS;
^
/home/think/Desktop/build/dune/kern/vmx.c:793:10: note: each undeclared identifier is reported only once for each function it appears in
/home/think/Desktop/build/dune/kern/vmx.c: In function ‘vmx_enable’:
/home/think/Desktop/build/dune/kern/vmx.c:1631:2: error: implicit declaration of function ‘store_gdt’ [-Werror=implicit-function-declaration]
store_gdt(&__get_cpu_var(host_gdt));
^
cc1: some warnings being treated as errors
make[3]: *** [/home/think/Desktop/build/dune/kern/vmx.o] Error 1
make[2]: *** [_module_/home/think/Desktop/build/dune/kern] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/think/Desktop/build/dune/kern'
make: *** [kern] Error 2
How can I fix this?
downgrade your kernel! I am using 3.2.0. wanted to port dune to 3.14.0 but just didn't have time..