I have an older powerbook running 10.4. It has Ruby 1.8.2 on it but I want to upgrade to 1.9. Other people suggested using macports and I tried it but am getting some weird errors. Can anyone assist?
sudo port install ruby19 +nosuffix
---> Computing dependencies for ruby19
---> Configuring gperf
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gperf/work/gperf-3.0.4" && ./configure --prefix=/opt/local --infodir=/opt/local/share/info " returned error 1
Command output: checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
=== configuring in lib (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gperf/work/gperf-3.0.4/lib)
configure: running /bin/sh ./configure '--prefix=/opt/local' '--infodir=/opt/local/share/info' --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/gcc-4.0
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
configure: error: ./configure failed for lib
Error: The following dependencies failed to build: libiconv gperf ncurses ncursesw openssl zlib readline
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.
You need to install Xcode. I think the latest for 10.4 is Xcode 2.5. From http://www.macports.org/install.php :
Please note that in order to install and run MacPorts on Mac OS X, your system must have installations of the following components:
Apple's Xcode Developer Tools (version 3.2.1 or later for Snow Leopard,
3.1.4 or later for
Leopard, or 2.5 for Tiger), found at the Apple Developer Connection
site or on your Mac OS X installation CDs/DVD. Ensure that the optional components for command line development are installed ("Unix Development" in the Xcode 3.x installer).
The X11 windowing environment (A.K.A. “X11 User”) for ports that depend on the functionality it provides to run.
*The “X11 User” package is an optional installation on your system CDs/DVD for Tiger, enabled through the “Customize” button of the installer, whereas it is included by default on Leopard and Snow Leopard.
*You can use the xorg-server port instead of Apple's X11.app if you wish.
Check your mac installation disc or download it from apple here (you'll need ADC membership which is free):
http://developer.apple.com/technology/xcode.html
Related
I tried to install Valgrind with the command "brew install valgrind" and I get a message that says:
"valgrind: This formula either does not compile or function as expected on macOS versions newer than Sierra due to an upstream incompatibility. Error: An unsatisfied requirement failed this build."
I also tried to "brew edit valgrind" and replace "sourceware.org/git/valgrind.git" with "git://sourceware.org/git/valgrind.git" in head section of the code, then wrote on Iterm "brew install --HEAD valgrind" but it gives me:
Last 15 lines from /Users/m/Library/Logs/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... yes
checking for a 32-bit only build... no
checking for a supported OS... ok (darwin)
checking for the kernel version... unsupported (19.0.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)
READ THIS: https://docs.brew.sh/Troubleshooting
See https://github.com/LouisBrunner/valgrind-macos/.
Either try
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
Or compile it from the source, if the above method doesn't work. (But they should have fixed the above method just recently.)
git clone https://github.com/LouisBrunner/valgrind-macos.git
cd valgrind-macos
./autogen.sh
./configure --prefix=/where/you/want/it/installed --enable-only64bit
make
sudo make install
Enjoy!
https://github.com/sowson/valgrind
brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb
MacOS Catalina (10.15.4), I was able to confirm the operation.
I have some old source code that runs on ruby 1.8 and rails 2.3 . I have rbenv on my system. How can I install exactly this version of ruby (v1.8.6) with rbenv?
$ rbenv install 1.8.6
Downloading ruby-1.8.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
Installing ruby-1.8.6...
WARNING: ruby-1.8.6 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: use readline from homebrew
BUILD FAILED (OS X 10.14.2 using ruby-build 20190423)
Inspect or clean up the working tree at /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412
Results logged to /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412.log
Last 10 log lines:
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
/var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412/ruby-1.8.6 /var/folders/_w/98n31_kn03qfjt51p2hmrfqh0000gp/T/ruby-build.20190701155134.45412 ~
checking build system type... i686-apple-darwin18.2.0
checking host system type... i686-apple-darwin18.2.0
checking target system type... i686-apple-darwin18.2.0
checking for gcc... /usr/local/bin/gcc-4.2
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** No targets specified and no makefile found. Stop.
I've tried this solution but it does not work for me...
https://github.com/rbenv/ruby-build/issues/999
Any ideas?
To get support I am installing fink on my MacBook Pro. After execute bootstrap script I am getting following error log
Checking package... looks good (fink-0.35.1).
Checking system... i386-apple-darwin12.4.0
This system is supported and tested.
Distribution: 10.8
Architecture: x86_64
Checking cc... not found.
ERROR: There is no C compiler on your system. Make sure that the Developer
Tools are installed.
I didn't find gcc in /usr/bin/ directory.
After reading here, I am guessing x-code provide default support for gcc compiler.
any one have idea what I should to get support of fink or if have any other way to get support of apt-get.
First, you need to install Xcode and its command line tools to get the gcc compiler
Make sure that you have working version of gcc in your /usr/bin directory
Create a symbolic link cc from installed gcc in /usr/bin
I followed the instructions in BUILDING.txt in the native directory and executed
./configure --with-apxs=/usr/sbin/apxs
Here is some of the output
building connector for "apache-2.0"
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
Naturally, I searched StackOverflow for solutions since gcc was not in /usr/bin. So I popped open XCode and installed Command Line Tools. GCC was now in /usr/bin ... but I keep getting the same error.
Any ideas?
After an hour of digging, I finally ran into this post and added my responses that took care of my problem.
So first you need to install Command Line Tools from XCode THEN you have to create this symlink by executing
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
This is a problem in the APXS supplied by apple in Mac OS X 10.8. The configure script tries to find the C compiler by executing /usr/sbin/apxs -q CC. The path output is either incorrect OR Apple forgot to create the symlink for you upon install 10.8.
Once you create the symlink, everything will be ok and you'll be able to compile mod_jk
I had Xcode 4.1 preview 5 working fine but decided to upgrade to the final xcode 4.1 thru the App store. I uninstalled Xcode first...
sudo /Developer/Library/uninstall-devtools –mode=all
Then installed Xcode thru the app store and rebooted.
I also removed RVM completely but... now whenever I try and install a version of Ruby it fails. In the error file i get this:
[2011-07-27 18:29:25] ./configure --prefix="/Users/holden/.rvm/usr"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/holden/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
There is no gcc-4.2 or any other gcc in the /usr/bin directory.
What's up with Xcode?
Apparently even after downloading and "installing" XCode from the Appstore and despite the long process after downloading where it appears to install it and the words "Installed" eventually become displayed next to it in the store. You must still manually install it again within your applications folder before it will work.
Odd.
Just bought a Mac,
what I had to do to make it work after installing Xcode and seeing that /usr/bin doesn't have gcc, was:
Enter Xcode preferences going over to the downloads tab and install Command Line Tools.
After setting up my developer account and downloading the tools I opened terminal and typed
rvm install 1.9.3 --with-gcc=clang
and everything compiled and works.
Note - after running "Install Xcode" I still only have "gcc" in /usr/bin, not gcc-4.2. But still worked fine, /usr/bin/gcc was a symlink to /usr/bin/llvm-gcc-4.2
Guy's answer above seems to fix the problem compiling Ruby in RVM with XCode 4.2 installed completely, and removed for me to install GCC from https://github.com/kennethreitz/osx-gcc-installer . This is preferable for users needing to have both RVM and XCode 4.2 installed.