Trying to Run middleman on mac - ruby

Answering my own question for anyone else having this issue. (using the search terms i thought of because they didn't bring up the answers for me).
Trying to install and run middleman following the getting started guide on their website with Mac OS X 10.9.2. When trying to run bundle install getting errors about openSSL and event machine.
Gist of Errors.
Refrence to an answer that someone on IRC helped me find.

Aparently this is caused by a mismatch in expected versions with something called Clang which is part of the Xcode tools for mac. The update to Xcode tools causes this to fail. Using the command:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install
seems to work to resolve this issue.

Related

Mac cmake: 'stdio.h' file not found

I have been stuck on this for a while, and I was wondering if I could get some help.
I'm currently stuck trying to run a cmake setup file and I'm constantly getting this error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:15: fatal error: 'stdio.h' file not found
I've been looking online, and haven't been able to find anything recent. I've tried using the xcode-select --install already.
cmake version is currently 3.21.3.
The library I'm trying to install is https://github.com/google/draco, where I'm trying to install python functions using pybind11. I was able to install this library through cmake, whoever when I try to install the pybind11 functionality I keep getting this error. This library seemed to function properly on a coworkers linux machine, and they were running cmake 3.20.4 on ubuntu 18.04 (I don't know if this makes a difference)
Any help would be appreciated, and please let me know if there's any other information that can help the process.
It looks like something in XCode has changed after updating MacOS to 12.3. I had to reinstall XCode command line tools. I don't say it's right solution, but it works for me.
Commands for reinstalling (from https://stackoverflow.com/a/47804075):
removing the old tools ($ sudo rm -rf /Library/Developer/CommandLineTools)
install xcode command line tools again ($ xcode-select --install).

How can I avoid this ruby illegal instruction error when updating a cocoapod?

tldr: Ruby is reporting an illegal instruction when I try to update my pod, maybe because I’m using two different versions of it.
I am not sure what my problem is, and I’ll happily add more information should it be helpful.
I got a new M1 Pro Mac and have been trying to get an XCode project (an iOS app) to work on it. It happily builds for my phone but fails to build for simulators. Based on this answer, I tried to update cocoapods and then the pods I’m using for my project (some of the Google Firebase pods). When I run pod update, I get the following result:
Update all pods
Updating local specs repositories
/Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:36: [BUG] Illegal instruction at 0x0000000100224000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
This is then followed by several hundred lines of reporting (saved here). It also saves a diagnostic report (here). I believe that both of these are red herrings, but I wanted to include them just in case.
My guess for what’s going wrong is that the library is 2.6.0, while ruby itself is version 2.6.8. Both of these are old, and they’re also different versions. I tried to update ruby, gem, and reinstalled cocoapods, but none of these changed these version numbers. Any help getting these versions updated would be appreciated.
My apologies for such an indirect question; if I were more sure what the problem was, I probably would have solved it.
If you are on an M1 chip, uninstall the cocoapods package through gem (sudo gem uninstall cocoapods) and reinstalling it with homebrew (brew install cocoapods), this fixed my problem.
I believe the issue was that my newly updated ruby versions weren’t being copied to my homebrew path. This command (from this answer) ended up solving it!
PATH=/usr/local/opt/ruby/bin:$PATH
GEMSDIR=$(gem environment gemdir)/bin
PATH=$GEMSDIR:$PATH
export PATH

google-cloud-sdk .bash.inc not found after upgrading to macOS Catalina

I am encountering the following messages after upgrading to macOS Catalina on my terminal whenever I start up a new terminal:
/Users/<myname>/Downloads/google-cloud-sdk/path.bash.inc:3: = not found
/Users/<myname>/Downloads/google-cloud-sdk/completion.bash.inc:56: command not found: complete
/Users/<myname>/Downloads/google-cloud-sdk/completion.bash.inc:81: command not found: complete
/Users/<myname>/Downloads/google-cloud-sdk/completion.bash.inc:82: command not found: complete
I have re-run the ./install.sh command and gcloud commands work fine. How do I remove the above messages, or is there something else that is still missing?
EDIT:
Upgraded to macOS 10.15.4 and installed google-cloud-sdk is from here, the macOS 64-bit version.
I solved the same issue by following the instruction: https://gist.github.com/dwchiang/10849350. Simply, change the path.bash.inc into path.zsh.inc in ~/.bash_profile, same as the completion.zsh.inc.
This seems to be an issue with the fact that Cloud SDK is assuming that you are using bash while Catalina now uses Zsh by default as mentioned here. You may be able to remove the error by changing to bash by following the instructions over the link I shared, however, I can not test this out at the moment.
I also recommend you to report this issue to Google directly over at their issue reporting page so it can be reviewed and corrected if possible.
Additionally, make sure that you are using the latest Cloud SDK version by running the gcloud components update so that you can better report this on the issue.
I hope you find this information useful.

Xcode and flutter compiler error: reading from wrong directory

I am getting this error and my app will not compile. The problem is that I had to upgrade macos to be able to compile apps on newer iOS versions, and in doing so I copied my project over from my mojave machine to my catalina one. The directory users/mojave no longer exists, and it needs to be replaced with users/catalina
I have searched the app for any reference of mojave anywhere, and replaced it all with catalina. I have rebooted macos, and it still fails, looking for this old directory.
How do I find and change these references? I am not able to find anything online, possibly because I don't really know how to phrase this question.
So this is another one of those occasions where the error doesn't really indicate what is wrong here.
The problem was that "pods setup" had not been run, so it had not initialised.
The reason for this is that when I ran "pod setup" it does literally nothing.
Researching this issue online, it seems an issue since cocoapods 1.8.0, and the dev team said that they had hotfixed this issue and it would be available from version 1.8.1
Well, this was version 1.8.4 and it is still broken with exactly the same issue.
The fix was to uninstall it completely:
sudo gem uninstall cocoapods
And then install version 1.7.5:
sudo gemo install cocoapods --version 1.7.5
From here, with the older version installed that actually works, "pod setup" runs fine, pods is initialised and the app no longer looks in the incorrect folders.
Hope this helps someone.

Problem installing node on Mac OSX 10.6.7

I'm getting this error when I try and install node on my new mac
error: could not configure a cxx compiler!
The error always occurs when I get to the ./configure part of the installation
I found this problem which applies to a linux build with the same error, but the solution does not seem to apply in my case:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
I also took a look at the troubleshoot guide on the node wiki here:
https://github.com/joyent/node/wiki/Troubleshooting-Installation
and tried this solution:
export PATH=/Developer/usr/bin:$PATH
ISYSROOT="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
export LINKFLAGS=$ISYSROOT CXXFLAGS=$ISYSROOT CFLAGS=$ISYSROOT
./configure --prefix=$HOME --without-ssl
make
But I get the same problem when I get to the ./configure step
Any advice, insights or help would be much appreciated here.
Thanks
When you install Mac OS X Developer Tools (XCode, etc) ensure you have the Unix Tools option checked. I had to remember to install Developer Tools/Unix tools when I set up my new MBP and it resolved this error for me.
Optionally, you could remove and try installing with Homebrew. However, it still has the same requirements (XCode/Dev Tools) so ensure that you have those installed.
Hope this helps.
I had this problem too, I resolved this in a different way, as far as I know xcode 4.3.1 doesnt come with an Install Xcode.app file from the appstore, if you are under this case, just run xcode, go to preferences -> downloads and click on the Install button for the command line tools option. I did just that and all the errors on the .configure and make commands were gone :)
I had the same problem on OSX 10.7 with Xcode 4.2. I was trying to build node v0.4.7. I kept getting "unable to configure a c compiler" error. What finally worked for me is installing the GCC compiler seperately. I found a nice package for that here:
https://github.com/kennethreitz/osx-gcc-installer/
configure is currently broken for some versions of MacOS; for more details, see How to compile Node.js v0.4.2 on MacOS 10.5.8. The working approach cited there is as follows:
export PATH=/Developer/usr/bin:$PATH
ISYSROOT="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
export LINKFLAGS=$ISYSROOT CXXFLAGS=$ISYSROOT CFLAGS=$ISYSROOT
./configure --prefix=$HOME --without-ssl
make
This worked for me .
Al
After installing XCode 4.3.2 (in Mac OS X Lion) I still had the error.
Open XCode, Preferences, Downloads and installed Command Line Tools.
After it gets installed ./configure runs ok.

Resources