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.
Related
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.
I've tried following the intel instructions to install sgx, but it requires the sgx_linux_x64_psw_.bin file, which i cannot find anywhere. I've got the driver installer (sgx_linux_x64_driver_1.35.bin) and the sdk installer(sgx_linux_x64_sdk_2.10.100.2.bin), intel seems not to have a psw for linux? If so, how do i properly work with sgx? I tried simply executing the driver and sdk .bin files, but the sample code in the sdk would not compile (after make SGX_MODE=SIM), even after setting the sgxsdk directory to /opt/intel/sgxsdk. I'd get the following compile error:
/usr/bin/ld: warning: libsgx_uae_service_sim.so, needed by /opt/intel/sgxsdk/lib64/libsgx_urts_sim.so, not found (try using -rpath or -rpath-link)
/opt/intel/sgxsdk/lib64/libsgx_urts_sim.so: undefined reference to `get_launch_token'
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'app' failed
make[1]: * [app] Error 1
make[1]: Leaving directory '/opt/intel/sgxsdk/SampleCode/SampleEnclave'
Makefile:180: recipe for target 'all' failed
make: * [all] Error 2
Any help with either issue would be much appreciated!
So at least in my case, it seems the issue was that I was A, using a virtual machine, which can ONLY run in simulation mode, so getting a fully working version of sgx is impossible. Secondly, I was using an outdated installation guide, for anyone else trying to use this stuff, make sure to get the installation guide from the intel download page along with the version you are downloading.
download source code from https://github.com/intel/linux-sgx, compile according to the instructions and then install psw.
I'm trying to instal Cilk Plus compiler, on a iMac with macOS Catalina and Xcode 11 with this guidelines,
I used the command
cmake -G "Unix Makefiles" -DINTEL_SPECIFIC_CILKPLUS=1 -DCMAKE_INSTALL_PREFIX=/install/prefix -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
to create the binaries, and when I try to instal with the command
make && make install
show me the error
/cilk/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:144:22: error: conflicting types for 'dispatch_sync' DISPATCH_INTERCEPT_B(dispatch_sync)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/queue.h:288:1: note: previous declaration is here dispatch_sync(dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:145:22: error: conflicting types for 'dispatch_barrier_sync' DISPATCH_INTERCEPT_B(dispatch_barrier_sync)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/queue.h:1363:1: note: previous declaration is here dispatch_barrier_sync(dispatch_queue_t queue,
/cilk/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:162:24: error: conflicting types for 'dispatch_once' TSAN_INTERCEPTOR(void, dispatch_once, dispatch_once_t *predicate,
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/dispatch/once.h:73:1: note: previous declaration is here
dispatch_once(dispatch_once_t *predicate,
3 errors generated.
make[2]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o] Error 1
make[1]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_osx_dynamic.dir/all] Error 2
make: *** [all] Error 2
so my question is, Cilk plus is compatible with macOS Catalina and Xcode 11? if it is how I can solve this errors
Intel Cilk Plus was deprecated in 2018, so there is little chance that it works on the latest platform.
I seem to be having an issue with macOS SDK headers on the command line after upgrading to Xcode 10. I know Apple added macOS_SDK_headers_for_macOS_10.14.pkg in /Library/Developer/CommandLineTools/Packages, which I have installed - but unfortunately that doesn't seem to have helped. Are there any other changes in Xcode 10 I may have missed?
Here is the log:
20:54.19 In file included from /Users/<user>/Workspace/modules/brotli/enc/backward_references.cc:9:
20:54.19 /Users/<user>/Workspace/modules/brotli/enc/./backward_references.h:12:10: fatal error: 'vector' file not found
20:54.19 #include <vector>
20:54.19 ^~~~~~~~
20:54.23 1 error generated.
20:54.23 make[5]: *** [host_backward_references.o] Error 1
20:54.23 make[4]: *** [modules/brotli/host] Error 2
20:54.23 make[4]: *** Waiting for unfinished jobs....
I encountered this after upgrading to Xcode 10 on a project that depends on libstdc++ (and for reasons not relevant to the present discussion, cannot be upgraded to libc++).
Since Xcode 10 removes support for libstdc++, I had to copy the relevant assets from an old installation of Xcode 9. (Thankfully I had an old machine handy to do so.)
I had to take the libstdc++.6.0.9.tbd binary (and recreate the symlinks libstdc++.6.tbd and libstdc++.tbd pointing to it) from:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
into the same place on the new, Xcode 10 machine.
In addition, I had to copy over the C++ headers at:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/
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