I am trying to build PyGTK on CentOS for a non-standard Python (2.6, vs the out-of-the-box 2.4). It requires that I first build pygobject. pygobject-2.18.0 fails at the configure step. The error messages is as follows:
checking for GLIB - version >= 2.14.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: maybe you want the pygobject-2-4 branch?
I have downloaded, built and successfully installed glib.
The config.log file contains the following output:
conftest.c:27:18: error: glib.h: No such file or directory
conftest.c: In function 'main':
conftest.c:33: error: 'glib_major_version' undeclared (first use in this function)
conftest.c:33: error: (Each undeclared identifier is reported only once
conftest.c:33: error: for each function it appears in.)
conftest.c:33: error: 'glib_minor_version' undeclared (first use in this function)
conftest.c:33: error: 'glib_micro_version' undeclared (first use in this function)
configure:13844: $? = 1
What am I doing wrong?
Looks like your glib version is not up to date.
In gentoo, following versions apply in PyGTK 2.16.0:
glib 2.8.0
pygobject-2.16.1
pycairo 2.0.1
Related
I was trying to compile bazel on my Debian 32-bit.
I started the process with this command:
env EXTRA_BAZEL_ARGS="--host_javabase=#local_jdk//:jdk" BAZEL_JAVAC_OPTS="-J-Xms384m -J-Xmx512m" bash ./compile.sh
And I get this error:
In file included from external/com_google_protobuf/src/google/protobuf/message.h:122,
from external/com_google_protobuf/src/google/protobuf/descriptor.pb.h:29,
from external/com_google_protobuf/src/google/protobuf/descriptor.cc:52:
external/com_google_protobuf/src/google/protobuf/descriptor.h:1283:26: note: 'class google::protobuf::FileDescriptor' declared here
class LIBPROTOBUF_EXPORT FileDescriptor {
^~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-writable-strings'
ERROR: /path/to/bazel/third_party/BUILD:535:1: Executing genrule //third_party:filter_netty_dynamic_libs failed (Exit 12)
zip error: Nothing to do! (bazel-out/piii-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar)
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 1173,794s, Critical Path: 37,45s
INFO: 976 processes: 976 local.
FAILED: Build did NOT complete successfully
ERROR: Could not build Bazel
I searched for a while... but nothing...
Any idea?
I followed the official instructions available at https://docs.bazel.build/versions/master/install-compile-source.html
Unfortunately, Bazel does not support 32-bit builds. Based on the complexity of builds that Bazel is designed to handle, a 32-bit system is just not feasible to use.
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'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'.
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)
When I want to install the package wxPython-2.8.7.1.spkg from here
in the terminal of Sage it gives me a syntax error. What i write in Sage terminal and the result are as follow:
sage: sage -i wxPython-2.8.7.1.spkg
------------------------------------------------------------
File "<ipython console>", line 1
sage -i wxPython-RealNumber('2.8').gen(7).1.spkg
^
SyntaxError: invalid syntax
I also use the direct address of the package but the result was the same:
sage: sage -i http://www.sagemath.org/packages/experimental/wxPython-2.8.7.1.s>
------------------------------------------------------------
File "<ipython console>", line 1
sage -i http://www.sagemath.org/packages/experimental/wxPython-RealNumber('2.8').gen(7).1.spkg
^
SyntaxError: invalid syntax
I also downloaded the package and used the local address but the result was the same.
You need to do this from the command line before starting Sage. Otherwise you can use
sage: install_package("wxPython")
which is currently downloading for me... and then failed:
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.
Error configure wx widgets.
real 0m13.972s
user 0m2.791s
sys 0m5.232s
************************************************************************
Error installing package wxPython-2.8.7.1
************************************************************************
Along those lines, here is what it says at the list of experimental spkgs, of which this is one:
These are EXPERIMENTAL! They probably won't work at all for you! Use at your own risk! Many of these have never been successfully built on any platform!
So buyer beware!