I've installed all the boost and boost-related packages from synaptic manager. If I ran "bjam" from the directory getting error :
error: Unable to load Jamfile.
error: Could not find a Jamfile in directory '/usr/share/boost- build/kernel'.
error: Attempted to find it with pattern '[Bb]uild.jam [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam'.
error: Please consult the documentation at 'http://www.boost.org'.
Related
I'm trying to build a pex_binary in mac OS X for my Apache Heron application (written in Python), but it fails with error.
Details of bazel build error below.
$bazel build pmTop
ERROR: /Arun/Python/Heron/PatMon/WORKSPACE:1:1: name 'git_repository' is not defined
ERROR: Error evaluating WORKSPACE file
ERROR: error loading package '': Encountered error while reading extension file 'pex/pex_rules.bzl': no such package '#io_bazel_rules_pex//pex': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'pex/pex_rules.bzl': no such package '#io_bazel_rules_pex//pex': error loading package 'external': Could not load //external package
INFO: Elapsed time: 0.104s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Contents of my WORKSPACE below.
git_repository(
name = "io_bazel_rules_pex",
remote = "https://github.com/benley/bazel_rules_pex.git",
tag = "0.3.0",
)
load("#io_bazel_rules_pex//pex:pex_rules.bzl", "pex_repositories")
pex_repositories()
Bazel version details below.
$bazel version
Build label: 0.25.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed May 1 21:47:49 2019 (1556747269)
Build timestamp: 1556747269
Build timestamp as int: 1556747269
Not sure, why it's unable to fetch the pex_rules.bzl package. I'm not behind firewall. Appreciate any pointers to fix this issue.
The git_repository rule is not known. Add the following statement on the top of your WORKSPACE file
load("#bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
I am installing Cuda 10, CuDnn 7.3 and NCCL 2.3 on Ubuntu 18.04 with a 2080ti. I am having trouble with the NCCL part. When i try to compile Tensorflow it says error and cannot find NCCL-SLA.txt file. But when i search for that file i cant find it anywhere either? So when i look online people say you can move it from another directory but its not there for me so i do not know what to do.
Here is the error code i am getting:
ERROR: missing input file '#local_config_nccl//:nccl/NCCL-SLA.txt'
ERROR: /home/josh/tensorflow/tensorflow/tools/pip_package/BUILD:166:1: //tensorflow/tools/pip_package:build_pip_package: missing input file '#local_config_nccl//:nccl/NCCL-SLA.txt'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/josh/tensorflow/tensorflow/tools/pip_package/BUILD:166:1 1 input file(s) do not exist
INFO: Elapsed time: 17.209s, Critical Path: 11.30s
INFO: 353 processes, local.
FAILED: Build did NOT complete successfully
If you can’t find the file NCCL-SLA.txt, try copy the file LICENSE.txt to a new file named NCCL-SLA.txt in the same directory
I want to profile my tensorflow application using tfprof. I have a running tensorflow 1.3 installation where the the tfprof command line tool is missing. I also tried the provided pip packages locally, but there I also can't find tfprof.
Is there a way to compile and link the tfprof command line tool agains my running tensorflow application?
I already git-cloned the tensorflow repository and tried to build it with bazel 0.5.2
$ bazel build --config opt tensorflow/core/profiler/...
WARNING: Output base '/home/USERNAME/.cache/bazel/_bazel_USERNAME/e5cce820cc082410b4fcc604db349066' is on NFS. This may lead to surprising failures and undetermined behavior.
WARNING: Config values are not defined in any .rc file: opt
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow/core/profiler:profiler' failed; build aborted.
INFO: Elapsed time: 167.083s
or just copy the command mentioned here
bazel build --config opt third_party/tensorflow/core/profiler/...
WARNING: Output base '/home/USERNAME/.cache/bazel/_bazel_USERNAME/e5cce820cc082410b4fcc604db349066' is on NFS. This may lead to surprising failures and undetermined behavior.
WARNING: Config values are not defined in any .rc file: opt
ERROR: no targets found beneath 'third_party/tensorflow/core/profiler'.
I think the path is not right. You should use pathtensorflow/core/profiler/, if your current directory is the cloned tensorflow repository.
Run ./configure script from your tensorflow directory to set the environment variables.
I'm trying to use swig to using shared library with python. I'm not very experimented with c++ but I've make a first test with a simple object (in c++) and that's working good.
Now I try to make it work with a bigger project that already compile under Linux (and Windows). But I can't make it work.
Here is what I've try :
My CMakeLists for Swig :
project(elecswig)
include_directories(${COREALPI_DIR}/include)
include_directories(/usr/include/c++/4.9)
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
find_package(PythonLibs)
include_directories(${PYTHON_INCLUDE_PATH})
set_source_files_properties(src/elec.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(src/elec.i PROPERTIES SWIG_FLAGS "-includeall")
link_directories(${COREALPI_LIBRARY})
swig_add_module(elecswig python src/elec.i)
swig_link_libraries(elecswig
${PYTHON_LIBRARIES}
elec
)
And my elec.i for Swig who's call a .h with namespace:
#define __linux__ 1
#define __GNUC__ 4
%module elecswig
%{
#include "ca/elec/model/modelvoltagedrop.h"
%}
%include "ca/elec/model/modelvoltagedrop.h"
And when I try to compile to get my Python Lybrary I've the following error :
/usr/include/c++/4.9/bits/c++0x_warning.h:32: Error: CPP #error "This file requires compiler and library support for the \
ISO C++ 2011 standard. This support is currently experimental, and must be \
enabled with the -std=c++11 or -std=gnu++11 compiler options.". Use the -cpperraswarn option to continue swig processing.
/usr/include/c++/4.9/cstring:41: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/string:38: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/stringfwd.h:39: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/memoryfwd.h:48: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/stl_algobase.h:59: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/functexcept.h:39: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/cpp_type_traits.h:37: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/ext/type_traits.h:34: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/move.h:33: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/concept_check.h:35: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/stl_iterator_base_types.h:64: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/cwchar:41: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/allocator.h:46: Error: Unable to find 'bits/c++allocator.h'
/usr/include/c++/4.9/bits/localefwd.h:39: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/bits/localefwd.h:40: Error: Unable to find 'bits/c++locale.h'
/usr/include/c++/4.9/iosfwd:38: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/cctype:41: Error: Unable to find 'bits/c++config.h'
[...]
/usr/include/c++/4.9/cstdlib:41: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/utility:68: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/ctime:41: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/ctime:42: Error: Unable to find 'time.h'
/usr/include/c++/4.9/iomanip:38: Error: Unable to find 'bits/c++config.h'
/usr/include/c++/4.9/numeric:60: Error: Unable to find 'bits/c++config.h'
elecswig/CMakeFiles/_elecswig.dir/build.make:53: recipe for target 'elecswig/elecPYTHON_wrap.cxx' failed
make[2]: *** [elecswig/elecPYTHON_wrap.cxx] Error 1
CMakeFiles/Makefile2:75: recipe for target 'elecswig/CMakeFiles/_elecswig.dir/all' failed
make[1]: *** [elecswig/CMakeFiles/_elecswig.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
It seems that he can't find many files.h but I mostly have the c++11 error.
I've trying to set Flags in CMake but it seem no change anything.
If you can help me please ?
I can provide more information if needed.
Thanks
After hours of tests, I found reason why it was not working. In the CMakeLists :
set_source_files_properties(src/elec.i PROPERTIES SWIG_FLAGS "-includeall")
include all libraries and dependencies, anyway of compiler use. And if you have 2 version of libstdc++ and gcc/g++, it seems he can't find the good libraries to link / use.
If I remove it, CMake does the job. I have no more unable to find or c++11 problems.
I've to use g++-5 to make it work too (4.9 seems miss some features for c++11) and add the good namespace and include.
Now I've access to my shared library in Python.
For the record, to answer the question that is asked in the title of this post (which is different from the problem the original author actually had):
Use this declaration instead of setting CMAKE_CXX_FLAGS:
set_property(TARGET ${SWIG_MODULE_elecswig_REAL_NAME} PROPERTY CXX_STANDARD_REQUIRED 11)
Trying to build the bootloader of pyinstaller by this instruction, but fail
error messages :
[37/40] cc_link: build/debug/linux/getpath_1.o build/debug/common/pyi_python_1.o build/debug/common/pyi_global_1.o build/debug/common/pyi_launch_1.o build/debug/common/pyi_pythonlib_1.o build/debug/common/pyi_utils_1.o build/debug/common/pyi_archive_1.o build/debug/common/main_1.o build/debug/common/pyi_path_1.o -> build/debug/run_d
ld: fatal: library -lz: not found
ld: fatal: File processing errors. No output written to /home/devel3/nwtham/python27/pyinstaller/bootloader/build/debug/run_d
Waf: Leaving directory `/home/devel3/nwtham/python27/pyinstaller/bootloader/build'
Build failed: -> task failed (err #1):
{task: cc_link getpath_1.o,pyi_python_1.o,pyi_global_1.o,pyi_launch_1.o,pyi_pythonlib_1.o,pyi_utils_1.o,pyi_archive_1.o,main_1.o,pyi_path_1.o -> run_d}
I try to install libz1-1.2.8,REV=2013.09.23-SunOS5.10-i386-CSW.pkg.gz from here, but it still get the same error messages. I check on the folder /opt/csw/lib and found a hyperlink named "libz.so.1" and change it to "libz.so", but I still got the same error message.
My LD_LIBRARY_PATH
/opt/csw/lib/python2.7:/opt/csw/lib:/usr/lib:/usr/local/gcc/lib:/usr/local/lib:/usr/sfw/lib:/usr/dt/lib:/usr/openwin/lib/:/usr/ucblib:/opt/sybase/lib
Maybe I install a wrong package, which package should I install?
Python2.7 and gcc4.9.2 all download from here.
edit :
part of the PATH :
/usr/bin:/usr/local/bin:/opt/csw/gcc4/bin:/usr/sfw/bin:/opt/csw/bin