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
Related
I have a freebsd 8.4 machine. I want to use to use pyinstaller to create a binary for freebsd. However it looks like pyinstaller does not support freebsd by default so i have to go in the bootloader and create stuff specific to the target system.
This is giving me errors that gcc/cc is not found on the system. Here is the first error message
Platform : FreeBSD-64bit detected
Checking for 'gcc' (C compiler) : not found
Checking for 'clang' (C compiler) : not found
So then i try to install gcc via ports. I do this
cd /usr/ports/lang/gcc49
make install
It fails :
checking whether the C compiler works... no
So i checked in the file system and there is no gcc or clang or cc. It only has ccache. Here are the details from /usr/bin
CC -> /usr/local/bin/ccache
gcc -> /usr/local/bin/ccache
There is nothing in /usr/local/bin (either CC or GCC)
so if i just do gcc at the command line i get this :
ccache: FATAL: Could not find compiler "gcc" in PATH
how do i fix this. This thing is driving me nuts. pkg install is also not working with error "No repositories found "
On FreeBSD 8.4 the standard compiler is gcc (4.2), and it's located in /usr/bin. It has to be there.
It seems that ccache installation created some problem removing/overwriting something. ccache package installs compiler links in /usr/local/libexec/ccache, but if you installed it manually I'm not sure what happened.
FreeBSD 8.4 is not maintained anymore and there's no package repository anymore for it.
My suggestion is to update your system to FreeBSD 10.2 and use clang, that's the new standard compiler.
I've been trying to install Ruby 2 on my machine running OSX 10.7 via rvm, but run into compilation issues no matter what I try.
So far, I've tried using the OSX GCC Installer, have reinstalled Xcode twice (tried the DMG first, then the App store), and have reinstalled the command line tools.
Compilation fails for both gcc and clang.
Here is what it is failing on (from ~/.rvm/src/ruby-2.0.0-p247/config.log):
configure:3776: checking whether the C compiler works
configure:3798: /usr/bin/clang --I/usr/local/opt/freetype/include -L/usr/local/opt/freetype/lib conftest.c >&5
clang: error: unsupported option '--I/usr/local/opt/freetype/include'
This causes ./configure to output checking whether the C compiler works... no.
As far as I can see, the correct syntax for the option should be -I, rather than --I - how can I get configure to use the correct option?
EDIT: Compiling from source without using rvm results in the same issue.
It turns out that my CPPFLAGS environment variable was the culprit.
Running CPPFLAGS='-I/usr/local/opt/freetype/include' rvm install ruby-2.0.0-p247 did the trick.
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
The issue I'm having is that gcc (and family) don't appear to be properly setup. I have a 10.7.4 machine that I just installed Xcode on (from the app store). I've done no prior development on this machine.
Working w/in Xcode seems to work fine. I can build and compile no problem. However, trying to execute gcc command line fails.
First, I gcc wasn't on my path ... no big deal. I located it and ran as:
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -dynamiclib -fno-common -o s.dylib s.c
(I'm working on a lib w/some functions...). Anyways, it fails.
s.c:1:19: error: stdio.h: No such file or directory
s.c:2:20: error: stdlib.h: No such file or directory
s.c:3:20: error: string.h: No such file or directory
Surprise! hah, well I searched my machine for stdio.h and I can't find it anywhere. Since I've been out of the OSX game for a bit, I'm assuming I'm missing something -
Basically I want to be able to continue using Xcode but I want to be able to build C/C++/etc on the command line with all the dependencies (.h) in the correct place.
Any thoughts?
There are two main ways to run the compiler from the command line: the Command Line Tools package, and xcrun.
xcrun is particularly good if you just need this occasionally. Just stick "xcrun" at the start, like you'd do with sudo:
xcrun gcc -dynamiclib -fno-common -o s.dylib s.c
This will find the correct version of gcc and set the needed directories, etc. You can specify a specific SDK with --sdk.
If you do this a lot, download and install the Command Line Tools package (Xcode>Open Developer Tool>More Tools...; it also may be available in Preferences>Downloads). This installs a full copy of everything in /usr.
Probably xcrun is not enough if you are using 10.8.
Looking in to the clang documentation I found that you need to include the system root because you do not have your libraries in the standard place but inside Xcode.
using:
xcrun gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
or:
xcrun clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
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