I tried to install Ruby 2.2.9 on Big Sur - M1 chipset.
I tried to use RVM, ASDF... but I always get this error during compilation:
encoding.c:825:2: error: implicit declaration of function 'rb_str_change_terminator_length' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rb_str_change_terminator_length(obj, oldtermlen, termlen);
Well the answer would be trial and error by trying older versions of command line tools since it's BigSur I don't now the oldest supported, otherwise you can downgrade to Catalina and use command line tools 11.4.1. The issue is that older ruby versions don't compile because of some clang errors that have to do with the compiler in use at the time (did answer this in a post).
One last very important mention is to use RBENV if is supported on M1 macs.
I answered a similar question but with Catalina. If it helps.
You can also try setting this flag to ignore the errors (before the install process):
export optflags="-Wno-error=implicit-function-declaration"
A workmate found this fix (he's running a macbook 16inch with Big Sur)
Related
so I am having issues with Rosetta, and whenever I want to do any install or use a makefile, I get this error:
rosetta error: /var/db/oah/c642c66595f5050af26db8f86497ea83caff7cea5a9bcb2361ffa81d0e090b58/e3dffc0922c5d9c2da11a427e8274cb75a79f184276373ffc39b65cfa67f4141/libxcrun.dylib.aot: attachment of code signature supplement failed: 1
I am using the newest MacBook Pro M1. Installed using the softwareupdate --install-rosetta.
I can't find anything about it using google, what could be wrong here?
I am currently on Mac OSX Big Sur 11.2.3. Whenever I run the command:
g++-10 -o project0 project0.cpp -lm -fopenmp
I get the following error:
clang: error: invalid version number in '-mmacosx-version-min=11.2'
I realized that this may be due to the fact that I'm on Big Sur 11.2.3 but I was told that this should not be an issue. I've tried many things already such as reinstalling gcc doing brew install gcc and so forth to no avail. At this point, I'm very unsure on what to do. Any help would be very much appreciated!
I ran into the same problem while trying to install fiona. You are correct it is due to Big Sur, as you can see in this article
Follow it and it should sort out the issue. Note, I had to uninstall Command Line tools and re-install it as outlined in this answer.
I ran into a similar issue when I tried to compile a library with clang-9 on an up-to-date system, with clang-9 installed via homebrew:
clang-9: error: invalid version number in '-mmacosx-version-min=12.6'
Updating xcode command line tools doesn't help here, since I actually want / have to use the old compiler. Setting the following environment variable for the build solved the issue:
export SYSTEM_VERSION_COMPAT=1
I'm trying to install OpenCV on Windows and I followed the Installation by Using git-bash (version>=2.14.1) and cmake (version >=3.9.1) tutorial from the official OpenCV documentation but when I run the build operation I get an error.
I'm using:
Windows 10
CMake 3.9.1
Git Bash 2.17.0
TDM64 GCC compiler 5.1.0
Here's the error
In file included from C:\lib\opencv\modules\videoio\src\cap_msmf.cpp:59:0:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:77:50: error: 'MFP_MEDIAITEM_CHARACTERISTICS' has not been declared
STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ MFP_MEDIAITEM_CHARACTERISTICS *pCharacteristics) PURE;
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:79:46: error: 'IMFPMediaPlayer' has not been declared
STDMETHOD_(HRESULT,GetMediaPlayer)(THIS_ IMFPMediaPlayer **ppMediaPlayer) PURE;
Did someone encounter this kind of error?
Yes I also encountered this error (when compiling with MinGW-w64 gcc 8.1).
For you and anybody else who finds this question when this error occurs (like me), here's what solved the issue for me:
When not using Visual Studio, you have to disable some features which are not supported. Build with cmake options WITH_IPP=OFF and WITH_MSMF=OFF
Solution found on opencv answers: http://answers.opencv.org/question/192758/compile-error-when-compiling-for-windows-341-dev/
I just updated to OS X Mavericks and it seems it messed up my whole compiler setup. Not only do I have to reinstall a JDK in order to use a Java compiler, I get the following error when I'm trying to compile C/C++ using GCC/G++:
/usr/local/Cellar/gcc/4.7.2/gcc/lib/gcc/x86_64-apple-darwin12.2.1/4.7.2/../../../../include/c++/4.7.2/cwchar:46:19: fatal error: wchar.h: No such file or directory
Not sure what to think other than upgrading messed it up. My question is: how do I set up g++ to compile on OS X? If it's already set up, what is the problem here?
If I can provide more information, please let me know.
Note: I've installed gcc 4.7 using homebrew, but it doesn't seem to work. When I use g++-4.7 code.cpp specifically, I get the same error.
Installing the Command Line Tools (OS X Mavericks) for Xcode - Late October 2013 solved it for me. Here is the link:
OSX: Xcode Downloads
The often mentioned xcode-select --install command kept saying it cannot find the requested software.
To clarify: You need to already have gcc-4.7 installed using Homebrew. The update to the latest version of CMD Tools only fixes compatibility issues caused by upgrading from Mountain Lion to Mavericks.
I am trying to install dph-examples in mac os x version 10.7.2 and I got this error. How ever on ghci , I can see
ghci>import Data.Array.Parallel.
Data.Array.Parallel.Base Data.Array.Parallel.Base.DTrace Data.Array.Parallel.Base.TracePrim Data.Array.Parallel.Stream
but not Data.Array.Parallel , Data.Array.Parallel.Prelude and Data.Array.Parallel.Prelude.Double. I copied the example ( it uses these libraries ) given on Data-Parallel-Haskell and its working fine. My program is compiling and running so my question is, why i am not able to see these library at ghci prompt. Also i am not able to find the reference for sumP function at the Data-Array-Parallel. I am using ghc-7.2.1.
GHC depends on Xcode 3.2:
The package requires Xcode 3.2 (in particular, the "Unix Development Support") to be already installed.
— GHC 7.2.1 download page
Xcode 3.2 should already come with LLVM, so if it's not already installed, installing it should fix things. If you already have it installed, then your installation might be broken somehow; you could try reinstalling it to make sure. I think Xcode 4 isn't fully supported by GHC yet, so if you have it installed, that might be the problem; you could try uninstalling it and installing 3.2 instead.
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
Perhaps you didn't install LLVM? Go install LLVM.