As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

Filter by
Sorted by
Tagged with
0 votes
2 answers
27 views

Differences between gcc and gcc-X

I'm using Ubuntu 18.04.6 LTS and when I use dpkg -l command, the result contains the following entries: ii gcc 4:7.4.0-1ubu amd64 GNU C compiler ii gcc-7 7.5.0-3ubunt ...
Yiyang Yan's user avatar
-1 votes
1 answer
286 views

Installing GCC 13.1.0 on x86_64 Debian

Did anybody here manage to install GCC 13.1.0 on their computer? When I try to build it from source on my 64-bit Debian Linux, I get the following error message: /usr/bin/ld: .libs/hwasan.o: ...
FlatAssembler's user avatar
0 votes
1 answer
28 views

What is "Ar.1" in glibc-2.17-324.el7_9.Ar.1.x86_64

For some reason my system has glibc-2.17-324.el7_9.Ar.1.x86_64 installed. Not sure what that Ar.1 is doing there. I need to install glibc-devel, which complains because it requires glibc-2.17-324....
Mo Fatty's user avatar
0 votes
2 answers
41 views

How to pipe an object file into GCC for linking?

My custom compiler for a toy language uses Cranelift to generate object code, that I can write into a file main.o. To make this object file into an executable file, I invoke GCC with gcc -o main main....
Altareos's user avatar
  • 103
0 votes
1 answer
36 views

gcc doesn't find output fine and therefore cannot compile my c program (vscode)

