Questions tagged [gcc]
Questions regarding GNU Compiler Collection Suite.
756 questions
3
votes
0
answers
60
views
Problem with xcb with shm and image = it works fine [closed]
I want to show how does it work under X11 with Xshm etc = OK fine if you resize window without flickering problem.
Example:
Code main.c ( X11 version )
#include <X11/Xlib.h>
#include <X11/...
4
votes
2
answers
853
views
Compiling stand-alone function binaries from the Linux kernel
How can I take snippets from the Linux kernel drivers' code, for example this drm_fb_helper_hotplug_event function inside drivers/gpu/drm/drm_fb_helper.c, and compile a binary file that I can run to ...
0
votes
0
answers
114
views
ldd not showing actual shared libraries address
After having deactivated ASLR, with:
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
I used ldd /path/to/binary to get the address of the shared library that my binary (written in C) was using, ...
0
votes
2
answers
150
views
cc/gcc -R flag to linker
Reference:
Weak symbol
In the link the following linker option is mentioned:
cc main.o -L`pwd` -Wl,-R`pwd` -lpowerslow -o main2
The purpose of all of the above flags have been documented in the GCC ...
1
vote
0
answers
84
views
Weird behavior: Does libasan consume system memory constantly in Linux?
I am working on an embedded Linux system (kernel-5.10), and the cross GCC only supports -fsanitize=address for address sanitizer.
Then I built a testing program with -fsanitize=address and -lasan. ...
0
votes
0
answers
44
views
Solaris 10 g++ virtual memory exhausted
I am trying to use the cm3-unix64le-d5.11.1-20210610 from the Modula 3 github. i am running the .cpp file and I get a virtual memory exhausted: Not enough space error. I have 16GB of RAM and I'm ...
0
votes
1
answer
105
views
Do I need to extract a source tar file for each pass in LFS, or does creating a seperate named "build" folder suffice (like "build", "build2")?
There's a handful of programs like GCC that not only require two different passes when setting up LFS, but as is the case with GCC, it is also used for Libstdc++.
When going thru this setting up for ...
0
votes
0
answers
159
views
cannot install yay -S --noconfirm bambustudio-git after yay -Syu to local/gcc 14.2.1+r134+gab884fffe3fc-1
I did a system upgrade on manjaro using yay -Syu. It appears it upgraded gcc to some experimental version.
I tried reinstalling gcc13 but it didn't fix the problem:
export LDFLAGS="${LDFLAGS/-...
2
votes
1
answer
576
views
How can I install gcc10 in amazon linux 2023?
I am trying to install the NVIDIA driver and Cuda toolkit but it expects gcc10. Using p2.xlarge which has Tesla k80. And Tesla k80 supports Cuda toolkit 11.4 (https://www.nvidia.com/en-us/drivers/). ...
0
votes
1
answer
409
views
dlsym, when run from an LD_PRELOAD interposer, does not find any symbols from the main program
/* dlsym-main.c */
#include <stdio.h>
void doSomething(char const *msg)
{
fprintf(stderr, "Main program is doing %s\n", msg);
}
void (*fnptr)(char const *) = doSomething;
int ...
0
votes
1
answer
105
views
Are gcc and g++ now distinct executables?
According to comments and accepted answers linked below, gcc and g++ are the same executable. Because they are the same, the value of argv[0] will determine behavior, whether the argument is "gcc&...
0
votes
1
answer
277
views
Compiling kernel modules for a Terramaster NAS
I'm having a bit of trouble with compiling the Coral AI PCIe drivers for my Terramaster NAS. Terramaster support has been no use at all. However, one other user has managed to compile some modules to ...
0
votes
0
answers
223
views
Linux From Scratch 12.1 GCC testsuite failing and timing out
I'm currently building Linux From Scratch 12.1 with the book, I've followed the instructions line by line. I'm struggling with the GCC testsuite, I have lots of FAIL and timeout. In addition to that, ...
0
votes
0
answers
397
views
RPM libgcc package conflicts with installed libgcc version newer
I am installing gcc4 (http://v14700.1blu.de/aix/index.php?n=Main.Gcc#v4.8.3) on aix.
One of the dependencies is libgcc 4.8.3-1.I install it via rpm -i libgcc-4.8.3-1.aix7.1.ppc.rpm and get the error: ...
0
votes
1
answer
157
views
Building and installing GCC 12 in a parallel/sub prefix on heavily modified Ubuntu 14.04
One of my systems that I still use a lot runs a kind of "Frankenbuntu" 14.04 that has received lots of additional updates via PPAs and software I build and install to /opt/local (using an ...
0
votes
2
answers
358
views
I'm Using Distribution $X That was shipped With Compiler $Y, but I Need Compiler Version $Z
Issue
This question, and answers containing various approaches to solving it comes up many times almost daily on our exchange here. If a search result brought you here Welcome! If a comment I left in ...
5
votes
1
answer
2k
views
How to robustly determine which version of GCC was used to build the kernel from bash shell
What is a robust way in a bash shell to determine the version of GCC used to compile the currently running kernel? I need it in the form of major.minor.patch so that I can compare it with the last ...
6
votes
4
answers
15k
views
Unrecognized command-line option ‘-ftrivial-auto-var-init=zero’ when building kernel module
I have very little experience with kernel module development. Despite this I have been tasked with maintaining an old driver for a Sensoray 626 DAQ card. I am using a very simple dkms setup to build ...
1
vote
1
answer
867
views
How can I build an older GCC version (8.5.0) on a newer Linux distribution (Devuan Excalibur/Debian Trixie)?
If I download and try to build GCC 8.x on a newer machine, e.g. Devuan Excalibur GNU/Linux (i.e. Debian Trixie without systemd) - this fails, with the error going something like this:
libstdc++.so.6: ...
0
votes
1
answer
212
views
Allowing just switch ranges in gcc
I'm trying to clean up some C code and build a Debian package. The makefile was set to use -Wall but debuild uses -Wpedantic .
As it happens this was "a good thing" as the code was casting ...
2
votes
2
answers
3k
views
Before you can run VMware several modules must be compiled (vmmon and vmnet)
I just restarted my Pop!_OS and when trying to open vmware it says I have to compile several modules. It then goes onto trying to compile vmmon and vmnet, which fails. and gives me an error log file.
...
0
votes
1
answer
209
views
is it possible to link the zlib when genreate so with gcc
I need to invoke the c method from rust. Fisrt step, I am using gcc to generate a so file like this:
gcc -shared *.o -o libsynctex_parser.so
But when I build the rust project, it shows that the c ...
1
vote
2
answers
4k
views
Error building GCC 9: version `GLIBCXX_3.4.30' not found
I've been trying to install GCC 9.5 on Debian Bookworm (12) using gcc-12 which is available in the Debian repos. The build fails at make citing it couldn't find GLIBCXX_3.4.30. The relevant part of ...
1
vote
1
answer
404
views
make menuconfig hangs when trying to compile linux kernel 6.1.44
I am trying to compile linux kernel 6.1 on Debian 12.
I have installed the build environment:
apt-get install build-essential bc libncurses-dev libssl-dev libelf-dev bison flex
Now when I run make ...
0
votes
1
answer
716
views
Why is debug flag in GCC abbreviated "g"?
In GCC the debug flag is "-g". I have not been able to find why "g" was chosen for this. Does anyone know?