configure: error: cannot run C compiled programs. when installing libtools-2.4.2 - macos

Have been struggling to set up my environment to run bioinformatics tools. The issue started with a consistent autogen.sh error in autoreconf -fi: command not found for multiple applications. Reinstalled autoconf, automake, libtools.
Currently, libtools installation fails at ./configure, but autoconf and automake installed successfully.
Here is the error:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... libltdl/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)... yes
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
configure: autobuild project... GNU Libtool
configure: autobuild revision... 2.4.2 ()
configure: autobuild hostname... MACUSR
configure: autobuild mode... default
configure: autobuild timestamp... 2019011
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/usr/local/libtool-2.4.2':
configure: error: cannot run C compiled programs.
Tried Homebrew, it installed all my tools in usr/local/Cellar and nothing runs, I have added tool locations to my PATH variable, but no luck. Traced problem to jamf issue:
https://www.jamf.com/jamf-nation/discussions/28764/jamf-quickadd-symlinks-usr-local-bin-causing-install-problems-for-other-apps
Stuck and will be happy for an advice here.

Long story short, it was an old gcc problem. My PATH referenced to anaconda3/bin first, where it was triggering whatever gcc it found there. After changing my $PATH to point to other bins before anaconda3, everything compiled without issues.
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Related

"no acceptable c compiler found in $PATH" while installing hydra on my windows through cygwin terminal

I found an error while trying to install hydra under Windows via Cygwin. What should I do?
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... no
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
By default, Cygwin doesn't install a compiler. I suggest installing "gcc" from Cygwin's setup. (You may need other packages, but start with "gcc" and add packages are needed.)

i want to install Tesseract and ./configure

this is the result from ./configue:
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
Using git revision: 4.00.00alpha-358-g362b68e
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
./configure: line 4250: syntax error near unexpected token `-mavx,'
./configure: line 4250: `AX_CHECK_COMPILE_FLAG(-mavx, avx=true, avx=false)'
this is the error that i get after running make:
make: *** No targets specified and no makefile found. Stop.
thus sudo make install doesnt work either
I was getting the same error. Below is what worked for me.
cd tesseract-3.05.00
./autogen.sh
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
LIBLEPT_HEADERSDIR=/usr/local/include ./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/lib
LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make
make install
ldconfig
See below link for full script, that includes installing Leptonica and dependencies properly.
https://github.com/EisenVault/install-tesseract-redhat-centos/blob/master/install-tesseract.sh
If configure fails with errors like these, then double check you have installed autoconf-archive and restart Tesseract installation process (./autogen.sh,./configure` ...)
And make sure that you have installed the latest version of laptonica, in my case it was Laptonica-1.74, as it is required for the installation process.
Reference to tesseract-ocr compiling

No acceptable C compiler found in $PATH

So here's the situation. I want to setup a portable programming environment by installing my programming stuff (Vim, Clang, Git, GCC) in a single folder that I can create on any Mac. I am installing everything in /opt, which isn't there by default and I should have write permissions to create. I got Vim, Clang, and Git working by downloading the Xcode Command Line Tools and a program that can extract the contents of the PKG's. I put everything in their respective folders in /opt, e.g /opt/usr/bin. They are all doing dandy.
Here's the problem. I am trying to get GCC to work. I downloaded the OSX GCC Installer and did the same technique with GCC-4.2. The problem is that when I do a test compile, I run this. Edit: I get the same error message if I do CC=gcc-4.2
./configure --prefix=/opt/usr/bin
and receive
checking build system type... x86_64-apple-darwin11.4.2
checking host system type... x86_64-apple-darwin11.4.2
checking target system type... x86_64-apple-darwin11.4.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/opt/gcc-master':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
This is strange because GCC-4.2 is in my $PATH
echo $PATH
/opt/usr/bin:/opt/usr/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
cd /opt/usr/bin ; ls | grep gcc
gcc
gcc-4.2
i686-apple-darwin11-gcc-4.2.1
FYI: 'gcc' is a symlink that doesn't point to anything.
which gcc-4.2
/opt/usr/bin/gcc-4.2
I solved this by adding this to my .zshrc. It forces any configure script to look for gcc-4.2 instead of gcc.
CC=/opt/usr/bin/gcc-4.2
configure: error: no acceptable C compiler found in $PATH
Before executing the ./configure command, i used the command:
sudo apt install gcc
And the error 'no acceptable ...' is solved.

how to compile libcurl with arch armv7s under macosx?

I have installed Xcode 4.5 and iOS6.0 SDK , MacOSX 10.7 SDK,command line tools on my computer. I download libcurl from http://curl.haxx.se/download/curl-7.27.0.tar.gz and compiled it for iOS with arch armv7s.
I did follows:
export
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch armv7s"
export LDFLAG="-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
--Wl,-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk"
export CFLAG="-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk"
./configure --host=arm-apple-darwin10
and get errors below:
$ ./configure --host=arm-apple-darwin10
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for arm-apple-darwin10-ar... no
checking for ar... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for arm-apple-darwin10-strip... no
checking for strip... strip
checking curl version... 7.27.0
checking build system type... i386-apple-darwin12.2.0
checking host system type... arm-apple-darwin10
checking for style of include used by make... GNU
checking for arm-apple-darwin10-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s
checking for C compiler default output file name...
configure: error: in `/Users/eric/working/curl-7.27.0':
configure: error: C compiler cannot create executables
See `config.log' for more details.
does anyone known how to do it?

'configure' failing with Android NDK standalone toolchain

I'm trying to build something with the Android NDK standalone compiler toolchain, but I'm getting this error:
Updating bundled third-party dependencies...
bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
cp output/libFColladaSD.a ../lib/libFColladaSD.a
cp output/libFColladaSR.a ../lib/libFColladaSR.a
Building SpiderMonkey...
SpiderMonkey build options: --disable-tests
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for mawk... mawk
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... arm-linux-androideabi-g++
checking whether the C++ compiler (arm-linux-androideabi-g++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
ERROR: SpiderMonkey build failed
This is what the config.log says: http://pastebin.com/5AFZG4CX
My ANDROID_NDK_ROOT is set as follows:
afeder#ubuntu:~/android/0ad/build/workspaces$ echo $ANDROID_NDK_ROOT
/home/afeder/android/android-ndk-r7-crystax-4
What might be the cause or how do I debug it? Thank you.
To me this looks broken:
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
Here's how I'd set up the environment for my Android NDK build:
export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}-g++
... other binutils as needed ...
export NDK=/home/afeder/android/android-ndk-r7-crystax-4
export SYSROOT=$NDK/platforms/android-8/arch-arm
PATH=$PATH:$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
Make sure and add --sysroot=$SYSROOT to CFLAGS, CPPFLAGS, and/or CXXFLAGS.
Now you need to tell the spidermonkey configure that you are cross compiling:
./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi
It looks like it can't find arm-linux-androideabi-g++. Try searching for it in the NDK folder and adding the directory to your PATH.
Mine is here:
ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++

Resources