Slackware - c compiler works no - linux

I am new in slackware,
After clone postgresql 9.4 I start installation from direction at ./configure
I got output
.
.
.
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/usr/src/postgresql':
configure: error: C compiler cannot create executables
See `config.log' for more details
after that I check gcc version:
root#li442-162:/usr/src/postgresql# gcc --version
gcc (GCC) 4.8.2
My question is how can run gcc compiler..?
Thanks.

Related

vim install from source fails in macOS high sierra

I recently upgraded from 10.9 to 10.13 and had to reinstall vim. I checked out vim from source and did the following:
$/source-pkgs/vim>./configure --with-features=huge -
-enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes --with-
python-config-dir=/usr/lib/python2.7/config --enable-cscope --
prefix=/usr/local
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/Users/arenduchintala/source-pkgs/vim/src':
configure: error: C compiler cannot create executables
See `config.log' for more details
To make matters worse I can't seem to locate config.log!! It does not appear in $:source-pkgs/vim or anywhere in /usr/local/
My gcc seems to work fine:
$/source-pkgs/vim>which gcc
/usr/bin/gcc
$/source-pkgs/vim>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.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Any suggestions on how to proceed would be helpful!

Linux Centos upgrade glibc 2.12 to 2.14 config error

I am attempting to upgrade 2.12 to 2.14 on Centos and have been following this example: How to upgrade glibc from version 2.12 to 2.14 on CentOS?
All has worked up to ../configure --prefix=/usr/share/doc/glibc-2.14 when I get the output:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/glibc_install/glibc-2.14/build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Output of core tests in config.log:
configure:2363: checking build system type
configure:2377: result: x86_64-unknown-linux-gnu
configure:2397: checking host system type
configure:2410: result: x86_64-unknown-linux-gnu
configure:2479: checking for gcc
configure:2509: result: no
configure:2572: checking for cc
configure:2619: result: no
configure:2675: checking for cl.exe
configure:2705: result: no
configure:2729: error: in `/root/glibc_install/glibc-2.14/build':
configure:2731: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Thanks for any help with this :)
It would appear you are missing a C compiler, for example
checking for gcc... no
I would suggest starting with Employed Russian's questions:
Does gcc --version run and report a version number? If no, continue.
Does which gcc give you a path? If no, continue
If either of the above are yes, I would suggest reviewing the contents of your $PATH variable.
If both are no, try:
sudo yum group install "Development Tools"
... with or without sudo, as needed.

error installing a package in R pertaining stringr package [duplicate]

This question already has an answer here:
Error installing r packages (Linux Mint 17.1) "error: C preprocessor "g++ -E" fails sanity check"
(1 answer)
Closed 7 years ago.
I have problem with installing packages in RStudio.
I'm using Linux Mint and have already installed libgdal-dev and libproj-dev.
Here's the text in the terminal:
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /usr/lib/R
checking for R... /usr/lib/R/bin/R
checking for R >= 3.1.0... no
*** disabling C++11 use
checking for cat... /bin/cat
checking for gcc... gcc -std=gnu99
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 gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... g++ -E
configure: error: in `/tmp/Rtmp3NFJZN/R.INSTALL28c32774afde/stringi':
configure: error: C preprocessor "g++ -E" fails sanity check
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/varum/R/x86_64-pc-linux-gnu-library/3.0/stringi’
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpv9QKWM/downloaded_packages’
Any ideas where the problem is?
checking for R >= 3.1.0... no
It might help to update your R version. The current release is version 3.2.2
Check the installation guidelines here.
Maybe installing the g++ could help
sudo apt-get install g++

Problems installing R3.1.1 on Linux CentOS release 6.5 ( check LDFLAGS for paths to Fortran libraries )

