Linux Centos upgrade glibc 2.12 to 2.14 config error - linux

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.

Related

PHP oci8 installation fails on openSUSE

Running on openSUSE Leap 15 with php8
pecl install oci8
I got this console output:
downloading oci8-3.2.1.tgz ...
Starting to download oci8-3.2.1.tgz (190,781 bytes)
.........................................done: 190,781 bytes
13 source files, building
running: phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : /path/to/instant/client/lib
building in /tmp/pear/temp/pear-build-rootdGCc7O/oci8-3.2.1
running: /tmp/pear/temp/oci8/configure --with-php-config=/usr/bin/php-config --with-oci8=/path/to/instant/client/lib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php8 -I/usr/include/php8/main -I/usr/include/php8/TSRM -I/usr/include/php8/Zend -I/usr/include/php8/ext -I/usr/include/php8/ext/date/lib
checking for PHP extension directory... /usr/lib64/php8/extensions
checking for PHP installed headers prefix... /usr/include/php8
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking for Oracle Database OCI8 support... yes, shared
checking PHP version... 8.1.12, ok
checking OCI8 DTrace support... no
checking size of long... 8
checking if we're at 64-bit platform... yes
checking Oracle ORACLE_HOME install directory... /path/to/instant/client/lib
checking ORACLE_HOME library validity... configure: error: /path/to/instant/client/lib is not a directory
ERROR: `/tmp/pear/temp/oci8/configure --with-php-config=/usr/bin/php-config --with-oci8=/path/to/instant/client/lib' failed
What this issue is about?
The oracle db is running in a docker container:
docker run -d -p 49161:1521 oracleinanutshell/oracle-xe-11g
I assume you are installing PHP on the same machine as the database.
Do you actually see the text /path/to/instant/client/lib or did you obfuscate something? Did you enter text when prompted for the path? Make sure you set valid values for ORACLE_HOME and LD_LIBRARY_PATH before running pecl if you are letting things default. With XE 11.2 do this by running
source /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
(With other versions of the DB you would use source /usr/local/bin/oraenv).
Finally, why use Oracle XE 11.2 when you can use version 21. Try docker pull docker.io/gvenzl/oracle-xe:21-slim
If you are running PHP on a different container to the database container, don't forget to install Oracle Instant Client.

Install gcc on a computing cluster without root privilege and no c compiler installed

Currently I realise that my computing cluster do not have gcc, g++, gfortran and therefore I cannot compile c file or install python libraries with gcc support. I do not have the root privilege of the computing cluster, I cannot use "yum install" or "sudo apt install" to install gcc. So I download the gcc-11.1.0 tar.gz file in my local computer and then upload to the cluster and install it. When I ./configure the gcc, the error messages appear:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-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 libvtv support... yes
checking for libhsail-rt support... yes
checking for libphobos support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
I do know that the error comes from no c compiler in the cluster. That is the reason why I want to install gcc to have a c compiler. So I got stuck in the loop where install gcc needs c compiler but I don't have a c compiler such that I download gcc. My problem is that how can I install a c compiler without root privilege and except downloading gcc? I appreciate any comment.
There are vast multiple solutions you can take. For example:
Use docker, if available.
Download whole chroot of your favorite distribution. And chroot into it.
If you can't chroot, use proot.
If you can't proot, run the interpreter from chroot explicitly with the executable path and arguments from chroot and setup LD_LIBRARY_PATH (and maybe some LD_PRELOAD).
if the remote pc does not allow network connection, download stuff to chroot by chroot-ing into it on your pc, then copy it to the remote.
use nix package manager
use pkgsrc package manger
download gcc source to your computer, download dependencies from the remote (glibc, interpreter, headers, maybe some more) to your computer and cross-compile gcc to destination environment and copy the result
just get what distribution is running on the remote and download packaged gcc executable from that distribution package manager repositories
I recommend nix, if it does not work, proot to your favorite Linux distribution.
You would want to research: PATH environment variable, dynamic linker/loader, and man ld.so and LD_* variables configuration, thus how chroot (and docker) works, about user namespaces (thus how proot works).

How to install 'readline' with Cabal on Windows

I would like to install 'readline' using Cabal on Windows. When running the command it is saying that readline isn't found. Cabal is up to date.
Command
cabal install readline
Output
Resolving dependencies...
Notice: installing into a sandbox located at
C:\Users\Michael\Desktop\haskell-project\.cabal-sandbox
Configuring readline-1.0.3.0...
Failed to install readline-1.0.3.0
Build log ( C:\Users\Michael\Desktop\haskell-project\.cabal-sandbox\logs\readline-1.0.3.0.log ):
Configuring readline-1.0.3.0...
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
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 for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... no
checking for tputs in -ltermcap... no
checking for tputs in -lcurses... no
checking for rl_readline_version... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Error: some packages failed to install:
readline-1.0.3.0 failed during the configure step. The exception was:
ExitFailure 1
What could be the reason for this?
If you are using an msys distro that includes pacman (the one that ships with the windows haskell platform installer should be such a distro) then you can use pacman to install the readline library, and this should let you link against it.
Also note that ghc ships with the haskeline library, which is a pure-haskell replacement for readline that is more portable.

Wine Cannot build a 32-bit program error

So I've been getting this problem (as seen below) on my CentOS 7 (64-bit) server when I try and configure wine with png with the following code:
./configure --with-png
I need this to run a specific server for a game called Mount & Blade Warband.
Because when I run the server i get this:
err:wincodecs:PngEncoder_CreateInstance Trying to save PNG picture, but PNG support is not compiled in.
fixme:ole:CoCreateInstance no instance created for interface {00000103-a8f2-4877-ba0a-fd2b6645fb94} of class {27949969-876a-41d7-9447-568f6a35a4dc}, hres is 0x80004005
I have looked at this post:
https://www.centos.org/forums/viewtopic.php?f=13&t=44897
They said that the following code should fix it:
yum install glibc-devel.i686
But it didn't, atleast not for me. I`m still getting the following error over and over:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... yes
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 for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cpp... cpp
checking for ld... ld
checking whether gcc -m32 works... no
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.
Solved, I had to run this code to install 32-bit devolpment libraries in order to do --with-png. The code came from this post:
https://www.centos.org/forums/viewtopic.php?f=48&t=49542
Code:
yum install glibc-devel.i686 dbus-devel.i686 freetype-devel.i686 pulseaudio- libs-devel.i686 libX11-devel.i686 mesa-libGLU-devel.i686 libICE-devel.i686 libXext-devel.i686 libXcursor-devel.i686 libXi-devel.i686 libXxf86vm-devel.i686 libXrender-devel.i686 libXinerama-devel.i686 libXcomposite-devel.i686 libXrandr-devel.i686 mesa-libGL-devel.i686 mesa-libOSMesa-devel.i686 libxml2-devel.i686 libxslt-devel.i686 zlib-devel.i686 gnutls-devel.i686 ncurses-devel.i686 sane-backends-devel.i686 libv4l-devel.i686 libgphoto2-devel.i686 libexif-devel.i686 lcms2-devel.i686 gettext-devel.i686 isdn4k-utils-devel.i686 cups-devel.i686 fontconfig-devel.i686 gsm-devel.i686 libjpeg-turbo-devel.i686 pkgconfig.i686 libtiff-devel.i686 unixODBC.i686 openldap-devel.i686 alsa-lib-devel.i686 audiofile-devel.i686 freeglut-devel.i686 giflib-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 libXmu-devel.i686 libXxf86dga-devel.i686 libieee1284-devel.i686 libpng-devel.i686 librsvg2-devel.i686 libstdc++-devel.i686 libusb-devel.i686 unixODBC-devel.i686 qt-devel.i686

