Questions tagged [gcc]
Questions regarding GNU Compiler Collection Suite.
756 questions
0
votes
0
answers
326
views
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 is reduced by 11 GiB after compiling (...
0
votes
1
answer
154
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 ...
0
votes
1
answer
62
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....
0
votes
1
answer
138
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": &...
0
votes
0
answers
158
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, ...
5
votes
1
answer
7k
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. ...
0
votes
1
answer
1k
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, ...
1
vote
0
answers
196
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, ...
3
votes
0
answers
93
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 ...
0
votes
1
answer
1k
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 ...
1
vote
0
answers
810
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-...
0
votes
1
answer
1k
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'...
0
votes
0
answers
62
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 ...
1
vote
0
answers
2k
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 ...
1
vote
2
answers
4k
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
20k
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 ...
0
votes
1
answer
205
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/...
0
votes
1
answer
897
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 ...
1
vote
1
answer
2k
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
...
0
votes
0
answers
2k
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
...
0
votes
0
answers
534
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,...
1
vote
0
answers
853
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
...
1
vote
1
answer
699
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."
...
0
votes
0
answers
390
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=$(...