How to fix Buildozer build fails with cmake error - cmake

I am trying to build a Kivy app with buildozer. I have upgraded to buildozer 0.39. The build fails with:
File "~/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /bin/rm -f CMakeCache.txt CMakeFiles/
STDOUT:
/bin/rm: cannot remove 'CMakeFiles/': Is a directory
I have installed cmake version 3.5.1
Edit 18 Apr 2019
cython version 0.21 installed.
I have uninstalled cmake and reinstalled version 3.14.2 using the instructions here.
I have deleted the .buildozer directory. When I now run buildozer I, get the issue:
RAN: ./autogen.sh
STDOUT:
./autogen.sh: 2: exec: autoreconf: not found
After
sudo apt install autoconf libtool
I now get the error:
STDOUT:
File "setup.py", line 159
print "--- using Tcl/Tk libraries at", TCL_ROOT
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("--- using Tcl/Tk libraries at", TCL_ROOT)?
Edit 19 Apr 2019
If I uninstall buildozer it appears to be python 2.7
/usr/local/lib/python2.7/dist-packages/buildozer-0.39.dist-info/*
I have installed buildozer from a directory where the python version is 2.7.12
How can I target buildozer to python 2.7?
How can I find out how it is targetted?
How can I use that information?
I have tried to use buildozer in virtualenv with python 3, but I get the same error.
I am lost. I have looked the Docker, but I have no idea how to install it or use it. Does it assume a working version of buildozer? What is it? Will it solve my problem?
Edit 21 Apr 2019
When I run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer --version
'Buildozer 0.40.dev0'.
However, when I try to run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer android debug
I get the error:
Rename /home/user/.buildozer/android/platform/android-ndk-r17c to /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 fails because /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 is not a directory
Edit 22 Apr 2019
I have now commented out
#android.ndk_path
from buildozer.spec
I now get the error:
Cwd /home/user/hostcwd/.buildozer/android/platform/python-for-android
Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=bfgApp --bootstrap=sdl2 --requirements=python2,kivy,pil,docutils,pathlib,html2rest --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/user/hostcwd/.buildozer/android/platform/build" --ndk-api=21

I deleted CMakeFiles dir of this package and rerun buildozer build and it passed though (in dir .buildozer/android/platform/build/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg)

Related

tensorflow tools: can't figure out how to build/run summarize_graph

I'm trying to convert my *.pb tensorflow model to coreML. I'm getting stuck on identifying my output node of my model.
In order to obtain my output node, I've attempted to build and run summarize_graph on my *.pb file, but running into issues. How do I build and run summarize_graph after downloading the source?
I've run the following command:
bazel build tensorflow/tools/graph_transforms:summarize_graph
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=tensorflow_inception_graph.pb
and I get the following error:
INFO: Analysed 0 targets (0 packages loaded). INFO: Found 0 targets...
INFO: Elapsed time: 0.389s, Critical Path: 0.01s INFO: Build completed
successfully, 1 total action
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph: No such
file or directory
After issuing the bazel command, a blank bazel-bin directory appears in the location I executed the command.
Note, summarize_graph didn't exist in my tensorflow installation. So I downloaded the source from github tensorflow/tools/graph_transforms and copied it into my tensorflow/tools/graph_transforms directory.
the directory contains the following:
BUILD README.md
init.py
init.pyc add_default_attributes.cc add_default_attributes_test.cc backports.cc backports_test.cc compare_graphs.cc
fake_quantize_training.cc fake_quantize_training_test.cc file_utils.cc
file_utils.h file_utils_test.cc flatten_atrous.cc
flatten_atrous_test.cc fold_batch_norms.cc fold_batch_norms_test.cc
fold_constants_lib.cc fold_constants_lib.h fold_constants_test.cc
fold_old_batch_norms.cc fold_old_batch_norms_test.cc
freeze_requantization_ranges.cc freeze_requantization_ranges_test.cc
fuse_convolutions.cc fuse_convolutions_test.cc insert_logging.cc
insert_logging_test.cc obfuscate_names.cc obfuscate_names_test.cc out
python quantize_nodes.cc quantize_nodes_test.cc quantize_weights.cc
quantize_weights_test.cc remove_attribute.cc remove_attribute_test.cc
remove_device.cc remove_device_test.cc remove_ema.cc
remove_ema_test.cc remove_nodes.cc remove_nodes_test.cc
rename_attribute.cc rename_attribute_test.cc rename_op.cc
rename_op_test.cc round_weights.cc round_weights_test.cc set_device.cc
set_device_test.cc sort_by_execution_order.cc
sort_by_execution_order_test.cc sparsify_gather.cc
sparsify_gather_test.cc strip_unused_nodes.cc
strip_unused_nodes_test.cc summarize_graph_main.cc transform_graph.cc
transform_graph.h transform_graph_main.cc transform_graph_test.cc
transform_utils.cc transform_utils.h transform_utils_test.cc
I'm on a macbook pro
Thanks!
In case anyone is running into the similar problem, I solved it.
Navigate to the root of the tensorflow source directory
cmd> ./configure
cmd> bazel build tensorflow/tools/graph_transforms:summarize_graph
(you may get an error about xcode; if so, run the following)
cmd> xcode-select -s /Applications/Xcode.app/Contents/Developer
cmd> bazel clean --expunge
cmd> bazel build tensorflow/tools/graph_transforms:summarize_graph
CentOS 7 walkthrough:
yum install epel-release
yum update
yum install patch
curl https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo -o /etc/yum.repos.d/vbatts-bazel-epel-7.repo
yum install bazel
curl -L -O https://github.com/tensorflow/tensorflow/archive/v1.8.0.tar.gz
cd tensorflow-1.8.0
./configure # interactive!
bazel build tensorflow/tools/graph_transforms:summarize_graph
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph

FASTCGI Install on Raspberry PI Error - Cannot Manually Build Package

I have searched the internet all weekend and cannot find anyone who has had a similar error. I am trying to install libapache-mod-factcgi but the package errors out and I cannot figure out why.
pi#applejacks:/tmp $ sudo apt-get source -b libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.dsc'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141.orig.tar.gz'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.diff.gz'
Need to get 0 B of source archives.
Skipping unpack of already unpacked source in libapache-mod-fastcgi-2.4.7~0910052141
dpkg-buildpackage: source package libapache-mod-fastcgi
dpkg-buildpackage: source version 2.4.7~0910052141-1.1+deb8u1
dpkg-buildpackage: source distribution jessie
dpkg-buildpackage: source changed by Andreas Beckmann <anbe#debian.org>
dpkg-buildpackage: host architecture armhf
dpkg-source --before-build libapache-mod-fastcgi-2.4.7~0910052141
debian/rules clean
dh_listpackages: Please specify the compatibility level in debian/compat
dh_listpackages: Compatibility levels before 5 are no longer supported (level 1 requested)
/usr/share/cdbs/1/rules/dpatch.mk:33: CDBS WARNING: dpatch.mk is deprecated since 0.4.85 - please use source format 3.0 (quilt) instead
test -x debian/rules
rmdir /tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp
rmdir: failed to remove ‘/tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp’: No such file or directory
/usr/share/cdbs/1/rules/buildcore.mk:46: recipe for target 'cleanbuilddir' failed
make: [cleanbuilddir] Error 1 (ignored)
dh_clean
dh_clean: Please specify the compatibility level in debian/compat
/usr/share/cdbs/1/rules/debhelper.mk:189: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
Build command 'cd libapache-mod-fastcgi-2.4.7~0910052141 && dpkg-buildpackage -b -uc' failed.
E: Child process failed
I'm trying to build Apache2 on RPi also. These commands got the .deb building for me:
cd libapache-mod-fastcgi-2.4.7~0910052141;
echo 10 > debian/compat;
dpkg-buildpackage -b -uc
Then cd .. to go one level up, then install the package with dpkg -i ./libapache2-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1_armhf.deb

Install and configure crowd-apache connector on centos 7

1. su -c "yum -y install autoconf automake gcc httpd-devel libcurl-devel libtool libxml2-devel mod_dav_svn subversion-devel"
2. wget http://downloads.atlassian.com/software/crowd/downloads/cwdapache/mod_authnz_crowd-2.2.2.tar.gz
3. tar xzf mod_authnz_crowd-2.2.2.tar.gz
4. cd mod_authnz_crowd-2.2.2
5. autoreconf --install
6. ./configure
7. make
8. su -c "make install"
I am using CentOS 7, Crowd version is 2.9, Apache Http Server version is 2.4.
Above are the steps to install crowd-apache connector in any unix-like system.
There is no issue till the first 4 steps but from the step 5 I get the following errors respectively to the commands.
So my question is:
Is crowd-apache connector compatible to CentOS 7 or any version of CentOS higher than 6.* with Apache version 2.4?
If compatible then what are the steps to accomplish this?
Or how can I get rid of these errors and successfully build crowd-apache connector in CentOS 7
[root#localhost mod_authnz_crowd-2.2.2]# autoreconf --install
libtoolize: putting auxiliary files in .'.
libtoolize: copying file./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'.
libtoolize: copying filem4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4'
libtoolize: copying filem4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4'
libtoolize: copying filem4/lt~obsolete.m4'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
automake: warnings are treated as errors
/usr/share/automake-1.13/am/ltlibrary.am: warning: 'mod_authnz_crowd.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/Makefile.am:3: while processing Libtool library 'mod_authnz_crowd.la'
src/Makefile.am: installing './depcomp'
src/Makefile.am:8: warning: 'CFLAGS' is a user variable, you should not override it;
src/Makefile.am:8: use 'AM_CFLAGS' instead
parallel-tests: installing './test-driver'
/usr/share/automake-1.13/am/ltlibrary.am: warning: 'mod_authz_svn_crowd.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/svn/Makefile.am:1: while processing Libtool library 'mod_authz_svn_crowd.la'
src/svn/Makefile.am:6: warning: 'CFLAGS' is a user variable, you should not override it;
src/svn/Makefile.am:6: use 'AM_CFLAGS' instead
autoreconf: automake failed with exit status: 1
[root#localhost mod_authnz_crowd-2.2.2]# ./configure
configure: error: Could not locate Apache apxs binary
[root#localhost mod_authnz_crowd-2.2.2]# make
make: *** No targets specified and no makefile found. Stop.
[root#localhost mod_authnz_crowd-2.2.2]# su -c "make install"
make: *** No rule to make target `install'. Stop.
Apache-Crowd integration with CentOS 7 is not possible right now for the current versions mentioned above.
Apache-Crowd connector (mod_authnz_crowd-2.2.2.tar.gz) is compatible with CentOS 6.* versions.

Installing Perl6 and Panda on Ubuntu 15.10. Problems with bootstrap.pl

I am trying to install Panda on Ubuntu 15.10. First I tried:
git clone --recursive git://github.com/tadzik/panda.git
cd panda
perl6 bootstrap.pl
The last command gives error message:
===SORRY!=== Error while compiling bootstrap.pl
Confused
at bootstrap.pl:3
------> use v6.⏏c;
expecting any of:
statement list
Based on comments from #gfldex (see below), I then ran:
> perl6 --version
This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
So the problem seems that an old version of Perl6 comes with Ubuntu 15.10.
(I installed Perl6 on Ubuntu using sudo apt-get install rakudo.)
I now tried to update my Perl6 to latest version:
wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install
But the last command fails with:
cd modules/panda && /home/hakon/install_rakudo/rakudo-star-2016.01/install/bin/perl6-m bootstrap.pl
==> Bootstrapping Panda
==> Installing panda from a local directory '/home/hakon/install_rakudo/rakudo-star-2016.01/modules/panda'
==> panda depends on File::Find, Shell::Command, JSON::Fast
==> Shell::Command depends on File::Find
==> Fetching File::Find
==> Building File::Find
==> Testing File::Find
Perl v6.0.0 required--this is only v5.20.2, stopped at lib/File/Find.pm line 1.
BEGIN failed--compilation aborted at lib/File/Find.pm line 1.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
Compilation failed in require at /home/hakon/perl5/bin/prove line 8.
BEGIN failed--compilation aborted at /home/hakon/perl5/bin/prove line 8.
The spawned process exited unsuccessfully (exit code: 255)
After subsequent input from #gfldex I tried to remove package
rakudo. Maybe the presence of the binary /usr/bin/perl6 would cause confusion for the installer:
> sudo apt-get remove rakudo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libparrot6.6.0 linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-image-4.2.0-16-generic
linux-image-4.2.0-27-generic linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-27-generic nqp parrot parrot-minimal
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
rakudo
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 38,8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 318170 files and directories currently installed.)
Removing rakudo (2014.07-4build1) ...
Processing triggers for man-db (2.7.4-1) ...
Then testing if the package was removed successfully:
> pwd
/home/hakon/install_rakudo/rakudo-star-2016.01
> which perl6
./perl6
> perl6 --version
This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
implementing Perl 6.c.
> cd ..
> perl6 --version
The program 'perl6' is currently not installed. You can install it by typing:
sudo apt-get install rakudo
> cd rakudo-star-2016.01
Then I retried make install, but it fails with exactly the same error message as before.
Then I tried a complete reinstallation:
cd ..
rm -rf rakudo-star-2016.01/
wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install
But I still get the same error message from make install.
Then I tried reinstalling Panda manually once more
cd ..
git clone --recursive git://github.com/tadzik/panda.git
cd panda
../rakudo-star-2016.01/perl6 bootstrap.pl
But that also fails with the same error message (Perl v6.0.0 required--this is only v5.20.2).
According to user RabidGravy on IRC channel #perl6 on irc.freenode.net:
the problem with installing panda there is due to PERL5LIB or PERLLIB
being set in the environment
So now I tried clearing PERL5LIB before installing:
PERL5LIB= make install
and it worked fine.
And finally, I had to add the following paths to my ~/.bashrc to complete the setup:
/home/hakon/install_rakudo/rakudo-star-2016.01/install/bin
/home/hakon/install_rakudo/rakudo-star-2016.01/install/share/perl6/site/bin
(It would be nice to know why it was necessary to clear PERL5LIB, tough.)

Installing C SDK for couchbase, Mac OSX 10.6.8 -- How can I correct cmake errors?

I am trying to get couchbase up and running for python on Mac OSX 10.6.8. I'm following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/index.html#getting-started
But I'm stuck on step 2:
Download and install the C library.
According to the instructions for installing the C SDK here:
http://docs.couchbase.com/developer/c-2.4/download-install.html
I did this:
~$ brew update
....
....
~$ brew install libcouchbase
But I'm getting an error when homebrew tries to install the dependency cmake:
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --parallel=2 --no-system-libarchiv
==> make
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_write_set_options.c.o
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/filter_fork_posix.c.o
Linking C static library libcmlibarchive.a
[ 34%] Built target cmlibarchive
make: *** [all] Error 2
READ THIS: http://git.io/brew-troubleshooting
These open issues may also help:
Fix LLVM CMake modules not being preprocessed (https://github.com/Homebrew/homebrew/pull/29976)
cmake builds fail on CLT-only with --env=std (https://github.com/Homebrew/homebrew/issues/29101)
More detail here:
~$ brew gist-logs --config --doctor cmake
https://gist.github.com/a37987f168d284128cfe
Anyone have any ideas on what I should do? Thanks.
Do you have the latest (available for 10.6.8) version of Xcode and its devtools? It appears to be an issue with GCC (I initially had issues with the LLVM gcc version Apple packages with Xcode).
Try brew install gcc (or brew reinstall gcc if you initially used brew to install gcc) and then run brew install make again.
I've got XCode version 3.2.6 installed, which I believe is the highest version compatible with OSX 10.6.8.
In the gist, whose link I posted, one of the errors is:
error: ncurses/ncurses.h: No such file or directory
I found ncurses.h on my system here:
/usr/include$ ls -al ncurses.h
lrwxr-xr-x 1 root wheel 8 Aug 11 2012 ncurses.h -> curses.h
...which if you note is not in a directory called ncurses(look at the prompt)--ncurses being the directory where the error message says ncurses.h should be. Also, note that ncurses.h is a link to another file: curses.h (see the arrow on the right?). So, I did this:
/usr/include$ sudo mkdir ncurses
Password:
/usr/include$ cd ncurses
/usr/include/ncurses$ sudo cp -av ../ncurses.h . (-a => copy link rather than the file it points to, -v => verbose, show what is being copied)
Password:
../ncurses.h -> ./ncurses.h
/usr/include/ncurses$ ls -al
total 8
drwxr-xr-x 3 root wheel 102 Dec 29 18:59 .
drwxr-xr-x 272 root wheel 9248 Dec 29 18:13 ..
lrwxr-xr-x 1 root wheel 8 Dec 29 18:59 ncurses.h -> curses.h
Then I tried installing libcouchbase again:
~$ brew install libcouchbase
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.ta
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.g
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --para
==> make
==> make install
/Users/7stud/.homebrew/Cellar/cmake/3.1.0: 1819 files, 33M, built in 18.5 minutes
==> Installing libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
######################################################################## 100.0%
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 42 seconds
$
I didn't believe it, so I tried again:
~$ brew install libcouchbase
Warning: libcouchbase-2.4.5_1_gd7f6ecf already installed
~$ brew uninstall libcouchbase
Uninstalling /Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf...
~$ brew install libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
Already downloaded: /Library/Caches/Homebrew/libcouchbase-2.4.5_1_gd7f6ecf.tar.gz
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 30 seconds
~$
Testing the install:
/usr/include/ncurses$ cbc version
cbc:
Runtime: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
Headers: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
IO: Default=libevent, Current=libevent
SSL: .. SUPPORTED
Python SDK
But then I was unable to install the Python SDK following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/
$ python -V
Python 2.7.9
I got to here:
5. Install the Python SDK. The easiest way to do this is via the pip tool:
shell> pip install couchbase --quiet
But this is what happened:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-eflT9C-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
Same thing here:
$ LC_ALL=C pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-Oe6ydu-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
/usr/include/ncurses$ pip install couchbase --quiet Command
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-GijsbQ-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
I fixed the unicode error by patching the python source code:
#text = '\n'.join(complete_log)
#python 2.x patch found here: https://github.com/pypa/pip/issues/1137
text = '\n'.join(to_utf8(l) for l in complete_log)
But then I got this error:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-AQtdf2-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
$
(I just looked at the error log mentioned above: pip.log, and it says the error was a KeyboardInterrupt. Huh? So, I tried $ pip install couchbase --quiet again and it worked. Then, to test the install $ python -c 'import couchbase', and there were no errors! I don't know if the stuff I did below influenced anything.)
Next, I decided to try installing from source:
According to the README file:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext --inplace
But that ended like this:
src/exceptions.c:136: error: too many arguments to function
‘pycbc_exc_map’ lipo: can't figure out the architecture type of:
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-//ccZekvJj.out error:
command 'gcc-4.2' failed with exit status 1
Next, I did this:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext \
> --library-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib \
> --include-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/include
running build_ext building 'couchbase._libcouchbase' extension gcc-4.2
-fno-strict-aliasing -fno-common -dynamic -isysroot
...
...
intel-2.7/src/iops.o
build/temp.macosx-10.6-intel-2.7/src/connevents.o
build/temp.macosx-10.6-intel-2.7/src/pipeline.o
build/temp.macosx-10.6-intel-2.7/src/viewrow/viewrow.o
build/temp.macosx-10.6-intel-2.7/src/contrib/jsonsl/jsonsl.o
-L/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib -lcouchbase -o build/lib.macosx-10.6-intel-2.7/couchbase/_libcouchbase.so
...which ended without error. But testing the install failed:
~/Downloads/couchbase-1.2.4$ python -c 'import couchbase'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "couchbase/__init__.py", line 18, in <module>
from couchbase.connection import Connection
File "couchbase/connection.py", line 22, in <module>
import couchbase._bootstrap
File "couchbase/_bootstrap.py", line 34, in <module>
import couchbase.exceptions as E
File "couchbase/exceptions.py", line 18, in <module>
import couchbase._libcouchbase as C
ImportError: No module named _libcouchbase
So, I thought what the heck, I'll go ahead and try this:
~/Downloads/couchbase-1.2.4$ python setup.py install
...
...
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchbase-1.2.4-py2.7-macosx-10.6-intel.egg
Processing dependencies for couchbase==1.2.4
Finished processing dependencies for couchbase==1.2.4
But, I got the same import error when testing the install, so I gave up.
After reading the answer to my question, I did:
$ brew install gcc
but I didn't try to fix couchbase until now. I don't think installing gcc with homebrew did anything because I still get:
~$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc.
build 5666) (dot 3) Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
/usr/bin$ which gcc
/usr/bin/gcc
/usr/bin$ ls -al /usr/bin/gcc
lrwxr-xr-x 1 root wheel 7 Aug 11 2012 /usr/bin/gcc -> gcc-4.2
...which is the Apple version of gcc. But, when I installed gcc with homebrew I got the output:
/Users/7stud/.homebrew/Cellar/gcc/4.9.2_1: 1155 files, 200M, built in
106.8 minutes
...which is gcc version 4.9.