I am attempting to install OpenCv on my Mac Pro (and I have already succesfully installed it on my Macbook), however I am getting an error message when doing
sudo make install
in the directory I am striving to install it in. I am running Snow Leopard (10.6.8) and have Xcode (as well as MacPorts) installed. My question is similar to this one (which is unanswered as of today): Trying to install opencv using homebrew. ERROR: modules/highgui/CMakeFiles/opencv_highgui.dir/all Error 2
The following is the error message:
[ 67%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/error.cpp.o
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:
In function ‘const char* cv::ocl::getOpenCLErrorString(int)’:
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:82:
error: ‘CL_MISALIGNED_SUB_BUFFER_OFFSET’ was not declared in this scope
/Users/maxweissenbacher/Documents/OpenCV/opencv-2.4.5/modules/ocl/src/error.cpp:84:
error: ‘CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST’ was not declared in this scope
make[2]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/src/error.cpp.o] Error 1
make[1]: *** [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2
make: *** [all] Error 2
I appreciate any help.
Thanks in advance,
Max.
Looks like you can't install it on Snow Leopard, at least without some additional manipulations with sources.The reason is OpenCL version.
Take a look at this thread for additional info
Related
I have recently purchased an M1 MacBook Pro and I am having issues installing valgrind on macOS Big Sur.
What I have tried so far is:
brew install valgrind which pops the error (brew is updated)
Error: invalid attribute for formula 'valgrind': version (nil)
edited head as indicated here
download manually from GitHub following all indications listed but I get
Last 15 lines from /Users/homeuser/Library/Logs/Homebrew/valgrind/03.make:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:254:9: error: unknown type name '_STRUCT_X86_DEBUG_STATE64'
typedef _STRUCT_X86_DEBUG_STATE64 x86_debug_state64_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:260:9: error: unknown type name '_STRUCT_X86_PAGEIN_STATE'
typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:266:9: error: unknown type name '_STRUCT_X86_INSTRUCTION_STATE'
typedef _STRUCT_X86_INSTRUCTION_STATE x86_instruction_state_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [fixup_macho_loadcmds] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
looked into this older fix that used to work
Unfortunately none of the methods work so I would really appreciate a solve to this problem as I need to use valgrind on a daily basis for university homework.
Definitive answer. See the configure.ac autoconf file for the exact details. Starting from line 5021 [which may change in future versions, obviously] there is a switch on the kernel versions.
The last version of macOS officially supported by Valgrind was 10.13 on Intel. Neither macOS 11/12 (any architecture) nor ARM are supported.
Getting Valgrind to work on macOS 11/12 ARM hardware would require
filling in all of the gaps from 10.13 to 11/12
ARM assembly code for low level functions like syscalls
There is Linux ARM support, so the second point might not be so difficult. I don't have an ARM based mac, so I'm not vounteering for the moment.
I'm trying to install a specific version of cURL instead of the latest version (through homebrew). I've extracted Curl 7.54.0 source and executed the following commands
./configure --prefix=$HOME/curl
make
make install
Getting error in second command as follows
connect.c:1086:12: error: 'connectx' is only available on macOS 10.11 or newer
[-Werror,-Wunguarded-availability]
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/socket.h:723:5: note:
'connectx' has been marked as being introduced in macOS 10.11 here, but
the deployment target is macOS 10.8.0
int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,
^
connect.c:1086:12: note: enclose 'connectx' in a __builtin_available check to
silence this warning
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
1 error generated.
make[2]: *** [libcurl_la-connect.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
Although current MacOS version is higher than 10.11, unable to determine the rootcause of this error.
For anyone who brushes upon this issue in the future. The easy solution is to pass in -Wno-error in CFLAGS.
The final command is make CFLAGS=-Wno-error.
'QTKit/QTKit.h' file not found
#import <QTKit/QTKit.h>
^
1 error generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2
JefferydeMacBook-Pro:build jefferyfan$ cd ~
JefferydeMacBook-Pro:~ jefferyfan$ brew install QTKit
Error: No available formula with the name "qtkit"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
This error shows up.
and Homebrew have problems as well.
Just use
brew install opencv3 --HEAD --with-contrib
It works fine for me.
In macOS 10.12, apple removed most of QTKit's components, include some functions and header files opencv use, so opencv 3 can't compile on macOS 10.12 (eg. header file "QTKit/QTKit.h" file has been removed, which is included in "cap_qtkit.mm").
Source
Currently the only way to compile OpenCV on Sierra is to disable the modules using QTKit. Just add this flag when you run cmake to disable it.
cmake -DBUILD_opencv_videoio=OFF
I try to install Ruby on a clean server.
Server was a Debian 6.0.9 which I upgraded to Debian 7.5
I've installed RBEnv with build-support via apt-get install.
When I try to install Ruby 1.9.3-p194 (summed in the list via ruby-build --definitions), I got an error the installation failed.
When I check the error in the log file, I got next error:
make[2]: Entering directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
compiling ossl_pkey_rsa.c
compiling ossl_asn1.c
compiling callback-4.c
compiling ossl_x509.c
compiling ossl_pkcs5.c
compiling ossl_x509crl.c
compiling ossl_rand.c
compiling ossl_pkey_dsa.c
compiling ossl_x509cert.c
compiling ossl_ssl_session.c
compiling ossl_config.c
compiling callback-5.c
compiling ossl_engine.c
compiling ossl_pkey_ec.c
compiling ossl_bn.c
compiling ossl_x509name.c
compiling ossl_ssl.c
ossl_ssl.c: In function 'Init_ossl_ssl':
ossl_ssl.c:1982:5: error: 'SSL_OP_MSIE_SSLV2_RSA_PADDING' undeclared (first use in this function)
ossl_ssl.c:1982:5: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling callback-6.c
compiling callback-7.c
compiling callback-8.c
linking shared-object dl/callback.so
make[2]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/dl/callback'
make[1]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194'
make: *** [build-ext] Error 2
I've installed/updated the openSSL version (OpenSSL 1.0.1e 11 Feb 2013) and installed libssl-dev, but the error stays.
Anyone an idea what I'm missing to have SSL_OP_MSIE_SSLV2_RSA_PADDING declared?
Is this an error in the Ruby-installation, or do I have a setup issue somewhere else?
All advice is welcome :)
(I already spend some time googling this, search on lot of sites, I guess I'm looking for the wrong solutions..)
-- Edit:
I found Ruby 2.1 fails to install due to OpenSSL error where it said the macro is removed in latest OPEN_SSL, does this mean I cannot use Ruby 1.9.x anymore? When I list ruby versions available via rbenv, no stable ruby 2 is listed + I prefer to keep using Ruby 1.9. Should I downgrade open_ssl (not wise idea) or ?
It looks like the define was dropped sometime after 1.0.1e-2+deb7u6, certainly is not present in 1.0.1e-2+deb7u10.
I worked around this by adding
#define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x00000040L /* no effect since 0.9.7h and 0.9.8b */
back to /usr/include/openssl/ssl.h. (Picked from 1.0.1e-2+deb7u6)
Do at your own risk, I have not investigated what will happen if that value is passed.
Hi
when trying to compile Ruby Enterprise Edition 2010.02
readline.c: In function ‘username_completion_proc_call’:
readline.c:734: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:734: error: (Each undeclared identifier is reported only once
readline.c:734: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
I tried also specifying the option -c '--with-readline-path=/usr/local' (where I installed the readline libs), but I have the same issue.
I tried to install readline with port and delete my manual compile, but the problem still there.
I never had troubles under Linux (the system I'm used to), having ldconfig, etc...
HELP! :)
Thanks
Have you tried using RVM (Ruby Version Manager)?
Ok, I resolved in this way:
I compiled readline 5.2 following this guide
http://techdebug.com/blog/2009/01/03/compiling-readline-on-an-osx-105-intel-x86_64/
readline 6.1 does not work with ree.
Doing the installation with the following:
./installer -c '--with-readline-dir=PATH'
works fine