How to download and install gcc for AIX 7? - gcc

I am new to installation work and AIX machine. I have gone through many sites and found it very difficult to follow/unrelated. I did find / | grep gcc and found only one gcc folder which cannot be executed. I tried installing gcc using the rpm - libgcc8-8.3.0-5.aix7.2.ppc.rpm and libgcc-8-1.aix7.2.ppc.rpm, still gcc not found. I will be thankful if I find some help on downloading and installing gcc in AIX machine. Please help.
# uname -v
7
# uname -a
AIX twa-aix72-01 2 7 00FB3B744C00
#

Used yum install gcc and then gave which gcc, I am able to see the gcc file path then. This worked. Yum downloads gcc package and installs I guess. For more details, please check the comments.

Related

Ubuntu: cgo: C compiler "gcc-11" not found: exec: "gcc-11": executable file not found in $PATH

I am using Ubuntu 20.04, and I installed Go using Homebrew.
The version of Go is go 1.19.
When I run my application with go run . or go build ., this error comes up:
# github.com/mattn/go-sqlite3
cgo: C compiler "gcc-11" not found: exec: "gcc-11": executable file not found in $PATH
I have tried running
sudo apt install gcc
but the terminal tells me that gcc is already the newest version (4:9.3.0-1ubuntu2).
When I run gcc -v
the terminal tells me gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
And I have already run apt update and apt upgrade already, and then reinstall gcc, but it's still version 9.4.0
My question is how do I install gcc-11? Or is it not supported in Ubuntu 20.04? Or should I not use go 1.19?
Thanks
The go developers provide a simple way to manage multiple go versions at once: https://go.dev/doc/manage-install
It should not be too hard to explore if this is a Homebrew artifact, or something generic to go, or a specific version of go on your system.
You might also look at the output of go env which should list configured defaults for various dependencies. You are looking for something like CC=gcc in the output.

Installing gfortran via macports on Mac OS high sierra

My supervisor has asked that I install a fortran compiler on my mac and suggested using MacPorts to install gcc6. I have tried to install gcc6 a number of times but each time it doesn't seem to come with gfortran. No matter what I do I cannot seem to figure out what is going on and how to get around it.
Any hep on the matter would be greatly appreciated.
Here is the command used to install gcc:
sudo port install gcc6
MacPorts allows you to have multiple versions of gcc installed. Before you get gfortran executable you have to select the default version.
First - install gcc:
sudo port install gcc9
After this command you will have gfortran under gfortran-mp-9 alias. To make gfortran-mp-9 the default and make it reachable via gfortran command do:
sudo port select --set gcc mp-gcc9
The examples above assumed gcc9, but you might need adjust the above gcc version to the one you need to work with.
With macports the correct command to install fortran would be
sudo port install gcc6 +gfortran
This will install gfortran. You may want to refer to the gfortran manual along with other Fortran references you may be using.
Note: You may choose some other version of gcc, of course. You can search for which versions are available on the macports site.

erlang.mk buildtool is unable to detect windows

I have build a website with Erlang and Cowboy with ErlyDTL on a Linux OS.
Now I want that my website can run on Windows and want to use the Erlang.mk with Relx build tool.
When I give the make command it gives me the error:
Unable to detect platform. Please open a ticket with the output of
uname -a.
uname -a output:
MINGW32_NT-6.2 LENOVO-... 2012-11-21 22:34 i686 Msys
How can I fix this problem in a easy way with explanation because I don't know much of makefiles ;).
Specs:
I have Windows 8.1 64 bit OS.
My Erlang.mk is version 1.2.0-634-g2f69190.
I installed MinGW with msys so I can run make and make distclean.
I have the following extra packages installed during this intallation:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
So the PATH to MinGW is c:\MinGW.
With CMD I started C:\MinGW\msys\1.0\msys.bat
Then with the bash shell I ran de postinstall script pi.sh. This gave me no errors.
Then I have installed some extra packages for MinGW with success:
mingw-get install msys-rxvt
mingw-get install msys-unzip
mingw-get install msys-zip
mingw-get install msys-wget
I have red https://github.com/ninenines/erlang.mk/issues/294 but I couldn't understand what I have to do because the lack of explanation.
So is there a solution? If yes what is it and please give some explanation with it so I can fix my problem and understand what I'm doing.
Thanks in advance

Problem with gcc 4.6 installation on ubuntu

