Get sauce from github, read instructions in doc/build-unix.txt. But make can not into compile!
[urs1412#noname bitcoin]$ cd src
[urs1412#noname src]$ make -f makefile.unix
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security \
-Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE \
-D_FILE_OFFSET_BITS=64 -I/home/urs1412/w/bitcoin/src \
-I/home/urs1412/w/bitcoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 \
-I/home/urs1412/w/bitcoin/src/leveldb/include \
-I/home/urs1412/w/bitcoin/src/leveldb/helpers \
-DHAVE_BUILD_INFO -fno-stack-protector \
-fstack-protector-all -Wstack-protector \
-D_FORTIFY_SOURCE=2 -MMD -MF obj/alert.d \
-o obj/alert.o alert.cpp \
alert.cpp:6:53: fatal error: boost/algorithm/string/classification.hpp:
No such file or directory
compilation terminated.
make: *** [obj/alert.o] Error 1
td;dr could not build bitcoin, dumping system info
[urs1412#noname src]$ uname -r
3.6.10-4.fc18.x86_64
[urs1412#noname src]$ git log -n 1
commit 77a1e12eed5fc66dce16584696f54988a8c2bf4e
Merge: fe15aa3 0565b71
Author: Gavin Andresen
Date: Wed Apr 24 08:48:06 2013 -0700
Merge pull request #2554 from fanquake/qt-pro-brew-patch
bitcoin-qt.pro Brew patch
I finally was able to build bitcoin-1.8 (not the git sources, although I believe these same steps will be applicable) on my CentOS VPS.
Here are the packages I had to install. Note that I had to build some of these.
As root:
yum install gcc-c++ make
install boost-devel
yum install db4-devel
yum install openssl-devel # but this didn't provide ec.h, hence the next steps
yum install rpm-build
rpm -U ~jcomeau/rpmbuild/RPMS/x86_64/openssl-devel-1.0.0e-1.x86_64.rpm
yum install lynx # for downloading some source packages
yum install python-devel # for building miniupnpc
rpm -i ~jcomeau/rpmbuild/RPMS/x86_64/libminiupnpc9-1.8.20130503-0.1.x86_64.rpm
rpm -i ~jcomeau/rpmbuild/RPMS/x86_64/libminiupnpc-devel-1.8.20130503-0.1.x86_64.rpm
Then as user, make BOOST_LIB_SUFFIX=-mt all test
If you need instructions on building the openssl-devel (the spec file was in the sources and mostly functional) and libminiupnpc-devel (I got the spec file from an OpenSUSE source RPM and adapted it) let me know.
I believe your immediate problem is you didn't install openssl-devel. But you will likely run into these other problems after that, if you don't do some of the steps I did.
Make sure that boost library for gcc is working correctly. Try a test "hello world" program with boost. You can find it in the directory: BOOST_BUILD_PATH/example/hello
Compile it with BOOST_BUILD_PATH/bin/b2 toolset=gcc
If it doesnt work then boost is not correctly installed.
Related
I have a container file that uses the base image of fedora 37. I want to install some python libraries and some of them require gssapi. I know that gssapi requires krb5-devel. I have a step to install that and I can confirm that it works by calling krb5-config. However, while building the container (using Kaniko) it hit the issue of incompleted installation of gssapi because krb5-config was not found.
I could build my container fine locally using podman/buildar but when pushing my code to GitLab and using Kaniko to build the container, it failed. I doubt if it is because of Kaniko.
Here is my container file:
FROM fedora:37
USER root
WORKDIR /opt/workspace
RUN dnf install -y createrepo_c \
krb5-devel \
python3-pip \
python3-devel \
tree \
diffutils \
git \
gcc
RUN krb5-config
COPY *requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt -r test_requirements.txt
I also tried to install heimdal-devel and did the symblink RUN ln -s /usr/bin/heimdal-krb5-config /usr/bin/krb5-config but it doesn't help at all.
System version - macOS Monterey (12.4)
Chip - Apple M1 Pro
Objective - I want to install mysql#5.6 using brew as per requirement. Any other methods are also welcomed.
Steps followed -
run command for installing mysql 5.6 (brew install mysql#5.6)
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
Error: mysql#5.6: no bottle available!
You can try to install from source with:
brew install --build-from-source mysql#5.6
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels
run prompted command (brew install --build-from-source mysql#5.6)
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/manifests/3.23.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:46711ae9d567064916561c472b94cba0e939ae72479f6f51ebe98dc6995c4422
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:46711ae9d567064916561c472b94cba0e939ae72479f6f51ebe98dc6995c4422?se=2022-07-04T12%3A45%3A00Z&sig=PNUycLoV8sRSiCs2K38VapK1SXcIrE%2######################################################################## 100.0%
==> Downloading https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
==> Downloading from https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
######################################################################## 100.0%
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.4.
==> Installing dependencies for mysql#5.6: cmake
==> Installing mysql#5.6 dependency: cmake
==> Pouring cmake--3.23.2.arm64_monterey.bottle.tar.gz
🍺 /opt/homebrew/Cellar/cmake/3.23.2: 3,043 files, 42.2MB
==> Installing mysql#5.6
==> Patching
==> cmake . -DCOMPILATION_COMMENT=Homebrew -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DINSTALL_DOCDIR=share/doc/mysql#5.6 -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_M==> make
Last 15 lines from /Users/amangautam/Library/Logs/Homebrew/mysql#5.6/02.make:
[ 9%] Building C object extra/libevent/CMakeFiles/event.dir/evrpc.c.o
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_TLSv13 -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/include -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/compat -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/include -isystem /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/zlib -fPIC -Wno-error=deprecated-declarations -Qunused-arguments -O3 -DNDEBUG -DDBUG_OFF -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -MD -MT extra/libevent/CMakeFiles/event.dir/evrpc.c.o -MF CMakeFiles/event.dir/evrpc.c.o.d -o CMakeFiles/event.dir/evrpc.c.o -c /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/evrpc.c
[ 9%] Linking C static library lib/libevent_extra.a
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event_extra.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event_extra.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent_extra.a CMakeFiles/event_extra.dir/buffer.c.o CMakeFiles/event_extra.dir/bufferevent.c.o CMakeFiles/event_extra.dir/bufferevent_filter.c.o CMakeFiles/event_extra.dir/bufferevent_pair.c.o CMakeFiles/event_extra.dir/bufferevent_ratelim.c.o CMakeFiles/event_extra.dir/bufferevent_sock.c.o CMakeFiles/event_extra.dir/event.c.o CMakeFiles/event_extra.dir/evmap.c.o CMakeFiles/event_extra.dir/evthread.c.o CMakeFiles/event_extra.dir/evutil.c.o CMakeFiles/event_extra.dir/evutil_rand.c.o CMakeFiles/event_extra.dir/evutil_time.c.o CMakeFiles/event_extra.dir/listener.c.o CMakeFiles/event_extra.dir/log.c.o CMakeFiles/event_extra.dir/signal.c.o CMakeFiles/event_extra.dir/strlcpy.c.o CMakeFiles/event_extra.dir/select.c.o CMakeFiles/event_extra.dir/poll.c.o CMakeFiles/event_extra.dir/kqueue.c.o CMakeFiles/event_extra.dir/evthread_pthread.c.o CMakeFiles/event_extra.dir/event_tagging.c.o CMakeFiles/event_extra.dir/http.c.o CMakeFiles/event_extra.dir/evdns.c.o CMakeFiles/event_extra.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent_extra.a
[ 9%] Built target event_extra
[ 9%] Linking C static library lib/libevent.a
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent.a CMakeFiles/event.dir/buffer.c.o CMakeFiles/event.dir/bufferevent.c.o CMakeFiles/event.dir/bufferevent_filter.c.o CMakeFiles/event.dir/bufferevent_pair.c.o CMakeFiles/event.dir/bufferevent_ratelim.c.o CMakeFiles/event.dir/bufferevent_sock.c.o CMakeFiles/event.dir/event.c.o CMakeFiles/event.dir/evmap.c.o CMakeFiles/event.dir/evthread.c.o CMakeFiles/event.dir/evutil.c.o CMakeFiles/event.dir/evutil_rand.c.o CMakeFiles/event.dir/evutil_time.c.o CMakeFiles/event.dir/listener.c.o CMakeFiles/event.dir/log.c.o CMakeFiles/event.dir/signal.c.o CMakeFiles/event.dir/strlcpy.c.o CMakeFiles/event.dir/select.c.o CMakeFiles/event.dir/poll.c.o CMakeFiles/event.dir/kqueue.c.o CMakeFiles/event.dir/evthread_pthread.c.o CMakeFiles/event.dir/event_tagging.c.o CMakeFiles/event.dir/http.c.o CMakeFiles/event.dir/evdns.c.o CMakeFiles/event.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent.a
[ 9%] Built target event
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.4.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
As per above response, I did system update and again ran same command (brew install --build-from-source mysql#5.6)
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
editorconfig-checker
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
==> Downloading https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
Already downloaded: /Users/amangautam/Library/Caches/Homebrew/downloads/050b4768f405f6217eaccbda4b2f0c5ba8ded872cf62408677fcf7883cfe82ea--mysql-5.6.51.tar.gz
==> Patching
==> cmake . -DCOMPILATION_COMMENT=Homebrew -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DINSTALL_DOCDIR=share/doc/mysql#5.6 -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_M
==> make
Last 15 lines from /Users/amangautam/Library/Logs/Homebrew/mysql#5.6/02.make:
[ 9%] Building C object extra/libevent/CMakeFiles/event_extra.dir/evrpc.c.o
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_TLSv13 -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/include -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/compat -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/include -isystem /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/zlib -fPIC -Wno-error=deprecated-declarations -Qunused-arguments -O3 -DNDEBUG -DDBUG_OFF -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -MD -MT extra/libevent/CMakeFiles/event_extra.dir/evrpc.c.o -MF CMakeFiles/event_extra.dir/evrpc.c.o.d -o CMakeFiles/event_extra.dir/evrpc.c.o -c /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/evrpc.c
[ 9%] Linking C static library lib/libevent_extra.a
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event_extra.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event_extra.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent_extra.a CMakeFiles/event_extra.dir/buffer.c.o CMakeFiles/event_extra.dir/bufferevent.c.o CMakeFiles/event_extra.dir/bufferevent_filter.c.o CMakeFiles/event_extra.dir/bufferevent_pair.c.o CMakeFiles/event_extra.dir/bufferevent_ratelim.c.o CMakeFiles/event_extra.dir/bufferevent_sock.c.o CMakeFiles/event_extra.dir/event.c.o CMakeFiles/event_extra.dir/evmap.c.o CMakeFiles/event_extra.dir/evthread.c.o CMakeFiles/event_extra.dir/evutil.c.o CMakeFiles/event_extra.dir/evutil_rand.c.o CMakeFiles/event_extra.dir/evutil_time.c.o CMakeFiles/event_extra.dir/listener.c.o CMakeFiles/event_extra.dir/log.c.o CMakeFiles/event_extra.dir/signal.c.o CMakeFiles/event_extra.dir/strlcpy.c.o CMakeFiles/event_extra.dir/select.c.o CMakeFiles/event_extra.dir/poll.c.o CMakeFiles/event_extra.dir/kqueue.c.o CMakeFiles/event_extra.dir/evthread_pthread.c.o CMakeFiles/event_extra.dir/event_tagging.c.o CMakeFiles/event_extra.dir/http.c.o CMakeFiles/event_extra.dir/evdns.c.o CMakeFiles/event_extra.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent_extra.a
[ 9%] Built target event_extra
[ 9%] Linking C static library lib/libevent.a
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent.a CMakeFiles/event.dir/buffer.c.o CMakeFiles/event.dir/bufferevent.c.o CMakeFiles/event.dir/bufferevent_filter.c.o CMakeFiles/event.dir/bufferevent_pair.c.o CMakeFiles/event.dir/bufferevent_ratelim.c.o CMakeFiles/event.dir/bufferevent_sock.c.o CMakeFiles/event.dir/event.c.o CMakeFiles/event.dir/evmap.c.o CMakeFiles/event.dir/evthread.c.o CMakeFiles/event.dir/evutil.c.o CMakeFiles/event.dir/evutil_rand.c.o CMakeFiles/event.dir/evutil_time.c.o CMakeFiles/event.dir/listener.c.o CMakeFiles/event.dir/log.c.o CMakeFiles/event.dir/signal.c.o CMakeFiles/event.dir/strlcpy.c.o CMakeFiles/event.dir/select.c.o CMakeFiles/event.dir/poll.c.o CMakeFiles/event.dir/kqueue.c.o CMakeFiles/event.dir/evthread_pthread.c.o CMakeFiles/event.dir/event_tagging.c.o CMakeFiles/event.dir/http.c.o CMakeFiles/event.dir/evdns.c.o CMakeFiles/event.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent.a
[ 9%] Built target event
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
getting the same make error. I searched on google but not found anything relevant.
Since you're trying to install a deprecated package that won't be translated to the M1 architecture, my recommendation is to use Rosetta to install it.
You can follow the steps here to setup a terminal running with Rosetta.
You'll know you're in a Rosetta terminal when you get i386 when running the arch command in your terminal.
Perform the installation steps there using homebrew. Please note the slightly different installation folder when installing with a Rosetta terminal vs native terminal.
The service should run using brew services start mysql#5.6.
While verifying cuDNN install on Linux as the docs implied:
Compile the mnistCUDNN sample. $make clean && make
I encountered error as below:
XXX#XXX ~/cudnn_samples_v7-master/mnistCUDNN $ make clean && make
rm -rf *o
rm -rf mnistCUDNN
/usr/local/cuda/bin/nvcc -ccbin g++ -I/usr/local/cuda/include -IFreeImage/include -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o fp16_dev.o -c fp16_dev.cu
g++ -I/usr/local/cuda/include -IFreeImage/include -o fp16_emu.o -c fp16_emu.cpp
In file included from fp16_emu.cpp:50:
fp16_emu.h:55:10: fatal error: driver_types.h: No such file or directory
#include <driver_types.h>
^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:200: fp16_emu.o] Error 1
I tried:
sudo find / -name driver_types.h
And I found driver_types.h is actually in
/usr/local/cuda/targets/x86_64-linux/include/
rather than
/usr/local/cuda/include .
So I replace the
CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/include
with
CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/targets/x86_64-linux/include
in cudnn_samples_v7/mnistCUDNN/Makefile
And the problem was solved. I hope this would help someone.
Platform & Versions:
Ubuntu18.04
CUDA Version: 10.2
cuDNN Version: 7.6.5.32
driver_types.h is actually in /usr/local/cuda/targets/x86_64-linux/include
Replace the
CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/include
with
CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/targets/x86_64-linux/include
in cudnn_samples_v7/mnistCUDNN/Makefile
Assuming you are using cuda 9. In Ubuntu I put these exports in my .profile. If your .profile is empty then this is not the place to put it. You will have to figure that out yourself. This is in the cuda documentation. You will want to leave out the numbers at the beginning.
sudo nano $HOME/.profile
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
It might also be due to some 3rd party packages. In the cuda documentation it says to get these if you want to use the samples.
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
I also did a quick google search and saw on the third link something about “How To Install and Use FreeImage” it gave a library. So if the other things didn’t work try using the packages below.
sudo apt-get install libfreeimage3 libfreeimage-dev
If that doesn’t work use the Ubuntu that is supported with your cuda and cudnn version and do the things I put above. You probably don’t need to do the last one, though.
Source: https://forums.developer.nvidia.com/t/freeimage-is-not-set-up-correctly-please-ensure-freeimae-is-set-up-correctly/66950
I would like install correctly Opencv_contrib for Text_recognition. Have you a idea to the good process?
Before I install Opencv 3.1.0 and opencv_contrib, I install leptonia-1.73, protobuf, caffe, and after Tesseract. After I start to install Opencv 3.1.0 and opencv_contrib.
But I don't use Texte module
Process:
1. Install leptonia :
$ sudo apt-get install autoconf automake libtool
$ sudo apt-get install libpng12-dev
$ sudo apt-get install libjpeg62-dev
$ sudo apt-get install libtiff4-dev
$ sudo apt-get install zlib1g-dev
$ sudo apt-get install libicu-dev
$ sudo apt-get install libpango1.0-dev
$ sudo apt-get install libcairo2-dev
$ wget http://www.leptonica.org/source/leptonica-1.73.tar.gz
$ tar -zxvf leptonica-1.73.tar.gz
$ cd leptonica-1.73
$ ./autogen.sh
$ ./configure
$ make
$ sudo checkinstall
$ sudo ldconfig
2. Install protobuf
like "https:"//launchpad."net/ubuntu/trusty/"+package/protobuf-compiler"
3. Install Caffe
like "http:"//caffe."berkeleyvision."org"/install_apt"."html
4. Install Opencv 3.1.0 with Opencv_extra_module_path
$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..
Warning message:
Warning message is : joboxlearning#joboxlearning-VirtualBox:~/OpenCV/workspace/text_recognition$ ./Text_recognition 2856985-origpic-28a761.jpg
./Text_recognition
Demo program of the Extremal Region Filter algorithm described in
Neumann L., Matas J.: Real-Time Scene Text Localization and Recognition, CVPR 2012
init done
opengl support available
OpenCV Error: Bad argument (Default classifier file not found!) in ERClassifierNM1, file /home/joboxlearning/OpenCV/opencv_contrib/modules/text/src/erfilter.cpp, line 1035
terminate called after throwing an instance of 'cv::Exception'
what(): /home/joboxlearning/OpenCV/opencv_contrib/modules/text/src/erfilter.cpp:1035: error: (-5) Default classifier file not found! in function ERClassifierNM1
Abandon (core dumped)
Check this Dockerfile (https://gist.github.com/joost/52d59321abe31884ab818b806c69426b) it shows all steps to install OpenCV 3.1 with Tesseract and Python bindings. You should be able to use all features like OCR and ERFilter.
To test them open python:
>>> import cv2
>>> cv2.__version__
'3.1.0'
>>> cv2.text # should return the module
First I wanted to build the DBD::mysql package. That kept failing because whatever make resulted in could not be loaded for the tests with a Symbol not found: _is_prefix. So I assumed that cpan might be a tad old. I know it's a random assumption, but cpan did tell me to install the latest Bundle::CPAN.
Who's successfully installed either DBD::mysql or Bundle::CPAN on Mac OS X 10.5? Could you recommend any thing I could be doing differently?
This is perl, v5.8.8 built for darwin-thread-multi-2level
(with 4 registered patches, see perl -V for more detail)
/usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.1.36,
for apple-darwin9.5.0 (i386) using readline 5.1
Here's a log of the CPAN output for DBD::mysql:
Writing Makefile for DBD::mysql
cc -c -I/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI -I/usr/local/mysql/include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch ppc -arch i386 -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3 -DVERSION=\"4.012\" -DXS_VERSION=\"4.012\" "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" dbdimp.c
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/Driver.xst > mysql.xsi
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
/usr/bin/perl /System/Library/Perl/5.8.8/ExtUtils/xsubpp -typemap /System/Library/Perl/5.8.8/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Warning: duplicate function definition 'do' detected in mysql.xs, line 225
Warning: duplicate function definition 'rows' detected in mysql.xs, line 650
cc -c -I/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI -I/usr/local/mysql/include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch ppc -arch i386 -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3 -DVERSION=\"4.012\" -DXS_VERSION=\"4.012\" "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE" mysql.c
dbdimp.c: In function 'mysql_describe':
dbdimp.c:3309: warning: assignment from incompatible pointer type
dbdimp.c: In function 'mysql_describe':
dbdimp.c:3309: warning: assignment from incompatible pointer type
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/local/mysql/lib" /usr/bin/perl myld cc -mmacosx-version-min=10.5.7 -arch ppc -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.bundle \
-L/usr/local/mysql/lib -lmysqlclient -lz -lm \
chmod 755 blib/arch/auto/DBD/mysql/mysql.bundle
Manifying blib/man3/DBD::mysql.3pm
Manifying blib/man3/DBD::mysql::INSTALL.3pm
Manifying blib/man3/Bundle::DBD::mysql.3pm
CAPTTOFU/DBD-mysql-4.012.tar.gz
/usr/bin/make -j3 -j3 -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.t .................. 1/6 Bailout called. Further testing stopped: Unable to load DBD::mysql
# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't load '/Users/dlamblin/.cpan/build/DBD-mysql-4.012-4n3pv8/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/dlamblin/.cpan/build/DBD-mysql-4.012-4n3pv8/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _is_prefix
# Referenced from: /Users/dlamblin/.cpan/build/DBD-mysql-4.012-4n3pv8/blib/arch/auto/DBD/mysql/mysql.bundle
# Expected in: dynamic lookup
# at (eval 7) line 2
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 255
CAPTTOFU/DBD-mysql-4.012.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports CAPTTOFU/DBD-mysql-4.012.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
CAPTTOFU/DBD-mysql-4.012.tar.gz : make_test NO
Okay, if you get these errors I now know the following:
MySQL 5.1 for Mac OS X x86_64 is not compatible with DBD::mysql (yet). Install the 32-bit x86 version, and try again. You'll succeed. I wish the perl Makefile.pl would just tell you that in a banner.
Bundle::CPAN had issues because I wasn't installing as root. Why that makes it report circular references instead of installation permission issues, I'll never understand.
Please add a comment if and when this became outdated information.
Installing the (beta) 5.4.1 64 bit version of mysql, available from their developer website, fixes the issue. Tested on Snow Leopard.
Did you try installing Bundle::DBD::mysql?
I haven't dealt with this problem, but I found that MacPorts cleaned up all my UNIX incompatibility problems. You might want to try that before enduring too much pain and suffering.
Where is it complaining about a circular dependency? It looks like you are trying to link to an incompatible version of the mysql libraries. The symbol it's looking for isn't in the library you loaded. I don't think this is a problem caused by CPAN.pm or the cpan script.
Some questions:
Who compiled perl? Is this Apple's perl?
Who compiled mysql? Is that your own version since it's in /usr/local?
Did you previously compile other versions? I start with a compile to ensure everything points to the right places.
Installing latest beta 64bit version of Mysql fixed problem on my computer.