Issue while installing gcc-4.8.1 in Fedora 19 - gcc

As per the installation instruction given on the gcc wiki site- http://gcc.gnu.org/wiki/InstallingGCC,
tar xvzf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1
make
make install
I was trying to install gcc in my laptop. But, I am getting the below error while installing just after entering the configure command.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
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... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/fedora-19/Downloads/objdir':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
And after entering the make command below error is being displayed.
make: *** No targets specified and no makefile found. Stop.
Please guide on this issue.

I think there is an easiest way to install gcc on Fedora 19.
Did you try with yum ? With something like sudo yum install gcc
Your error means that the makefile which must be generated during the configure command doesn't exist because you don't have any c compiler. You can see details on the config.log file.

You can execute following command to install GCC compiler in fedora:
yum install gcc
After executing this, it shows you a Total size and Total download size.
Or download gcc-4.4.7-3.el6.x86_64 package from web and execute:
rpm -ivh gcc-4.4.7-3.el6.x86_64*
It may work.

This solves the problem,
$PWD/../configure
make
make install

Related

./configure and make problems on macOS

I am trying to get QuantumEspresso
I downloaded it, went into the folder and try to use
./configure
but got the error
(base) localhost:q-e myname$ ./configure
checking build system type... x86_64-apple-darwin18.6.0
checking ARCH... mac686
checking setting AR... ... /anaconda3/bin/x86_64-apple-darwin13.4.0-ar
checking setting ARFLAGS... ... ruv
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking whether the Fortran compiler works... no
configure: error: in `/Users/myname/Documents/QuantumEspresso/new_folder/q-e':
configure: error: Fortran compiler cannot create executables
See `config.log' for more details
Apparently, I don't have some parts like gfortran. Where do I get those missing parts for MAC?
Install the Homebrew package manager.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use Homebrew to install gcc (includes gfortran)
brew install gcc

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

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

"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.

Resources