I am reading a document on compiling gcc for me to use. It is really (stupidly) long. I can't imagine that everyone who has to use gcc will go through all of this.
Can I just install the binaries from here: http://ftp.ntu.edu.tw/linux/devel/gcc/gcc-2.95.x/?
If yes, which file should I choose?
I use Slitaz Linux.
That is an old version of gcc by the looks of it. The latest that I remember is version 4.6 and yes you can just install the binaries for it.
Heres the command that should work for you:
tazpkg get-install gcc
This should grab the latest version for you.
Related
I need to use tools that depend on clang on a Unix machine I remote onto at work. Anything I install is locally installed onto ~/local. I do not have root permissions.
/usr is pretty outdated, with gcc being at version 4.4.7. clang requires gcc 4.7+
I read on linux from scratch that a gcc 6.1 installation requires 8.4 gb. This is not something I can do, because that's huge.
Can someone advise me on the best workaround to install up to date clang on my ~/local?
Please and thanks.
Edit:
Courtesy of Nishant, here is the short answer:
Set up a personal machine running the same linux distro and cross compile using gcc to your specific architecture. For me, I will run a Redhat 6.5 VM and compile using gcc an arm x64 binary. Thanks Nishant!
You can get pre-build binaries for Unix system from LLVM's release website: http://llvm.org/releases/
You can then put the binaries in any local folder you want and source it using the PATH variable, which can be done by modifying your ~/.bashrc file by appending:
export PATH=$PATH:<clang-binary-directory>
Now you will able to use clang from the command line terminal as if it was installed.
If you want to build from source only, you can get older source code of clang which will use gcc 4.4.7 and build it and then use clang to build clang. Or get the latest clang binary and use it to build latest clang.
I am running the latest version of MinGW GCC 4.7.2, and it was working fine with -std=c++11 before I installed Haskell using Haskell Platform. Please take a look at this:
For some reason, the GCC went back to 4.5.2, after installing Haskell, I re-installed it, with version 4.7.2, but its still showing 4.5.2.
Haskell adds its own GCC to your system PATH. You can check this is true by running
where gcc
which will show two commands, the Haskell one first, followed by your MinGW GCC.
The solution is to change your PATH to point to the GCC you want (but make sure Haskell still uses its GCC, I doubt it'll agree with GCC 4.7 if it came with GCC 4.5).
The easiest is to have some script ou can run to set up your compilation environment, so you don't have to worry about system PATHs.
If you don't care much about that exact GCC version you had installed, you can get my builds (32-bit and 64-bit), which come with a .cmd file you can doubleclick and it will give you a build environment much like the MSVS commandline shortcut, but for GCC. All it really does is add the compilers to PATH.
So we have this program which is being compiled in OpenSuse 13.1 with the following configuration:
GCC 4.6-15.1.3
GLIBC 2.14
Libcrypto 1.0
However, it's supposed to run with OpenSuse 10.3 which has the following configuration:
GCC 4.2-24
GLIBC 2.6.1-18
Libcrypto 0.9.8
The only dependency I could find so far was the __isoc99_sscanf which is introduced in GLIBC 2.7. I tried to fix this with writing my own sscanf function and replace it by adding the following line in my source code:
__asm__(".symver __isoc99_sscanf1, __isoc99_sscanf##GLIBC_2.7");
Now I'm left with the libcrypto dependency and it also looks like it's segfaulting on a munmap() (when i strace the program) function when I try to run it in the old OpenSuse environment (could be a GCC thing?)
So basically, I don't really know what the standard procedure is for fixing this kind of backwards compatibility issues. Any idea's on this?
Normally you would simply install the older gcc, glibc, and other libraries on the new OS (usually made available as RPMs for this reason) and make sure you compile only with those. It's an uphill battle to try to fix all the backwards incompatibilities yourself.
To be more thorough you could build in a chroot of the older OS, maybe even package it up into an RPM so the dependencies are automatically checked. Something like the Open Build Service makes this very easy.
I am trying to install some software using gmake (recommended by author) on a FC14 machine. gmake fails when trying to call /usr/bin/g++, and there is no g++ in /usr/bin.
I have the "various compilers" package installed. When I search on "g++" for available packages using the gnome Add/Remove Software interface, I get two choices "Cross Compiling GNU G++ targeted at arm-gp2-linux" and "Cross Compiling GNU GCC targeted at avr."
I don't have an ARM processor and I don't know what avr is, so I'm wondering if one of these is the right package, or if I need something else. Anyone have guidance?
I don't know about Fedora 14, but at least on RHEL-5 (based on an older Fedora release) the package you want is "gcc-c++"
Do a search for "gcc" instead of "g++" it's usually in that package or "gcc-c++".
My ubuntu installed with gcc 4.3.2. But I need gcc 2.95.2 to compile some of my code. I have downloaded the source of 2.95.2. But when I tried to compile it with 4.3.2, i failed. How could I get the 2.95.2 compiled?
Many thanks...
Update
Please take a look at this thread: How to build old source code with latest GCC?
Personally, I'd try and install the following packages:
http://packages.ubuntu.com/dapper/i386/cpp-2.95/download
http://packages.ubuntu.com/dapper/i386/gcc-2.95/download
http://packages.ubuntu.com/dapper/i386/g++-2.95/download
I'm not sure if they would work or not, but I suspect that they will.