The GNU Compiler Collection is the standard compiler system used on many Unix-like operating systems, including Linux. Originally meant for compiling C programs, it can now also handle C++, Java and several other languages.

learn more… | top users | synonyms

8
votes
3answers
12k views

How do I use the latest gcc 4.9 on Ubuntu 14.04

I want to compile my program with the latest version of gcc. Ubuntu 14.04 comes with gcc 4.8.2, however there's 4.9.0 available, moreover, I see that it is available as a package: gcc-4.9. I tried to ...
0
votes
0answers
449 views

g++ 4.8.2 on ubuntu 14.04 fails to compile source files

I'm really frustrated at present in that g++ is throwing up so many errors even on a simple .cpp file. I'm typing: g++ test.cpp at the command line. Thanks in advance for any help. I downloaded g++ ...
0
votes
0answers
146 views

Unable to install gcc on ubuntu 12.04 LTS

I am trying to install gcc on ubuntu using : sudo apt-get install gcc I get the following error: Reading package lists... Done Building dependency tree Reading state information... Done You ...
0
votes
0answers
197 views

/usr/bin/ld: error: cannot find -lpython2.7

While installing pyscard.py I get this error, gcc -pthread -shared -Wl,-rpath,$ORIGIN/../lib -g -L/home/builder/jenkins/workspace/Python_Masters/ARCH/x86_64/label/Linux/core/lib ...
3
votes
0answers
265 views

bfd.h should include libiberty/ansidecl.h in Ubuntu 14.04?

binutils package seems to be changed, as include directory of libiberty.h has moved to /usr/include/libiberty, thus there is possible a wrong include in bfd.h regarding ansidecl.h. Getting those ...
2
votes
1answer
174 views

Compile error when trying to run make

I have the following error when trying to run make command, /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libcppunit.a when searching for -lcppunit /usr/bin/ld: ...
5
votes
1answer
2k views

gcc won't link with -m32

Trying to compile even the simplest (int main(){}) program with -m32 on a 64-bit system fails: $ gcc -m32 test.c /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when ...
2
votes
1answer
12k views

How to install gcc 4.9 on Ubuntu 14.04? [duplicate]

Now that gcc 4.9 is officially released, is there an easy and convenient way to install it on Ubuntu 14.04 through the package manager (ie. apt-get)? I would also appreciate information on how to ...
0
votes
1answer
108 views

Install something without make install [closed]

I have been struggling for few days trying to install a software. I'm not actually working on Ubuntu but I think the steps to do are the same. Working on a gentoo (The operating system of the Robot ...
0
votes
0answers
403 views

I already have the newest version of g++ but I still get a 127 error what do I do?

I have done the following. I just don't know what to try next. I supposedly have the newest version of gcc by following these directions sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo ...
0
votes
2answers
2k views

How do you fix a gcc compile 127 error? sudo apt-get install g++ doesn't work

*emphasized text*when I try to run a program I get the following error. ubuntu@ubuntu-VirtualBox:~/Desktop$ make g++ -Wall -Wno-switch -I. -g -c -o pass.o pass.cpp make: g++: Command not found ...
1
vote
0answers
130 views

How do I set gcc 4.8 to be the default gcc?

I'm trying to update to gcc 4.8.2. I have Ubuntu 12.04. after this if I type gcc -v it says gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Next I typed sudo add-apt-repository ...
0
votes
0answers
52 views

Trying to compile 'mips64' program with gcc 3.3 but it has an error when building binutils and gcc

