Jansson build errors - linux

I am pretty new to Linux and I am having problems integrating an external software into my program. When I am following the instructions on integrating a couple of lines that includes Jansson (Add G4Sipm to your CMakeLists.txt in this document enter link description here) I get errors which I suspect is the problem of integration itself since it does separately build on its own. The errors I get are after command build -j2. Here is a part of the terminal output:
Scanning dependencies of target jansson
Scanning dependencies of target gtest
Scanning dependencies of target G4GeneralParticleSource
[ 1%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/dump.c.o
[ 2%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/error.c.o
[ 2%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/hashtable.c.o
[ 3%] Building CXX object G4BasicObjects/G4PropertyFileReadInTools/CMakeFiles/G4PropertyFileReadInTools.dir/src/PropertyToolsManager.cc.o
[ 4%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/hashtable_seed.c.o
[ 4%] Building CXX object G4BasicObjects/G4PropertyFileReadInTools/CMakeFiles/G4PropertyFileReadInTools.dir/src/GoddessProperties.cc.o
[ 4%] Building CXX object G4BasicObjects/G4PropertyFileReadInTools/CMakeFiles/G4PropertyFileReadInTools.dir/src/VectorUtil.cc.o
[ 5%] Building CXX object externals/g4sipm/externals/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 6%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/load.c.o
[ 6%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/memory.c.o
[ 7%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/pack_unpack.c.o
[ 7%] Building C object externals/g4sipm/externals/jansson/CMakeFiles/jansson.dir/src/strbuffer.c.o
In file included from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/hashtable.h:11,
from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson_private.h:11,
from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/dump.c:12:
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:101:22: error: unknown type name ‘json_int_t’; did you mean ‘json_t’?
101 | json_t *json_integer(json_int_t value);
| ^~~~~~~~~~
| json_t
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:280:1: error: unknown type name ‘json_int_t’; did you mean ‘json_auto_t’?
280 | json_int_t json_integer_value(const json_t *integer);
| ^~~~~~~~~~
| json_auto_t
In file included from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/hashtable.h:11,
from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson_private.h:11,
from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/error.c:1:
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:101:22: error: unknown type name ‘json_int_t’; did you mean ‘json_t’?
101 | json_t *json_integer(json_int_t value);
| ^~~~~~~~~~
| json_t
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:288:39: error: unknown type name ‘json_int_t’; did you mean ‘json_auto_t’?
288 | int json_integer_set(json_t *integer, json_int_t value);
| ^~~~~~~~~~
| json_auto_t
In file included from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/dump.c:12:
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson_private.h:60:5: error: unknown type name ‘json_int_t’
60 | json_int_t value;
| ^~~~~~~~~~
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:280:1: error: unknown type name ‘json_int_t’; did you mean ‘json_auto_t’?
280 | json_int_t json_integer_value(const json_t *integer);
| ^~~~~~~~~~
| json_auto_t
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:288:39: error: unknown type name ‘json_int_t’; did you mean ‘json_auto_t’?
288 | int json_integer_set(json_t *integer, json_int_t value);
| ^~~~~~~~~~
| json_auto_t
In file included from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/error.c:1:
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson_private.h:60:5: error: unknown type name ‘json_int_t’
60 | json_int_t value;
| ^~~~~~~~~~
In file included from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/hashtable.h:11,
from /home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/hashtable.c:19:
/home/abhinab1/goddess/source/externals/g4sipm/externals/jansson/src/jansson.h:101:22: error: unknown type name ‘json_int_t’; did you mean ‘json_t’?
101 | json_t *json_integer(json_int_t value);
| ^~~~~~~~~~
| json_t
I tried adding #include <jansson_config.h> instead of #include "jansson_config.h" however errors still persisted. I tried contacting the project lead however it seems they have all moved on from the project. Any help and suggestions would be greatly appreciated, thank you!
Edit 1: for clarification, I am using the latest version of Jansson

Related

easylogging complied failed with ELPP_THREAD_SAFE

I have been used easylogging with OMP, but I found it should add ELPP_THREAD_SAFE to keep thread safe, it success in win but when failed in ubuntu20.04. When I tried to add definition ELPP_THREAD_SAFE in cmakelist, it complied failed.
PS:-lpthread was also added.
Fail info:
/usr/include/c++/9/mutex:541:5: error: variable or field ??lock?? declared void
541 | lock(_L1& __l1, _L2& __l2, _L3&... __l3)
| ^~~~
/usr/include/c++/9/mutex:543:7: error: expected primary-expression before ??while??
543 | while (true)
...

How can I change the CONFIG_ARCH_OPTIONAL_KERNEL_RWX value? by changing arch/Kconfig file directly?

I had asked a quesion at kernelnewbies email list and later I thought I found the answer (I thought I can put it in my defconfig). But then later found it was my mistake. So I still have the question and I ask it here to get answer.
This is what I see when I search “KERNEL_RWX” during “make menuconfig” for arm64 kernel(5-10.0-rc5).
The Kconfig file says CONFIG_STRICT_KERNEL_RWX is for setting text and rodata read-only.
Symbol: ARCH_OPTIONAL_KERNEL_RWX [=n]
Type : bool
Defined at arch/Kconfig:928
Symbol: ARCH_OPTIONAL_KERNEL_RWX_DEFAULT [=n]
Type : bool
Defined at arch/Kconfig:931
Symbol: STRICT_KERNEL_RWX [=y]
Type : bool
Defined at arch/Kconfig:937
Prompt: Make kernel text and rodata read-only
Depends on: ARCH_HAS_STRICT_KERNEL_RWX [=y]
Visible if: ARCH_HAS_STRICT_KERNEL_RWX [=y] && ARCH_OPTIONAL_KERNEL_RWX [=n]
Location:
(1) -> General architecture-dependent options
I wanted to try setting STRICT_KERNEL_RWX to =n. The 'Visible if' descriptionn says this option is visible when ARCH_OPTIONAL_KERNEL_RWX is =y which is now =n. (The STRICT_KERNEL_RWX menu didn't appear as a configurable menu in the menuconfig at this time). This is the lines in arch/Kconfig.
config ARCH_OPTIONAL_KERNEL_RWX
def_bool n
So I modified to ARCH_OPTIONAL_KERNEL_RWX=y in arch/Kconfig line 928. (BTW, This is question : is it correct to modify this Kconfig file directly? I’m not sure at the moment)
Then I could see the STRICT_KERNEL_RWX menu in the menuconfig and I set it to =n as I wanted.
But when I build the kernel, I see this errors.
ckim#ckim-ubuntu:~/ProjX/LinuxDevDrv/kernel-release-RD-INFRA-2020.11.30$ makeit
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm64/mm/mmu.o
arch/arm64/mm/mmu.c: In function 'parse_rodata':
arch/arm64/mm/mmu.c:595:28: error: 'rodata_enabled' undeclared (first use in this function)
595 | int ret = strtobool(arg, &rodata_enabled);
| ^~~~~~~~~~~~~~
arch/arm64/mm/mmu.c:595:28: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/mm/mmu.c: In function 'map_entry_trampoline':
arch/arm64/mm/mmu.c:614:18: error: 'rodata_enabled' undeclared (first use in this function)
614 | pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
| ^~~~~~~~~~~~~~
arch/arm64/mm/mmu.c: In function 'map_kernel':
arch/arm64/mm/mmu.c:669:23: error: 'rodata_enabled' undeclared (first use in this function)
669 | pgprot_t text_prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC;
| ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:283: arch/arm64/mm/mmu.o] Error 1
make[1]: *** [scripts/Makefile.build:500: arch/arm64/mm] Error 2
make: *** [Makefile:1799: arch/arm64] Error 2
variable “rodata_enabled” is defined in init/main.c as below.
#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_STRICT_MODULE_RWX)
bool rodata_enabled __ro_after_init = true;
static int __init set_debug_rodata(char *str)
{
return strtobool(str, &rodata_enabled);
}
__setup("rodata=", set_debug_rodata);
#endif
But now that CONFIG_STRICT_KERNEL_RWX=n, the above lines are not compiled here (CONFIG_STRICT_MODULE_RWX=n too). However, arch/arm64/mm/mmu.c code is still using rodata_enabled. Is this a bug of the code? Or am I missing something?
I can modify init/main.c and include/linux/init.h so that this rodata_enabled and related functions be defined regardless of these CONFIG values and make the errors go away, but I’m curious if this a kind of kernel bug raising compiler error.
So again my question is how should I change ARCH_OPTIONAL_KERNEL_RWX value? I tried setting it in my defconfig file but when I do make xxx_defonfig, the .config file shows still ARCH_OPTIONAL_KERNEL_RWX=n. Should I edit the arch/Kconfig file really?

How to implement a TBB input_node?

Apparently in tbb::flow the source_node has been deprecated, and starting in the 2021.1 version we are only supposed to use input_node. Simply replacing the class does not seem to work, though. I have a working code using source_node in version 2020.3. If I try using input_node I get a cryptic message.
It seems input_node expects Body to implement a function that takes a flow_control object. Is this the case? Otherwise what is wrong here?
I cannot seem to be able to run any example codes with input_body.
====================[ Build | capybara | Debug-System ]==========================
/home/nicolau/bin/clion-2020.1.1/bin/cmake/linux/bin/cmake --build /home/nicolau/src/capybara/cmake-build-debug-system --target capybara -- -j 9
Scanning dependencies of target capybara
[ 50%] Building CXX object CMakeFiles/capybara.dir/main.cpp.o
In file included from /home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/flow_graph.h:345:0,
from /home/nicolau/src/capybara/main.cpp:9:
/home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/detail/_flow_graph_body_impl.h: In instantiation of ‘Output tbb::detail::d1::input_body_leaf<Output, Body>::operator()(tbb::detail::d1::flow_control&) [with Output = std::tuple<cv::Mat, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > >; Body = main(int, char**)::<lambda(imgtv&)>]’:
/home/nicolau/src/capybara/main.cpp:424:1: required from here
/home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/detail/_flow_graph_body_impl.h:88:66: error: no match for call to ‘(main(int, char**)::<lambda(imgtv&)>) (tbb::detail::d1::flow_control&)’
Output operator()(flow_control& fc) override { return body(fc); }
^
/home/nicolau/src/capybara/main.cpp:350:58: note: candidate: main(int, char**)::<lambda(imgtv&)>
tbb::flow::input_node<imgtv> src(g, [&](imgtv &v) -> bool {
^~~~
/home/nicolau/src/capybara/main.cpp:350:58: note: no known conversion for argument 1 from ‘tbb::detail::d1::flow_control’ to ‘imgtv& {aka std::tuple<cv::Mat, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > >&}’
CMakeFiles/capybara.dir/build.make:82: recipe for target 'CMakeFiles/capybara.dir/main.cpp.o' failed
make[3]: *** [CMakeFiles/capybara.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/capybara.dir/all' failed
make[2]: *** [CMakeFiles/capybara.dir/all] Error 2
CMakeFiles/Makefile2:102: recipe for target 'CMakeFiles/capybara.dir/rule' failed
make[1]: *** [CMakeFiles/capybara.dir/rule] Error 2
Makefile:138: recipe for target 'capybara' failed
make: *** [capybara] Error 2
Apparently the interface has changed compared to source_node, and the function is now supposed to take a flow_control reference and return the new input object as output.
https://github.com/oneapi-src/oneTBB/issues/270#issuecomment-683645172

libgpuarray Test #10 and #11 fails

Problem
I always have used theano normally. WIth CUDA and CUDNN and CNMEM. I have an XTITAN.
Actually I ran my code on the university server.
Im trying to install libgpuarray but the tests #10 and #11 fails.
What should i do ?
Extra-Information
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
nvidia-smi
Fri Mar 17 18:35:45 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.48 Driver Version: 367.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX TIT... Off | 0000:02:00.0 On | N/A |
| 22% 36C P8 15W / 250W | 69MiB / 12204MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX TIT... Off | 0000:82:00.0 Off | N/A |
| 22% 43C P8 16W / 250W | 1MiB / 12206MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce GTX TIT... Off | 0000:83:00.0 Off | N/A |
| 22% 30C P8 14W / 250W | 1MiB / 12206MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1437 G /usr/bin/Xorg 40MiB |
| 0 3011 G gnome-shell 27MiB |
+-----------------------------------------------------------------------------+
How Im installing libgpuarray
rm -rf build Build
mkdir Build
cd Build
cmake .. -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_BUILD_TYPE=Release
make
make install
...
(myVE) andromeda#REDACTED:~/private/libgpuarray/Build$ cmake .. -DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- checking for one of the modules 'check'
-- Looking for ck_assert_ptr_ne
-- Looking for ck_assert_ptr_ne - found
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andromeda/private/libgpuarray/Build
(myVE) andromeda#REDACTED:~/private/libgpuarray/Build$ make
Scanning dependencies of target gpuarray
[ 1%] Building C object src/CMakeFiles/gpuarray.dir/cache/lru.c.o
[ 2%] Building C object src/CMakeFiles/gpuarray.dir/cache/twoq.c.o
[ 3%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_types.c.o
[ 4%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_error.c.o
[ 5%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_util.c.o
[ 6%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_buffer.c.o
[ 7%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_buffer_blas.c.o
[ 8%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_buffer_collectives.c.o
[ 9%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_array.c.o
[ 10%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_array_blas.c.o
[ 11%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_array_collectives.c.o
[ 12%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_kernel.c.o
[ 13%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_extension.c.o
[ 14%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_elemwise.c.o
[ 15%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_reduction.c.o
[ 16%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_buffer_cuda.c.o
[ 17%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_blas_cuda_cublas.c.o
[ 18%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_collectives_cuda_nccl.c.o
[ 19%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_buffer_opencl.c.o
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c: In function ‘cl_free_ctx.part.5’:
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:223:15: warning: ‘blas_ops’ may be used uninitialized in this function [-Wmaybe-uninitialized]
blas_ops->teardown((gpucontext *)ctx);
^
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c: In function ‘cl_deinit’:
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:223:15: warning: ‘blas_ops’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:215:22: note: ‘blas_ops’ was declared here
gpuarray_blas_ops *blas_ops;
^
[ 20%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_blas_opencl_clblas.c.o
[ 21%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_blas_opencl_clblast.c.o
[ 22%] Building C object src/CMakeFiles/gpuarray.dir/gpuarray_strl.c.o
[ 23%] Building C object src/CMakeFiles/gpuarray.dir/util/strb.c.o
[ 24%] Building C object src/CMakeFiles/gpuarray.dir/util/xxhash.c.o
[ 25%] Building C object src/CMakeFiles/gpuarray.dir/util/integerfactoring.c.o
[ 26%] Building C object src/CMakeFiles/gpuarray.dir/loaders/dyn_load.c.o
[ 27%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libcuda.c.o
/home/andromeda/private/libgpuarray/src/loaders/libcuda.c: In function ‘load_libcuda’:
/home/andromeda/private/libgpuarray/src/loaders/libcuda.c:46:9: warning: unused variable ‘v’ [-Wunused-variable]
float v;
^
[ 28%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libnvrtc.c.o
[ 29%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libcublas.c.o
[ 30%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libnccl.c.o
[ 31%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libopencl.c.o
[ 32%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libclblas.c.o
[ 33%] Building C object src/CMakeFiles/gpuarray.dir/loaders/libclblast.c.o
Linking C shared library ../../lib/libgpuarray.so
[ 34%] Built target gpuarray
Scanning dependencies of target gpuarray-static
[ 35%] Building C object src/CMakeFiles/gpuarray-static.dir/cache/lru.c.o
[ 36%] Building C object src/CMakeFiles/gpuarray-static.dir/cache/twoq.c.o
[ 37%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_types.c.o
[ 38%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_error.c.o
[ 39%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_util.c.o
[ 40%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_buffer.c.o
[ 41%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_buffer_blas.c.o
[ 42%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_buffer_collectives.c.o
[ 43%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_array.c.o
[ 44%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_array_blas.c.o
[ 45%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_array_collectives.c.o
[ 46%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_kernel.c.o
[ 47%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_extension.c.o
[ 48%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_elemwise.c.o
[ 49%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_reduction.c.o
[ 50%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_buffer_cuda.c.o
[ 51%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_blas_cuda_cublas.c.o
[ 52%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_collectives_cuda_nccl.c.o
[ 53%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_buffer_opencl.c.o
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c: In function ‘cl_free_ctx.part.5’:
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:223:15: warning: ‘blas_ops’ may be used uninitialized in this function [-Wmaybe-uninitialized]
blas_ops->teardown((gpucontext *)ctx);
^
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c: In function ‘cl_deinit’:
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:223:15: warning: ‘blas_ops’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/andromeda/private/libgpuarray/src/gpuarray_buffer_opencl.c:215:22: note: ‘blas_ops’ was declared here
gpuarray_blas_ops *blas_ops;
^
[ 54%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_blas_opencl_clblas.c.o
[ 55%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_blas_opencl_clblast.c.o
[ 56%] Building C object src/CMakeFiles/gpuarray-static.dir/gpuarray_strl.c.o
[ 57%] Building C object src/CMakeFiles/gpuarray-static.dir/util/strb.c.o
[ 58%] Building C object src/CMakeFiles/gpuarray-static.dir/util/xxhash.c.o
[ 59%] Building C object src/CMakeFiles/gpuarray-static.dir/util/integerfactoring.c.o
[ 60%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/dyn_load.c.o
[ 61%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libcuda.c.o
/home/andromeda/private/libgpuarray/src/loaders/libcuda.c: In function ‘load_libcuda’:
/home/andromeda/private/libgpuarray/src/loaders/libcuda.c:46:9: warning: unused variable ‘v’ [-Wunused-variable]
float v;
^
[ 62%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libnvrtc.c.o
[ 63%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libcublas.c.o
[ 64%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libnccl.c.o
[ 65%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libopencl.c.o
[ 66%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libclblas.c.o
[ 67%] Building C object src/CMakeFiles/gpuarray-static.dir/loaders/libclblast.c.o
Linking C static library ../../lib/libgpuarray-static.a
[ 68%] Built target gpuarray-static
Scanning dependencies of target check_array
[ 69%] Building C object tests/CMakeFiles/check_array.dir/main.c.o
[ 70%] Building C object tests/CMakeFiles/check_array.dir/device.c.o
[ 71%] Building C object tests/CMakeFiles/check_array.dir/check_array.c.o
Linking C executable check_array
[ 71%] Built target check_array
Scanning dependencies of target check_blas
[ 72%] Building C object tests/CMakeFiles/check_blas.dir/main.c.o
[ 73%] Building C object tests/CMakeFiles/check_blas.dir/device.c.o
[ 74%] Building C object tests/CMakeFiles/check_blas.dir/check_blas.c.o
Linking C executable check_blas
[ 74%] Built target check_blas
Scanning dependencies of target check_buffer
[ 75%] Building C object tests/CMakeFiles/check_buffer.dir/main.c.o
[ 76%] Building C object tests/CMakeFiles/check_buffer.dir/device.c.o
[ 77%] Building C object tests/CMakeFiles/check_buffer.dir/check_buffer.c.o
Linking C executable check_buffer
[ 77%] Built target check_buffer
Scanning dependencies of target check_buffer_collectives
[ 78%] Building C object tests/CMakeFiles/check_buffer_collectives.dir/main.c.o
[ 79%] Building C object tests/CMakeFiles/check_buffer_collectives.dir/device.c.o
[ 80%] Building C object tests/CMakeFiles/check_buffer_collectives.dir/communicator.c.o
[ 81%] Building C object tests/CMakeFiles/check_buffer_collectives.dir/check_buffer_collectives.c.o
Linking C executable check_buffer_collectives
[ 81%] Built target check_buffer_collectives
Scanning dependencies of target check_collectives
[ 82%] Building C object tests/CMakeFiles/check_collectives.dir/main.c.o
[ 83%] Building C object tests/CMakeFiles/check_collectives.dir/device.c.o
[ 84%] Building C object tests/CMakeFiles/check_collectives.dir/communicator.c.o
[ 85%] Building C object tests/CMakeFiles/check_collectives.dir/check_collectives.c.o
Linking C executable check_collectives
[ 85%] Built target check_collectives
Scanning dependencies of target check_elemwise
[ 86%] Building C object tests/CMakeFiles/check_elemwise.dir/main.c.o
[ 87%] Building C object tests/CMakeFiles/check_elemwise.dir/device.c.o
[ 88%] Building C object tests/CMakeFiles/check_elemwise.dir/check_elemwise.c.o
Linking C executable check_elemwise
[ 88%] Built target check_elemwise
Scanning dependencies of target check_error
[ 89%] Building C object tests/CMakeFiles/check_error.dir/main.c.o
[ 90%] Building C object tests/CMakeFiles/check_error.dir/check_error.c.o
Linking C executable check_error
[ 90%] Built target check_error
Scanning dependencies of target check_reduction
[ 91%] Building C object tests/CMakeFiles/check_reduction.dir/main.c.o
[ 92%] Building C object tests/CMakeFiles/check_reduction.dir/device.c.o
[ 93%] Building C object tests/CMakeFiles/check_reduction.dir/check_reduction.c.o
Linking C executable check_reduction
[ 93%] Built target check_reduction
Scanning dependencies of target check_types
[ 94%] Building C object tests/CMakeFiles/check_types.dir/main.c.o
[ 95%] Building C object tests/CMakeFiles/check_types.dir/check_types.c.o
Linking C executable check_types
[ 95%] Built target check_types
Scanning dependencies of target check_util
[ 96%] Building C object tests/CMakeFiles/check_util.dir/main.c.o
[ 97%] Building C object tests/CMakeFiles/check_util.dir/check_util.c.o
Linking C executable check_util
[ 97%] Built target check_util
Scanning dependencies of target check_util_integerfactoring
[ 98%] Building C object tests/CMakeFiles/check_util_integerfactoring.dir/main.c.o
[100%] Building C object tests/CMakeFiles/check_util_integerfactoring.dir/check_util_integerfactoring.c.o
Linking C executable check_util_integerfactoring
[100%] Built target check_util_integerfactoring
------------------
Then :
(myVE) andromeda#REDACTED:~/private/libgpuarray/Build$ make install
[ 34%] Built target gpuarray
[ 68%] Built target gpuarray-static
[ 71%] Built target check_array
[ 74%] Built target check_blas
[ 77%] Built target check_buffer
[ 81%] Built target check_buffer_collectives
[ 85%] Built target check_collectives
[ 88%] Built target check_elemwise
[ 90%] Built target check_error
[ 93%] Built target check_reduction
[ 95%] Built target check_types
[ 97%] Built target check_util
[100%] Built target check_util_integerfactoring
Install the project...
-- Install configuration: "Release"
-- Installing: /home/andromeda/.local/include/gpuarray/array.h
-- Installing: /home/andromeda/.local/include/gpuarray/blas.h
-- Installing: /home/andromeda/.local/include/gpuarray/collectives.h
-- Installing: /home/andromeda/.local/include/gpuarray/buffer.h
-- Installing: /home/andromeda/.local/include/gpuarray/buffer_blas.h
-- Installing: /home/andromeda/.local/include/gpuarray/buffer_collectives.h
-- Installing: /home/andromeda/.local/include/gpuarray/abi_version.h
-- Installing: /home/andromeda/.local/include/gpuarray/config.h
-- Installing: /home/andromeda/.local/include/gpuarray/elemwise.h
-- Installing: /home/andromeda/.local/include/gpuarray/error.h
-- Installing: /home/andromeda/.local/include/gpuarray/extension.h
-- Installing: /home/andromeda/.local/include/gpuarray/ext_cuda.h
-- Installing: /home/andromeda/.local/include/gpuarray/kernel.h
-- Installing: /home/andromeda/.local/include/gpuarray/types.h
-- Installing: /home/andromeda/.local/include/gpuarray/util.h
-- Installing: /home/andromeda/.local/lib/libgpuarray.so.2.0
-- Up-to-date: /home/andromeda/.local/lib/libgpuarray.so.2
-- Up-to-date: /home/andromeda/.local/lib/libgpuarray.so
-- Installing: /home/andromeda/.local/lib/libgpuarray-static.a
And the test :
(myVE) andromeda#REDACTED:~/private/libgpuarray/Build$ DEVICE=cuda2 make test
Running tests...
Test project /home/andromeda/private/libgpuarray/Build
Start 1: test_types
1/11 Test #1: test_types ....................... Passed 0.01 sec
Start 2: test_util
2/11 Test #2: test_util ........................ Passed 0.01 sec
Start 3: test_util_integerfactoring
3/11 Test #3: test_util_integerfactoring ....... Passed 0.67 sec
Start 4: test_reduction
4/11 Test #4: test_reduction ................... Passed 8.30 sec
Start 5: test_array
5/11 Test #5: test_array ....................... Passed 3.13 sec
Start 6: test_blas
6/11 Test #6: test_blas ........................ Passed 3.49 sec
Start 7: test_elemwise
7/11 Test #7: test_elemwise .................... Passed 25.22 sec
Start 8: test_error
8/11 Test #8: test_error ....................... Passed 0.02 sec
Start 9: test_buffer
9/11 Test #9: test_buffer ...................... Passed 4.77 sec
Start 10: test_buffer_collectives
10/11 Test #10: test_buffer_collectives ..........***Failed 0.87 sec
Start 11: test_collectives
11/11 Test #11: test_collectives .................***Failed 0.85 sec
82% tests passed, 2 tests failed out of 11
Total Test time (real) = 47.37 sec
The following tests FAILED:
10 - test_buffer_collectives (Failed)
11 - test_collectives (Failed)
Errors while running CTest
Makefile:117: recipe for target 'test' failed
make: *** [test] Error 8
(myVE) andromeda#REDACTED:~/private/libgpuarray/Build$
According to the github libgpuarray issues :
The last two tests require nccl and will fail if it's not present. If you're not trying to use nccl, you can ignore those failures.
—
https://github.com/Theano/libgpuarray/issues/383#issuecomment-287491789

rt2870.o/rt2870.ko usb wireless adupter installation issue

i am using parrot Linux the latest version . i want to install/use a nano adapter (802.11n) USB
i tried several ways but i failed
tried 1
after trying this i found no other way to ask for help
the following error i am getting while using make && make install
└──╼ #sudo make && make install
make -C tools
make[1]: Entering directory '/home/ano/Downloads/linux/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/ano/Downloads/linux/tools'
/home/ano/Downloads/linux/tools/bin2h
cp -f os/linux/Makefile.6 /home/ano/Downloads/linux/os/linux/Makefile
make -C /lib/modules/4.1.8-parrot-686-pae/build SUBDIRS=/home/ano/Downloads/linux/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.1.8-parrot-686-pae'
CC [M] /home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.o
/home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
/home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.c:331:16: warning: unused variable ‘pAd’ [-Wunused-variable]
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/assoc.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/auth.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/auth_rsp.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sync.o
/home/ano/Downloads/linux/os/linux/../../sta/sync.c: In function ‘PeerBeacon’:
/home/ano/Downloads/linux/os/linux/../../sta/sync.c:2180:12: warning: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type
ie_list,
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:59:0,
from /home/ano/Downloads/linux/os/linux/../../sta/sync.c:28:
/home/ano/Downloads/linux/include/rtmp.h:7892:9: note: expected ‘struct IE_LISTS *’ but argument is of type ‘struct BCN_IE_LIST *’
BOOLEAN StaAddMacTableEntry(
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sanity.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.o
/home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c: In function ‘STAHandleRxDataFrame’:
/home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c:523:33: warning: passing argument 2 of ‘MacTableLookup’ from incompatible pointer type
pEntry = MacTableLookup(pAd, &pHeader->Addr2);
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:59:0,
from /home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c:28:
/home/ano/Downloads/linux/include/rtmp.h:8429:18: note: expected ‘UCHAR *’ but argument is of type ‘UCHAR (*)[6]’
MAC_TABLE_ENTRY *MacTableLookup(RTMP_ADAPTER *pAd, UCHAR *pAddr);
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/connect.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/wpa.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlRF’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5306:7: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 5 has type ‘LONG’ [-Wformat=]
sprintf(msg+strlen(msg), "BANK%d_R%02d:%02X ", bank_Id, rfId, rfValue);
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5359:27: warning: passing argument 2 of ‘RtmpDrvAllRFPrint’ from incompatible pointer type
RtmpDrvAllRFPrint(NULL, msg, strlen(msg));
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:64:0,
from /home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:28:
/home/ano/Downloads/linux/include/rt_os_util.h:668:6: note: expected ‘UINT32 *’ but argument is of type ‘PSTRING’
VOID RtmpDrvAllRFPrint(
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5209:22: warning: unused variable ‘rf_bank’ [-Wunused-variable]
UCHAR regRF = 0, rf_bank = 0;
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5766:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5766:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_ioctl_siwgenie’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:7610:13: warning: assignment from incompatible pointer type
eid_ptr = pAd->StaCfg.pWpaAssocIe;
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1384: recipe for target '_module_/home/ano/Downloads/linux/os/linux' failed
make[1]: *** [_module_/home/ano/Downloads/linux/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.1.8-parrot-686-pae'
Makefile:394: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
can one please check and help me on it ....
I got that error, too, on a fresh Debian installation, despite being able to make that driver flawlessly a few times before.
Some problems were gone when I edited the os/linux/config.mk file as per the README file included in the driver folder, but then, new ones occured, considering something about the DATE and TIME functions.
I found that the solution is to install package firmware-ralink that also contains drivers for your USB Wireless dongle.
On my Debian Jessie installation, it said that firmware-ralink package is now included in the firmware-non-free package.

Resources