Questions tagged [gcc]
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.
1,196
questions
-3
votes
0
answers
27
views
Not able to find the location of gcc package
The error says that it cannot find the location of gcc package nor it is installing gcc.
0
votes
1
answer
29
views
Custom alias to run and compile .c file
I'm trying to create custom alias to to compile and run my .c files in one command. I tried to add this line in /.bashrc_aliases alias runc='gcc $1 -lm && ./a.out' however I get an error and ...
0
votes
0
answers
103
views
ubuntu 23.10. Error updating the kernel
Prop. of my Ubuntu
PRETTY_NAME="Ubuntu 23.10"
uname -r
5.15.0-72-generic
Error updating the kernel to version 6.5
logs:
dkms/anbox-ashmem/1/build/make.log
DKMS make.log for anbox-ashmem-1 ...
-1
votes
0
answers
40
views
openAuto building
the building process of openauto project gives this error can anyone help?
abdelrahman@ubuntu:~/Downloads/openauto-1.1.1/build$ make
Scanning dependencies of target btservice_autogen
[ 2%] Automatic ...
0
votes
1
answer
264
views
nvidia installer is using older version of GCC by default
I'm using Ubunut 22.04, I want to install nvidia driver: sudo ./cuda_12.1.0_530.30.02_linux.run, but I get a warning first:
warning: the compiler differs from the one used to build the kernel
...
0
votes
1
answer
53
views
Seeking gcc-8 packages form Ubuntu22 on ARM (Mac)
I have a Ubuntu22 version running on an arm architecture (Mac M2) and need to install an earlier version of the gcc compiler (Version 8).
I am sorry if this sounds stupid but I have so far only found ...
0
votes
1
answer
63
views
Is the creation of linux shared libraries consistent between linux x86_64 and arm64 architectures?
I'm wondering if the way we create shared libraries is the same between these two architectures.
Let's say I have the file fx.c that contains some function definitions, so I would create a shared ...
1
vote
1
answer
88
views
upgradable but not upgrading from jammy-updates and jammy-security
I have upgraded from 20.04 to 22.04, and have two packages in state "upgradable" but not upgrading, which seem to have been kept back:
$ sudo apt upgrade
Reading package lists... Done
...
5
votes
2
answers
758
views
How can I use a later version of GCC than the system runtimes support? Can software built with it run on a system with only normal packages installed?
I don't use Ubuntu very much, being a platforms and builds engineer in an organisation that's primarily Red Hat Enterprise and its work-alikes.
The problem with just building and using an up-to-date ...
2
votes
1
answer
2k
views
Issues after ubuntu 22.04.3 upgraded to linux 6.5.0-14
I have 2 issues since being upgraded to linux 6.5.0-14 from 6.2.0-39:
#1:
I'm unable to compile the modules needed for vmware workstation player 17. Version 17.0.2 build-21581411. At first it could ...
0
votes
1
answer
212
views
gcc not installing correctly when using apt on ubuntu 22.04 [duplicate]
I tried installing nvidia drivers through an install script but got the error
ERROR: Unable to find the development tool `cc` in your
path; please make sure that you have the package ...
3
votes
2
answers
7k
views
Ubuntu 22.04 default GCC version does not match version that built latest default kernel
On Ubuntu 22.04, the default GNU C compiler version is gcc-11. However, it appears that the latest default kernel version (6.5.0-14-generic as of writing this question) is built using gcc-12. Why is ...
1
vote
3
answers
3k
views
Ubuntu 22.04.3 - VMware Kernel Module Updater
Ran into the GNU C Compiler (gcc) version 12.3.0 was not found.
I have seen this issue before and have resolved it, however when I run the commands below I still receive the request for GCC. Is the ...
0
votes
1
answer
90
views
Software updater doesn't let me check some boxes
Software updater on Ubuntu 22.04 shows two equal updates available for
GCC: GNU Compiler collection (22 kb) each, but their box cannot be checked.
If I run sudo apt-get upgrade on a terminal it finds ...
0
votes
2
answers
402
views
dist upgrade from 20.04 to 22.04 and now gcc is broken
I've just done a dist upgrade from 20.04 to 22.04
gcc was installed before but now it no longer works
Command 'gcc' not found, but can be installed with:
apt install gcc
But this throws
Reading ...
0
votes
3
answers
377
views
How to install gcc-5.5 in ubuntu? how can I switch gcc version arbitrarily in ubuntu?
Sorry, gays. I forgot to tell you the purpose of installing the old version of gcc, because I need to use the sofeware gpgpu-sim( https://github.com/gpgpu-sim/gpgpu-sim_distribution) to simulate the ...
0
votes
1
answer
372
views
Eclipse Build: undefined reference to `lstat@GLIBC_2.33'
Im porting a command line application from windows to linux.
This application uses some 3rd Party closed source libraries.
Using one such library (with a .so file) i get a number of linker errors:
...
0
votes
1
answer
117
views
Problems with libgtk-3-dev and libgtk-4-dev
I recently installed the libgtk-3-dev/libgtk-4-dev apt packages on my machine.
When using the <gtk/gtk.h> header in my C code and compiling, GCC throws an error saying that it cannot find the ...
1
vote
0
answers
706
views
ppa ubuntu-toolchain-r unable to locate package g++13
I am trying to add a newer gcc toolchain to my docker image (based upon ubuntu:20.04).
I am following the steps from this article.
In the docker's bash I run:
add-apt-repository ppa:ubuntu-toolchain-r/...
2
votes
0
answers
171
views
Is there any way to ensure that few symbols of static library get definitely loaded into .so file?
We have a huge amount of cpp files and taking a piece of code where we need some clarification regarding that. As we have cpp files we compile those into multiple static libraries and those result ...
5
votes
1
answer
4k
views
How do I install the gcc-13 aarch64 cross compiler on Ubuntu 22.04?
The Linux kernel now requires gcc v13 in order to compile, but Ubuntu 22.04 is stuck on gcc v11. I found instructions to install the latest native gcc-13 via a PPA (https://launchpad.net/~ubuntu-...
0
votes
1
answer
85
views
Install gcc/g++ 6 on Ubuntu 20.1 [closed]
I'm trying to install gcc/g++ 6.
I have tried to modify sources.list and adding:
deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe
However this method does not work.
Another method ...
0
votes
1
answer
46
views
GCC 7.4.0 compilation gets stuck at contribs/download_prerequisites
When running contribs/download_prerequisites the script gets stuck without any output. How can I resolve this?
0
votes
0
answers
95
views
How to fix this error when building Linux Kernel 2.4.36.1?
I want to build a Linux Kernel 2.4.36.1 from the source codes. However the following errors occurred. I used the WSL Ubuntu on Windows 11 and please see the following information:
dingjun@G02515:~/...
0
votes
0
answers
54
views
soname confusion
I read in many places about the 'real' library name and the symbolic link name.
But I want to understand how exactly the linker is searching?
Sometimes i see three different patterns of setting up the ...
0
votes
0
answers
88
views
Why does accessing thread-local-storage (TLS) in library loaded by statically linked dlopen segfault?
I have an exe linked with gcc -static that uses dlopen to load a shared library. The library tries to access a variable in thread-local-storage (TLS). Running the application segfaults when we attempt ...
0
votes
0
answers
116
views
How to add math library for gcc in docker Image?
I am trying to containerize LuaJIT, a derivative of Ubuntu image. I've installed build-essentials and I am getting the below compiler error saying that I am missing math library. There is already -lm ...
1
vote
0
answers
80
views
I'm trying to build m3tools and get this super long error
I'm trying to build I/O API 3.2 to use CMAQ. I'm on Ubuntu 22.04.3, using GCC compilers (v11.4.0). I/O API requires both NetCDF-C (v4.9.2) and NetCDF-Fortran (v4.6.1). I'm also using OpenMPI (v4.1.2). ...
0
votes
0
answers
214
views
Binary files not being generated
When I try to compile a c, c++, or fortran code no binaries are generated and no errors are thrown by the compilers neither. This seems to be independent of the compiler. For example, below I try to ...
0
votes
1
answer
300
views
"make" command not working
I'm currently trying to install graphics.h to do C programming, but I've been having a problem that I've been unable to solve so far.
Every tutorial explaining the process is the exact same, and they ...
0
votes
1
answer
44
views
Some gcc background operation clogs my CPU
My system is a ThinkPad T14 Gen 1 with an AMD Ryzen 7 pro 4700u, running Ubuntu 22.04.3 LTS. Gnome is Version 42.9 on Wayland.
Please see the following screenshot from Gnome System Monitor:
Some ...
0
votes
0
answers
61
views
gcc <brace-enclosed initializer list> error on Ubuntu 22.04
static unordered_map<string,RoadType> const road_type_string_map = {
{ "unclassified", RoadType::unclassified },
{ "service", RoadType::service },
{ "residential&...
0
votes
0
answers
260
views
Ubuntu on wsl always "fails to fetch" whenever I'm trying to download to it. How can i fix this?
I'm just starting out on Linux (working on WSL since it's probably the simplest option for me), as I'm trying to run the Community Multiscale Air Quality modeling system. This requires a compiler, but ...
0
votes
0
answers
308
views
ld: library not found for -lgsl
I am trying to run a c code in Mac for the first time. My GSL libraries are stored in the path: /opt/homebrew/Cellar/gsl/2.7.1/include/gsl.
So, I was trying to go with: gcc-13 -I/opt/homebrew/Cellar/...
1
vote
0
answers
243
views
How to set enviroment to use older gcc g++ version without changing default?
When trying to launch application I get this error:
/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib/x86_64-linux-gnu/libGLU.so.1)
now this is certainly because I'm using Ubuntu 20....
1
vote
0
answers
206
views
Why is this bus error occurring when reading through a shared memory object?
Version: Ubuntu 22.04.3
GCC: 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
Hi,
I'm trying to create a program with a very large shared memory object. This is being done on an AWS EC2 instance with 130GB of ...
0
votes
1
answer
359
views
Wrongful error on version mismatch - gcc 11.4.0 kernel nvidia-cuda-515
There was an update in my Ubuntu 22.04.03 LTS OS last week, and my nvidia-515 with cuda 11.7 broke. On reinstalling, it fails. I'm stuck, tried to debug and inspect logs - which points to version ...
0
votes
1
answer
402
views
Getting error on WiFi driver installation on upgrading to Ubuntu 22.04.3LTS
My WiFi worked fine with Ubuntu 18.04 on my HP-ab516tx laptop. Then I updated to 20.04 and my WiFi didn't work. My visible network list was empty. I found the now deleted from Github, rtlwifi_new ...
0
votes
0
answers
253
views
can't download gcc 11.3.0
I have gcc 11.4.0 in my Ubuntu 22.04 LTS machine with kernel 5.19.0-32-generic. I want to install NVIDIA CUDA. But in the official supported versions table, it says that: cuda ubuntu supported ...
0
votes
0
answers
672
views
Can't find gcc-11 11.3.0 for ubuntu 22.04
I'm trying to downgrade my version of gcc-11 from 11.4 to 11.3, but when I check the packages repository, I only see 11.2 and 11.4. Is there a way to safely install version 11.3 for Ubuntu 22.04?
1
vote
0
answers
999
views
How to use an old version of gcc-11 in Ubuntu 22.04
I tried to install CUDA 11.7 tookit on Ubuntu 22.04.3 LTS. I followed the steps on NVIDIA website:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
...
0
votes
0
answers
46
views
code compilation issues
I am working on a project related to jet physics.
For that, I am using a Linux terminal in my Ubuntu 22.04 LTS. I use libraries of Pythia, Fastjet and fastjet-contrib in my code.
When I recently used ...
0
votes
1
answer
159
views
is there a command to install all the developer tools like gcc etc all at once? [duplicate]
is there a command to install all the developer tools like gcc etc all at once?
0
votes
0
answers
369
views
Hi, I'm new to Ubuntu. I'm using Ubuntu 22.04 and I want to install an older version of gcc -gcc-7
which gcc gives - /usr/bin/gcc
gcc version shows - gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
update-alternatives --query gcc gives - no alternatives for gcc
sudo apt-get install g++-7 gives - ...
2
votes
1
answer
12k
views
Install a specific gcc version to match the version the kernel was compiled with (I have 11.4.0 need 11.3.0)
In an effort to fix issues with nvidea graphics where it briefly flickers black (after upgrade), I am trying to install an older driver. However the nvidea driver complains the compiler version used ...
0
votes
0
answers
70
views
MIPS cross-compile package, libc6-dev-mips-cross, is missing libcrypt
I am trying to cross-compile a program for the MIPS architecture that requires libcrypt.
It works on a machine that has the Ubuntu Focal release, and that make sense since I can find libcrypt in the ...
2
votes
0
answers
399
views
amdgpu-dkms not building due to lack of cc1 though cc1 cannot be reinstalled?
I am currently trying to update my AMD drivers on Ubuntu/also downloading the HIP drivers for blender cycles rendering. Problem is that when I install it using the latest amdgpu-install script (with ...
-1
votes
1
answer
913
views
Identifier cout is undefined
I am compiling below code with GCC-12 compiler on Ubuntu 22.04 LTS. I have 2 different versions of GCC installed on my machine 11 and 12.
#include <iostream>
using namespace std;
int main() {
...
0
votes
1
answer
168
views
Configuring Julius : C compiler cannot create executables
I am sure this question has been asked many times on this forum, yet I am asking this because my context is different. I was trying to install Julius speech recognition on my Windows 10 PC. Of course ...
1
vote
1
answer
495
views
GNU compiler below the required version
I'm obtaining this error message: GNU 7.5.0 compiler is below the minimum required version 8.0.0
even though when I type "sudo apt install gcc-8 g++-8", I obtain an output saying that gcc 8 ...