Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

GNU Compiler Collection, or formerly GNU C Compiler, is a suite of compiler tools for various programming languages like: C, C++, Objective-C, Java, Ada, Fortran, and Go. The GNU Compiler collection had it's first release back in 1987. GCC has been written initially by Richard Stallman and is currently maintained by the Free Software Foundation.

734 questions
47
votes
1 answer

How long does it take to compile gcc 7.3.0?

So far it's been running for about 4 hours. One thing to note is that I did not have the prerequisites and had to download them though contrib/download_prerequisites. Not sure if it adds to the compile time or not. Machine specs listed below: 4 CPUs…
Ya.
  • 1,193
37
votes
4 answers

Relationship between cc1 and gcc?

I'm trying to install Ruby in my home directory on a Linux server (without root access), which of course requires using gcc. The closest thing I can find is a directory by that name which (if you go deep enough) contains cc1: >: find / -iname gcc…
iconoclast
  • 9,198
  • 13
  • 57
  • 97
8
votes
1 answer

Gcc : ld cannot find -lc

I'm trying to compile a simple program with gcc main.c and gcc throws me the following error /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status How can I resolve this problem ? I'm on Linux Mint 17.2, gcc version is 4.8.4
Bilow
  • 634
5
votes
2 answers

Compiling C++11 code on old machines

I'm trying to compile a C++11 project on a bunch of old machines with old kernels. They're running CentOS 6.2, 6.3 Alt Linux 4.1. Others are unknown but similarly old. The machines won't let me install a newer version of GCC. 4.4 is the max they can…
5
votes
2 answers

Printing out standard C/GCC predefined macros in terminal

I am wondering if there is a way to simply output to the terminal the value of some global/standard definitions of C/GCC, e.g. using the echo command, without writing C code and using printf? I mean things like __GNUC_, __UINT64_MAX__,…
Dumbo
  • 1,566
3
votes
1 answer

How to stop g++ linking/including old system headers/libs from /usr/*?

The server I want to run some code on has older versions of gcc (gmp, mpc, mpfr too) installed in the standard locations like /usr* the admin is unwilling to update but has allowed me to install a newer version of gcc in my /home/username directory.…
fpghost
  • 727
3
votes
0 answers

gcc g++ - configure: error: *** A compiler with support for C++11 language features is required

I'm trying to compile and build libsigc++-2.10.2 on cygwin with gcc 8.3.0. $ gcc --version gcc (GCC) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not…
Bateman
  • 71
2
votes
1 answer

What is -J n Option for in GCC?

I have a final exam next week, and in the exercise paper which is given us to study, there is a gcc option that I could not find on gcc manual page. It is something like that gcc -J 4 program.c -o filename. Is there someone knows that what it is…
lasey
  • 39
1
vote
1 answer

Error with Class locale with gcc 2.96

I am using Red Hat Linux release 9 Kernel 2.4.20-8 on an i686 with gcc version 2.96. In my code I am declaring like, std::locale utf8_locale; I am getting this error: syntax error before `;' Please suggest me with a solution.
1
vote
1 answer

gcc nonexist directory: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include

https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-is output: ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory…
jian
  • 567
1
vote
1 answer

How to build the GCC HTML documentation from source into a single page?

I had asked a similar thing for GDB at: How to build the GDB documentation from source? , and it changed my life, now I want the same for GCC! I managed to build the docs on Ubuntu 16.04 and gcc 6.4.0 source tree (to match my host)…
Ciro Santilli OurBigBook.com
  • 18,092
  • 4
  • 117
  • 102
1
vote
1 answer

Running gcc from prefix folder

I have a user account on RHEL 6.7. The built-in gcc does not support c++11, so I am trying to install my a more recent gcc. I have run configure with --prefix=$HOME/dependencies/gcc , make, make install, and updated my environment…
LinAlg
  • 113
1
vote
0 answers

Error with installation of HDF-EOS5 augmentation tool: Cannot find -lGtcp

I am trying to compile the HDF-EOS5 augmentation tool. However, when I run: ./configure --with-hdfeos5=/HDF-EOS5-path/ I get the error: checking for inv_init in -lGctp... no configure: error: invalid Gctp in hdfeos5 When I try to check the…
M. dike
  • 11
1
vote
1 answer

how can the gcc 6 option "-Wmisleading-indentation" work reliable?

Reading the GCC 6 Release Series Changes, New Features, and Fixes I find very interesting the new option -Wmisleading-indentation: -Wmisleading-indentation warns about places where the indentation of the code gives a misleading idea of the block…
Peter VARGA
  • 1,012
0
votes
0 answers

How to cleanup unnecessary intermediate build results (like .o files) after compiling GCC from source?

I have built GCC 13.1 from source code. The source folder after building (with all the parameters at their defaults) is 6.9 GiB in size. In total my free space reduces by 11 GiB after compiling (not including the size of the sources themselves). I…
1
2