As the title suggests it is the output file it cannot find, not sure why this is an issue here is my c_cpp_properties.json: { "configurations": [ { "name": &...
Manfred's user avatar
  • 25
0 votes
0 answers
292 views

unrecognized option '-EL'

I'm trying to build an android kernel. On every build I get a few errors: /usr/bin/as: unrecognized option '-EL' clang-16: error: assembler command failed with exit code 1 (use -v to see invocation) ...
JohnTit's user avatar
0 votes
0 answers
29 views

What is the bootstrapping technique in terms of building cross-gcc and cross-glibc?

Some tutorials for building linux from ground do in first step building the cross compiler toolchain. They do this by invoking so called bootstrapping technique. First they build cross-gcc statically, ...
ptiza_v_nebe's user avatar
1 vote
1 answer
65 views

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 ...
jian's user avatar
  • 517
5 votes
1 answer
1k views

How to build GCC 13 on M1 MacBook pro?

I want to build gcc-13 on my M1 MacBook Pro. Following official document, I download source code using git, configure and make. For configure, I refer to the way of Homebrew configure gcc-12 on link. ...
徐保钰's user avatar
  • 191
2 votes
1 answer
189 views

GCC linker search path when cross-compiling

I have various tool chain directories on my linux machine for compiling under specific compiler versions. I have a problem where the linker (in the tool chain dir) is selecting a library file from ...
kfank's user avatar
  • 21
0 votes
1 answer
237 views

what target flag should I set to cross compile arm 32 bit code in gcc?

I'm trying to build a cross compiling build server for some 32 bit arm devices, where the architecture is: (from uname -m) "armv5tejl" I have to specify the target for binutils, and gcc, ...
j0h's user avatar
  • 3,437
0 votes
1 answer
97 views

Why compiling Fortran code with include is different from #include?

I can't understand why including a text file that contains some C lines in a fortran77 code gives me a warning if I do not use #include. I wrote an example of a code that is supposed to read some text ...
Giorgio Maria Cavallazzi's user avatar
1 vote
0 answers
81 views

Testing gcc command in Linux From Scratch?

Linux From Scratch tells me to run these commands to test that the new toolchain is working: echo 'int main(){}' | gcc -xc - readelf -l a.out | grep ld-linux So since I am testing the new toolchain, ...
IPmanfkawde's user avatar
0 votes
0 answers
35 views

Can't compile program written for gcc 3.2.2, Stubb 2.1

I need to compile an older software, Stubb 2.1 https://github.com/UIUCSinhaLab/Stubb, using the earliest available gcc (3.3) along with numerous warnings I get this error: /usr/bin/ld: skipping ...
Pierre Raynerd's user avatar
2 votes
1 answer
875 views

gcc-12 not updating despite newer versions being available from jammy-security

I am running Ubuntu 22.04 and I am trying to update gcc-12 and all its related dependencies (currently version 12.1.0-7) to the latest version available in jammy-security (12.1.0-2ubuntu1~22.04) but ...
user781728's user avatar
3 votes
0 answers
36 views

Minimizing disk usage with parallel calls to GCC

I am experimenting with testing GCC in parallel. My setup will run 96 tests before giving me the test report. If I run these tests sequentially it will invoke GCC once, run the executable, gather ...
Rewbert's user avatar
  • 131
0 votes
1 answer
71 views

Upgrading gcc (+jit) outside of any package manager help : What else to rebuild?

Currently using now-unsupported ggc 9 on a Linux-5.4, I need to upgrade to at least gcc 10. A/ For whatever let's say historical reason, this upgrade must be carried on without relying on whatever ...
MC68020's user avatar
  • 5,943
0 votes
1 answer
349 views

error trying to build/make from source

I'm trying to build opendingux from github repo/source. https://github.com/OpenDingux/buildroot OpenDingux is an embedded Linux distribution focused on (retro) gaming. I cloned the repo and then ran ...
AeroMaxx's user avatar
  • 179
3 votes
0 answers
389 views

installing latest version of gcc in ubuntu 20.04

I installed build_essential on Ubuntu 20.04 and it installed GCC version 9.x But the latest version of GCC is 11.x. How can I install the latest version of gcc into Ubuntu 20.04? I already tried these ...
user654019's user avatar
  • 2,267
1 vote
0 answers
437 views

Compiling GCC 12.2.0 fails

I've been following instructions from https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter05/gcc-pass1.html, but compiling GCC fails with the error /usr/bin/ld: ../build-x86_64-pc-linux-...
HAHALOSAH's user avatar
1 vote
1 answer
218 views

How are system call functions linked to an executable?

Say I write a non-sensical program that features a single system call, open: #include <fcntl.h> void main() { int hi = open("does not exist", 0); } When I compile the program ...
Izzo's user avatar
  • 969
0 votes
1 answer
412 views

Not able to compile GTK files

I installed gtk manually through source and everything was correct but when I try to run my gtk C files. It gives an error saying that the <gtk/gtk.h> are not found. So far I understood that it'...
Ahmad Raza Khan's user avatar
1 vote
1 answer
242 views

sh fun.sh : No such file or directory gcc: fatal error: no input files

I am creating a shell file on the fly containing following commands #!/bin/sh gcc -Wall -c *.c gcc -shared -o libr.so *.o When I cd to that location and run the shell script using this ...
PRIYANSHU MISHRA's user avatar
0 votes
0 answers
25 views

How to compile JSVM reference implementation in 2022?

I need to compile the JSVM reference implementation. The code can be found here: https://vcgit.hhi.fraunhofer.de/jvet/jsvm The instructions included say one should use gcc version 4: # Building the ...
bouffelec's user avatar
1 vote
0 answers
3k views

Ubuntu 22.04 and GCC < 11

I've installed Ubuntu 22.04 fresh and it turns out it is using gcc/g++11: g++ --version g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Now, this won't work for many installation scripts and I'd like to have a ...
Jaegermeister's user avatar
1 vote
0 answers
783 views

error: *** A compiler with support for C++11 language features is required

I want to Build GCC 11 from source on Ubuntu 20.04. I had some problems in making package for ROS and hence I decide to update my GNU. my gcc and g++ versions are 11.1.0 when I extract the downloaded ...
Pouyan's user avatar
  • 13
-2 votes
1 answer
169 views

gcc compile instruction contain flag -03. What does it do?

https://stackoverflow.com/a/71366629/15603477 gcc -Wall -Wextra -Werror -O3 -std=c17 read_stdin_fgets_basic_input_from_user.c -o bin/a && bin/a The whole line I don't understand -03 part. But ...
jian's user avatar
  • 517
0 votes
1 answer
1k views

Linux kernel 5.15.54 compilation errors with GCC 12.1

I'm trying to recompile the kernel (following the official Arch Linux guide: https://wiki.archlinux.org/title/Kernel/Traditional_compilation) but every time I get compilation errors: In file included ...
jenusipr's user avatar
0 votes
0 answers
513 views

RHEL8 - Facing issue while installing devtoolset-7/8/9 etc

I'm trying to install devtoolset-7, devtoolset-8 & devtoolset-9 on an RHEL-8 VM by following the blog here: https://developers.redhat.com/products/developertoolset/hello-world https://blog.abysm....
Abhi's user avatar
  • 1
0 votes
1 answer
163 views

What option provide to CMake to demangle stackframe output?

To print the stackframe this method is used. But it prints mostly executable name with addresses. 0 ./fish(+0xa307b) [0x556c9198c07b] 1 ./fish(+0xb0cf2) [0x556c91999cf2] 2 ./fish(+0xb218a) [...
amordo's user avatar
  • 103
0 votes
1 answer
490 views

full path of libm.a in gcc version 9

based on this: https://stackoverflow.com/questions/5925678/location-of-c-standard-library gcc --print-file-name=libm.a return: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.a However ...
jian's user avatar
  • 517
0 votes
1 answer
512 views

Make: Include file causes "Permission denied" while trying to compile kernel

I am trying to compile linux-5.18.1. I downloaded the tar ball, unpacked it and ran make defconfig. If I then run make, I run into this problem after a while: drivers/gpu/drm/i915/gt/intel_rps.c:16:10:...
rlakoda's user avatar
  • 21
0 votes
1 answer
8k views

How to install gcc and build-essential on debian 11?

In the /etc/apt/sources.list, the allowed sources are deb http://deb.debian.org/debian buster main contrib non-free deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free deb ...
Jingqiang Zhang's user avatar
0 votes
2 answers
8k views

checking whether the C compiler works... no

I'm trying to build Linux From Scratch (LFS) I'm just following this books https://www.linuxfromscratch.org/lfs/view/stable/chapter08/eudev.html I have this error after I run ./configure in eudev ...
Muhammad Ikhwan Perwira's user avatar
0 votes
1 answer
55 views

How to link using -lfoo when there are versioned names of libfoo but no libfoo.so

Suppose /usr/lib/x86_64-linux-gnu/ contains libfoo: libfoo.so.2 -> libfoo.so.2.0.0 (symbolic link) libfoo.so.2.0.0 Notably missing is libfoo.so. Suppose there is a program /usr/local/bin/...
Flux's user avatar
  • 2,426
0 votes
0 answers
1k views

x86_64-redhat-linux/7/ld: cannot find -lm

I have CentOs 7.9 and installed the scl devtoolset-7. I receive the following errors: /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: cannot find -lm /opt/rh/devtoolset-7/root/usr/...
Lina 's user avatar
0 votes
1 answer
600 views

GCC-11 installation error in centos 7 (environmental changes)?

I installed the latest version of GCC 11.2V using conda, conda install -c conda-forge gcc" in my linux server (Centos7). After I try to login into my server, after login it shows some weird ...
sunnykevin's user avatar
0 votes
1 answer
547 views

How to install gcc-5 on Debian 8.10?

I am trying to install gcc-5 on debian 8.10 on a beaglebone green. I have looked at many threads, of which the following was the most promising. How to install GCC 5 on debian jessie 8.1 When I try to ...
big friendly giant's user avatar
0 votes
1 answer
222 views

Cross Compilation ARMHF or Compilation for Android from Debian or Ubuntu package?

I have two options to compile: Cross-compile using an amd64 Ubuntu or Debian system for armhf package compilation. Run an armhf image of Ubuntu or Debian in QEMU. The problem I have is that when ...
Matty A.D.'s user avatar
1 vote
1 answer
1k views

32bit program on 64bit: cannot execute binary file: Exec format error

I'm linking an application consisting out of two libraries in clang under WSL. The command I use looks as follows (simplified): clang -m32 -fsanitize=address -L _build/ -l:lib1.lib -l:lib2.lib -o test ...
tl-photography.at's user avatar
0 votes
1 answer
2k views

Specify which libstdc++ to use

I want to make use of a more recent GCC version. Therefore, I compiled GCC 10 and installed it into a non-standard directory /software/gcc10/. So far so good. However, I am faced with problems when I ...
Raven's user avatar
  • 653
0 votes
0 answers
721 views

Installing GCC4.8.5 on CentOS8 using GCC8.5

I am trying to install GCC4.8.5 under CentOS 8 using GCC 8.5. Here's what I did Get the compiler and its dependencies wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz tar zxf gcc-4.8.5.tar.gz ...
GuoFeng Wang's user avatar
0 votes
0 answers
995 views

cmake unable to find CC

I am newbie in Linux, I am using WSL ubuntu 20.04. I am trying to build a project using cmake file. I am getting following error:- CMake Error at /usr/local/share/cmake-3.20/Modules/...
tabish's user avatar
  • 478
0 votes
0 answers
275 views

Getting newer GCC version in Ubuntu

I have Ubuntu 18.04. I want to get newer GCC version. How to do that from ternimal? I am getting this: gcc --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation,...
user15864's user avatar
  • 113
1 vote
1 answer
255 views

Is there a way to automatically scroll terminal back?

When you are building some code (for example with gcc) you usually have lots of lines of output information. If there are errors, the first one usually located somewhere in the middle of output and I ...
dinpin's user avatar
  • 11
1 vote
0 answers
341 views

--enable-languages unrecognized option for configure

I am trying to do a build of gcc11 (on RHEL 7.6 which comes with 4.8.5 and no root access). When I run the following: ./configure --prefix=$HOME/gnu --enable-languages=c,c++ I get the response ...
LaptopProfile's user avatar
0 votes
1 answer
45 views

as .*s does not work like gcc .*c

when i run gcc -c *.c, it runs:- gcc -c file1.c -o file1.o gcc -c file2.c -o file2.o gcc -c file3.c -o file3.o ... but as *.s runs:- as file1.s -o a.out as file2.s -o a.out as file3.s -o a.out ... ...
user135142's user avatar
1 vote
1 answer
337 views

Why does debsums show libgcc_s.so.1 as "replaced" and what should be done about it?

On Debian11/KDE debsums | grep -v OK showed /lib/x86_64-linux-gnu/libgcc_s.so.1 as REPLACED. "Replaced" means that "The file has been replaced by a file from a different package." ...
mYnDstrEAm's user avatar
  • 3,850
0 votes
1 answer
2k views

Trying to install gcc on a linux terminal, but I get an error

Trying to install gcc on my computer, but I get this error: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/b/binutils/libctf0_2.34-6ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88....
Cole's user avatar
  • 1
0 votes
0 answers
207 views

How to define a variable in .def file in Linux

I am working first time on def file in Linux, but don't know how to set a variable in def file. i tried by below ways, but it's not working for me. **Test_DIR=/usr/include/ TEST_DIR_GCC_VERSION=$(...
Mausam Sinha's user avatar

1
2 3 4 5
15