I tried building binutils and gcc3.3 for mips64 and everything goes well until: make CC=$GCC make install [For make an error saying, that: gmp.h and confdefs.h are not found] [For make install: ...
2
votes
1answer
46 views

how to create a ppa .dep that depends on non-default GCC?

I want to create a .dep package in my PPA. That project however requires a recent GCC 4.8 or Clang 3.4+. I found out, that you can add custom PPA dependencies, so I added ubuntu-toolchain-r/test to ...
0
votes
1answer
58 views

LD_LIBRARY_PATH

I have tried to link VINCIA to ROOT, but there is a problem related to the location of the shared libraries in my system. Since I have installed all these tools in a directory which is different than ...
1
vote
0answers
413 views

GDB not showing C code when gcc -g option is used

I have a file called hello_world.c. I use the command gcc -g -Wall hello_world.c Then gdb ./a.out I set a breakpoint at line 27 And run, it tells me this: warning: no loadable sections found in ...
0
votes
1answer
76 views

problem with gcov, cannot run

So i'm trying to optimize a file called linpack.c. I have to use gcov to find the 10 most executed lines. I've been given these compiler options: -fprofile-arcs -ftest-coverage -O2 So i ran this $ ...
0
votes
1answer
125 views

I have updated GCC, but g++ still seems to be using the stl files from the old GCC

I run ubuntu 12.04. Recently, I have followed this post and updated GCC to 4.8.1. Now, when I compile with g++, I get compiler output like these: /usr/include/c++/4.6/bits/stl_algobase.h:743: note: ...
0
votes
0answers
109 views

Use gcc-4.6-arm-linux-gnueabihf to compile .c file, What is the command?

I am doing cross compiling. I install the gcc-4.6-arm-linux-gnueabihf and want to use it to compile the .c file(example of hello world) and then run it on ARM. I don't know what is the exact command. ...
2
votes
1answer
145 views

what is the difference between which gcc and dpkg -l | grep gcc

based on Ubuntu 12.04 man page for which which returns the pathnames of the files (or links) which would be exe- cuted in the current environment, had its arguments been given as com- ...
1
vote
0answers
70 views

How do I set the F77 environment variable to gfortran?

I'm new Ubuntu (and linux) user. In order to do my senior project, I have to install psrchive I use this command to install psrchive ./psrsoft/bin/psrsoft psrchive --no-cfitsio This is part of ...
3
votes
0answers
80 views

Compiling and linking of a C program

I am learning about compiler linker and loader and was trying to understand the working of linker and loader on my ubuntu 12.04 machine I wrote 2 simple ".c" files as follows test.c ...
0
votes
0answers
859 views

“Error : No targets specified and no makefile found” when configuring eclipse for stm32 development

I'm trying to configure eclipse for stm32 development, and I followed some video tutorial on Youtube and it was OK till the last few steps when an error occured I'm working on Ubuntu 12.10 and ...
3
votes
1answer
62 views

Where to get the latest GCC (GNU C Compiler)

Currently my version is 4.8.4 but Ive found that some sites offer a 4.9 version. like this http://gcc.igor.onlinedirect.bg/snapshots But where do they get the source from? I want to know so I can be ...
0
votes
1answer
38 views

Was installing gcc 4.8, ran out of diskspace now cant use gui, how to fix?

I have tried removing programs, including the unfinished gcc 4.8 install, but i get the error unmet dependancies. All the files I have left are really important so i cant delete them. Is there any ...
0
votes
1answer
373 views

Header files missing

I'm trying to compile a source code and I'm getting many errors indicating that header files are missing from my system checking sys/ioccom.h usability... no checking sys/ioccom.h presence... no ...
4
votes
1answer
2k views

collect2: error: ld returned 1 exit status

I want to install nexalign (can be downloaded from here) on ubuntu 13.10. I previously installed it on ubuntu 10 without any problem. The error I got is: gcc -O9 -Wall -Dthread -lpthread main.o ...
1
vote
1answer
801 views

-lm option doesn't work in GCC 4.8.1

I know I'm not supposed to be posting problems related to programming here. But I couldn't think of any better place and it's quite relevant too. The problem is exactly what the title indicates: when ...
22
votes
5answers
43k views

Getting + installing gcc/g++ 4.9 on Ubuntu?

How do I install the latest version of gcc and g++? I am using a variety of C++11 and C++1y features; which is why I need this.
3
votes
0answers
231 views

Cross compile for ARM using gcc-multilibs

There are various questions available in AskUbuntu related to Cross compiling. They were not of much help to me. I used to work on gcc-4.5/4.6 for ARM. It was available in Ubuntu repo under the name ...
3
votes
2answers
2k views

Why does apt-get want to remove gcc-4.8 and g++-4.8 when I try to upgrade?

I am trying to upgrade gcc-4.8.1 and g++-4.8.1 to 4.8.2. I added the PPA containing g++-4.8.2, ran apt-get update and then when I try: martin@martin-Studio-1537:~$ sudo apt-get upgrade [sudo] ...
0
votes
2answers
1k views

Cannot install gcc-4.8 because of unmet dependencies

I was trying to upgrade gcc-4.8.1 to gcc-4.8.2 using Synaptic from this PPA. The installation executed with no problem, but suddenly I had no gcc-4.8 at all. I was using gcc-4.7 and gcc-4.8 together, ...
0
votes
2answers
984 views

Installing GCC 3.2 : How to resolve error “lvalue required as increment operand”?

I am using Ubuntu 10.04 and the current version of GCC installed in my system is 4.4. For some specific need I want to install GCC 3.2. I began with these steps: $mkdir gcc-build $cd gcc-build $tar ...
1
vote
0answers
299 views

Compiled packages and apt-get mess

Due to my work I have to use the last version of gdb (7.7) which is not provide in the ubuntu repositories. For that purpose I download the source code, compiled it and installed it successfully. My ...
2
votes
0answers
913 views

Problems installing gcc for cross compiling for ARM

I've been trying to install the gcc-arm-linux-fnueabi package, and I've done it a few times by a few different methods but I always seem to be missing the c++ folder in the includes directory. To ...
0
votes
1answer
107 views

How to install two different compilers?

I am an unskilled Ubuntu user and almost each time I try to install something nontrivial I break something miserably. I am successfully using gcc 4.7 and 4.8 simultaneously using update-alternatives ...
2
votes
0answers
191 views

How to repair broken gcc compilers [duplicate]

I want to install g++. But I got error sanket@sanket-Inspiron-N5110:/opt/objdir$ sudo apt-get install g++ Reading package lists... Done Building dependency tree Reading state information... ...
0
votes
0answers
22 views

Can't install rmagic due to the dependencies errors [duplicate]

I can't install rmagic due to the dependencies errors: $ sudo apt-get install libmagickwand-dev Reading package lists... Done //............... The following packages have unmet dependencies: ...
4
votes
1answer
4k views

Where's my /usr/include/sys directory?

I recently upgraded from Kubuntu 12.04 to 13.04, a complete reinstall. Using gcc 4.7.3. I compiled some programs to discover there is no /usr/include/sys directory. That is, types.h, stat.h, etc, ...
0
votes
0answers
24 views

unable to install g++ & gcc compiler in ubuntu 13.10 [duplicate]

I am trying to install g++ & gcc in ubuntu 13.10(3.11.0-15-generic), its showing dependencies issue. how to resolve this
0
votes
0answers
368 views

Installing GCC-4.8.2

I have downloaded GCC 4.8.2.tar.gz,I have also installed mpc,gmp,mpr packages. But still I am unable To install these compilers. While make file it gives me error configure: error: source directory ...
-1
votes
0answers
63 views

can not find crt1 crti

I am trying to compile fortran 77 by gcc 4.8, Ubuntu 12.04. I get this and I don't know how to fix it. I have to stay with fortran 77. I am beginner in Ubuntu. /usr/bin/ld: cannot find crt1.o: No ...
-1
votes
1answer
263 views

List containing functions used in C/C++ for Ubuntu's GCC/CC? [closed]

I'm new to programming. What I want is to know as much about programming as I possibly can, and start off with what people say is a good start: programming with C. I have this PDF called "Teach ...
0
votes
1answer
130 views

Problem installing SCTK 2.4.0 on Ubuntu 13.10

I'm trying to install SCTK 2.4.0 on Ubuntu 13.10 with gcc 4.8.1 installed on my system but I get this error after I run "make all" command: In file included from main.cpp:20:0: recording.h:122:29: ...
0
votes
2answers
3k views

apt-get: error loading libgcc_s.so.1

I am using Ubuntu 12.04.3 LTS, 64-bit, with gcc 4.6.3 I want to update gcc to 4.7, and do as the link said: How do I install gcc 4.7? But I got error: Fetched 14.0 MB in 18s (767 kB/s) ...
-1
votes
2answers
245 views

compiling a c++ program

I tried to compile a cpp program through the terminal on 13.04 but got this message: npg@NPG-ideaPad-S210:~$ gcc -o comp-LCG.cpp The program 'gcc' can be found in the following packages: * gcc * ...
0
votes
1answer
331 views

Where is my glut?

I try to compile c program : #include<GL/glut.h> #include<GL/glew.h> #include<GL/gl.h> #include<GL/glu.h> void main(int argc, char **argv) { glutInit(&argc, argv); ...
0
votes
1answer
333 views

install gcc and g++

I tried all the commands sudo apt-get build-dep build-essential sudo apt-get install gcc sudo apt-get install g++ But all time I am getting this error. The following packages have unmet ...
0
votes
1answer
849 views

C compiler cannot create excecutables

When I am trying to install a openvpn from a tarball , following error occurs checking whether the C compiler works... no configure: error: in `/home/shubhamd/Downloads/openvpn-2.3.2': ...
1
vote
0answers
465 views

HOSTCC scripts/basic/fixdep gcc: error trying to exec 'cc1': execvp: No such file or directory

hardik@ubuntu:~/ti-sdk-beagleboard-05.07.00.00/board-support/linux-3.3.7$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage HOSTCC scripts/basic/fixdep gcc: error trying to exec 'cc1': ...