I'm trying to install R3.1.1 from sources on CentOS 6.5.
The .configure raises the following error
(...)
checking whether we can compute C Make dependencies... yes, using $(CC) -MM
checking whether gcc -std=gnu99 supports -c -o FILE.lo... yes
checking for gcc -std=gnu99 option to support OpenMP... -fopenmp
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran... -L/usr/local/lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/../lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/slurm -L/cm/shared/apps/slurm/14.03.0/lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -lgfortran -lm -lquadmath
checking how to get verbose linking output from gcc -std=gnu99... -v
checking for C libraries of gcc -std=gnu99... -L/usr/local/lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/../lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/cm/shared/apps/slurm/14.03.0/lib64/slurm -L/cm/shared/apps/slurm/14.03.0/lib64 -L/cm/shared/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../.. -lgcc_s
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether gfortran appends underscores to external names... yes
checking whether gfortran appends extra underscores to external names... no
checking whether mixed C/Fortran code can be run... configure: WARNING: cannot run mixed C/Fortran code
configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
gfortran was installed using yum
gfortran --version
GNU Fortran (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
I've no idea what I should put in LDFLAGS to fix that error.
UDPATE:
# find / -name "libgfor*.so"
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so
/cm/shared/apps/gcc/4.8.2/lib64/libgfortran.so
/cm/shared/apps/gcc/4.8.2/lib/libgfortran.so
/cm/images/default-image/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.so
/cm/images/default-image/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.so
.
# tail config.log
#define SIZEOF_LONG_LONG 8
#define SIZEOF_DOUBLE 8
#define SIZEOF_SIZE_T 8
#define HAVE_LONG_DOUBLE 1
#define SIZEOF_LONG_DOUBLE 16
#define F77_FUNC(name,NAME) name ## _
#define F77_FUNC_(name,NAME) name ## _
#define HAVE_F77_UNDERSCORE 1
configure: exit 1
Try to locate libgfortran.so in your system and provide the path -Lthe_path -lgfortran or set the respective environment variables. If that does not help, try to find more details in the config.log (or similar) file to find out what does the configure actually try to do in that check.
Your gfortran reports it is version 4.8.2 but the libraries are from version 4.4.4. Try to locate (by which) which gfortran binary you run and where are its libraries. Try running the locate command for libgfortran.

problems with ./configure for libtorrent on linux

Hell I have been having an extremely tough time installing libtorrent and am unsure what the problems are. I have seen plenty similar errors online but the solutions were not helpful and I am pretty sure the error message is just too vague for comparison.
When I run ./configure I get
**
Building libtorrent-rasterbar 0.16.5
Checking for a C/C++ compiler to use:
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ understands -c and -o together... yes
.
..
.
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
configure: error: Boost.System library not found. Try using --with-boost-system=lib
**
I then use the suggestion and the difference is that the bottom says
**
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -llib... no
checking for exit in -lboost_system-lib... no
configure: error: Could not link against boost_system-lib !
**
the config.log file has an error
**
configure:16572: result: no
configure:16537: checking for exit in -lboost_system-lib
configure:16562: gcc -o conftest -lpthread -g -O2 -fvisibility=hidden -I/usr/include -L/usr/lib conftest.c -lboost_system-lib -lpthread >&5
conftest.c:33: warning: conflicting types for built-in function 'exit'
/usr/bin/ld: cannot find -lboost_system-lib
collect2: ld returned 1 exit status
**
Any insight would be enormously appreciated
after installing
apt-get install libboost-system-dev
apt-get install libboost-filesystem-dev libboost-thread-dev
Checking features to be enabled:
checking whether encryption support should be enabled... yes
configure: encryption support: now checking for the OpenSSL library...
checking for pkg-config... /usr/bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl... no
checking for openssl/ssl.h in /usr/lib/ssl... no
checking for openssl/ssl.h in /usr/ssl... no
checking for openssl/ssl.h in /usr/pkg... no
checking for openssl/ssl.h in /usr/local... no
checking for openssl/ssl.h in /usr... no
checking whether compiling and linking against OpenSSL works... no
configure: error: OpenSSL library not found. Try using --with-openssl=DIR or disabling encryption at all.
You need to install libboost-system.
If you are using Debian/Ubuntu, use apt-get as follows.
$ apt-get install libboost-system-dev
You may also need to install ...
$ apt-get install libboost-filesystem-dev libboost-thread-dev
The easiest way to install all the dependencies is with apt-get.
sudo apt-get build-dep python-libtorrent
I know this is a bit old, but to solve your OpenSSL problem you need to install the OpenSSL libraries with sudo apt-get install libssl-dev.
For CentOS users, you will want to install boost-devel.
# yum install boost-devel
But I still got the same error. Just want to point out one more thing, the CentOS 6.4 I work with had an old gcc compiler:
# g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Installing a newer version of gcc helped me to get rid of that particular error. I used g++ (GCC) 4.8.2 version and this time calling the following command worked:
# ./configure --with-boost-libdir=/usr/lib64
After this point you might still run into not finding openssl headers like the OP posted here, this post will help to overcome the error. You may have to install openssl-devel (for CentOS) or libssl-dev (for Debian), or you can run with
# ./configure --with-boost-libdir=/usr/lib64 --without-ssl
If you have openssl headers installed in your system, you don't need to use --with-openssl flag, or at least I didn't need to use it.
Although this is old post, hope it will help someone else like me.
To avoid OpenSSL issues you can build "libtorrent-rasterbar" disabling OpenSSL encryption.
For instance:
./configure --disable-debug --disable-encryption --prefix=/opt/libtorrent-rasterbar
And then "make" + "make install"
Regards
The accepted answer didn't work for me. What did work was editing the configure script file and removing those lines from it:
if test -z "$BOOST_SYSTEM_LIB"; then :
as_fn_error $? "Boost.System library not found. Try using --with-boost-system=lib" "$LINENO" 5
fi
Those lines seemed to check that the BOOST_SYSTEM_LIB environment variable exists and is not empty.
For Arch users (ex. Manjaro) install the boost pkg from pacman. Search for "boost" and install from Official Repo(extra).

Resources