I am trying to install gcc 4.6 (mainly for having C++0x better supported) in my ubuntu 9.10 (via virtualbox). I referred to previous questions, but I am getting a different error.
I am referring this link for the installation. Now, I have done till the ./gcc-xx/configure ... step. Though it was giving some flex package related error. Mostly due to that make is also failing with below errors:
build/gengtype.o: In function
adjust_field_rtx_def':
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:978:
undefined reference tolexer_line'
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:1032:
undefined reference to lexer_line'
/home/milind/ubuntu_shared/GCC/build/gcc/../../gcc-4.6-20110610/gcc/gengtype.c:1042:
undefined reference tolexer_line' ...............
Now this is giving me a hard time figuring it out because I have already flex/bison latest versions installed. I searched over internet for 2 days almost but no luck. Any help would be really appreciated. Also note that, I already have gcc 4.4 installed in /usr/bin/gcc and I have unzipped the gcc 4.6 tar in my home directory local folder.
[Note: I am also ok with installing ubuntu 11.10 too (which has gcc 4.6) as last resort. But I don't know if its .iso image is available.]
I got this fixed. I followed following procedure:
[Note: run all the commands with sudo, if you are not login as root. e.g. sudo ls -ltr; sudo make install;
As mentioned in the link in my
question, download the gcc4.6...tar
file in a temporary place
Now find the place where current
gcc is stored. e.g. My earlier
gcc4.4 was stored in
/usr/lib/gcc/i486-linux-gnu. Which
has a folder called 4.4, 4.4.1
Create a folder named 4.6 (or
4.6.1/2/3 etc.) and put that
.tar file inside it. Untar the
file as shown in link.
Follow all the procedure as per the
link. Use nohup <command> & to
track the logs. i.e. nohup make
clean all & followed by tail -f
nohup.out
If some error comes, it means some
package is missing. Mostly those
package will be present in your
current gcc version. You can
install them there itself. For
example, in my case zlib was
missing. I ran sudo apt-get install
zlib1g-dev libssl-dev and it worked
fine. Otherwise download from internet and install it.
Once your gcc is installed, you
can simply check it using type
gcc-4.6. In my case it showed that
it's stored as
/usr/local/bin/g++-4.6.
Either you can use the same path to
compile or you can put an alias in
your bash/tcsh/ksh. e.g.
/usr/local/bin/g++-4.6 -std=c++0x
-Wall test.cpp
FWIW Debian testing and unstable have gcc-4.6 as a standard package. So you can simply install that distro inside of virtualbox or, as I've done on my Ubuntu 11.04 server at home, via kvm. In the past, I also used to use dchroot build environments.
There may also be prepackaged gcc-4.6 binaries at launchpad.

Need help in compiling lighttpd on MacOSx

I try download lighttpd 1.4.23 source, and compile it on MacOSX 10.5.5.
This is the error I am getting:
$ ./autogen.sh
./autogen.sh: running `libtoolize --copy --force'
./autogen.sh: line 19: libtoolize: command not found
I tried ask the same question on lighttpd forum, but I can't get any help there.
Thanks in advance.
libtoolize is part of GNU libtool, a package for building libraries portably. On the Mac, one option for getting it is to use MacPorts, a package manager which works in a similar fashion as Gentoo and FreeBSD, in that it compiles packages on your machine. See http://www.macports.org/install.php.
Beware, though, that it will be installed as glibtoolize, i.e. with a 'g' prefixed. That is a standard way to make GNU tools live in parallel with UNIX tools of the same name, that might be present (even though there isn't one in this particular case).
The command for installing libtool from MacPorts is: sudo port install libtool
Add a '-d' flag after the 'port' command to see the build output.
Here's what I use to install lighttpd 1.4.25 on Mac OS X 10.6.2. If I remember correctly, the same thing worked for me in a recent version of Mac OS X 10.5.
Install Xcode Developer Tools
Either install them from the DVD that came with your Mac (under Optional Installs) or download them from Apple's developer page.
Install PCRE
curl -O http://softlayer.dl.sourceforge.net/project/pcre/pcre/7.9/pcre-7.9.tar.gz
tar xzf pcre-7.9.tar.gz
cd pcre-7.9
./configure
make && sudo make install
cd ../
Install lighttpd
curl -O http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.25.tar.gz
tar xzf lighttpd-*.tar.gz
cd lighttpd-*
./configure
make && sudo make install
Note that the URLs above will quickly go out of date; you may need to download the latest versions of the .tar.gz packages from a different location.

Resources