gcc on my linux system is installed, still giving failure in installation

When I tried to install libxml2 on my linux server, it is giving me following error. Gcc on my machine is installed as well as fully updated, still it gives me error that your C compiler is not working, can anyone give me suggestion how to overcome it.
[root#localhost libxml2-2.8.0]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/root/tmpdir/libxml2-2.8.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
Just a few comments, not necessarily a solution... Do not use root for everyday usage (for me compiling libxml2 is an everyday situation). I would advise to create a "normal" user, and use it to work on your computer. configure, make with that user, and then sudo make install.
Then, depending on your Linux, I am almost sure there is a package for libxml2 and libxml2-devel. Try to install that, instead of manually compiling. This install by compile approach after some time tends to bring chaos to your computer...
Edit: To answer your comment:
get the RPM: wget ftp://rpmfind.net/linux/fedora/linux/development/rawhide/x86_64/os/Packages/l/libxml2-2.9.1-2.fc20.x86_64.rpm
(up here be sure about your architecture, select the correct one, last column)
install the RPM: [sudo] yum --nogpgcheck localinstall libxml2-2.9.1-2.fc20.x86_64.rpm
you might or might not need sudo... if you run this as root you will not need it.
As in your output C compiler cannot create executables
Can you compile simple c file using gcc
in the configure file it checks the following
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
does gcc without -o option provide executable file

Resources