Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

On 24.04 how can I Install GCC 14.1

I want to install G++ 14.1 on Ubuntu 24.04. I have 14.0 installed, but 14.1 fixes some bugs. I don't want to build from source. I did a cross compiler build a few years ago and it kept crashing my ...
rm1948's user avatar
  • 142
1 vote
0 answers
33 views

sudo apt install gcc fails

sudo apt install gcc Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ...
carlos palma's user avatar
0 votes
0 answers
102 views

Fatal error: defs.h: No such file or directory When using gcc to compile .c file

Using Openairinterface5g Open source software and am trying to compile one of the .c files using gcc - I keep on getting a very similar 'Fatal error' message which revolves around some sort of header ...
Dudley008's user avatar
0 votes
0 answers
32 views

Why is my GCC version not the latest? [duplicate]

Does this make sense? The version is: me@me-All-Series:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal me@...
Zebrafish's user avatar
  • 113
1 vote
1 answer
87 views

Installing m4 on ubuntu 24.04 returns a gcc error

I'm trying to install the package m4 as per the ubuntu repositories by running sudo apt-get install m4 But the command returns this error Setting up install-info (7.1-3build2) ... gcc: fatal error: no ...
Mutewinter's user avatar
2 votes
0 answers
117 views

Mismatch complier with kernel

While I was trying to install Virtual Box's Guest Additions, my Ubuntu's screen has been glitching, so I got 2 things to solve, but to no avail. I read and applied from 3 "askubuntu" posts, ...
K3nny_V4st's user avatar
0 votes
0 answers
32 views

Problem Compilation with gcc 4.5.1

I am trying to recompile an old software from 2007. The software was compiled with GCC 4.5.1 and uses some Qt4 libraries. I have Ubuntu 20.04, and I tried to install GCC 4.5, but I can't due to some ...
Osman Kamil's user avatar
-1 votes
1 answer
107 views

Problem with update-alternatives and cpp after updating to 22.04

After updating from 20.04 LTS to 22.04 LTS, everything appears to be working fine, except if I run sudo apt upgrade I get the following issue: Setting up cpp (4:11.2.0-1ubuntu1) ... update-...
Colin T Bowers's user avatar
0 votes
0 answers
46 views

Sub-process /usr/bin/dpkg returned an error code (1) while i install pip3

Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-...
Pedro Henrique Nairoski's user avatar
0 votes
0 answers
107 views

Install GCC 7.20 on Ubuntu 22.04

I saw this question several years ago, but it is worth asking. I have to do a coding test on "GCC 7.2.0 (with -std=c++17)" I have in my Ubuntu: "gcc version 11.4.0 (Ubuntu 11.4.0-...
Al3x4ndru1's user avatar
1 vote
2 answers
7k views

How to install gcc-14 on Ubuntu 22.04 and 24.04?

I successfully used the instructions from https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/ to upgrade gcc version before, but they don't work for gcc-14. How do I install gcc-14 ...
Paul Jurczak's user avatar
3 votes
1 answer
841 views

VMware Workstation Player 17.5.1 not compiling libs after install on Ubuntu 24.04 LTS desktop

After I had installed a clean Ubuntu 24.04 desktop version on my system (in place upgrade did not work), I had to install VMware Workstation Player 17.5.1 (current) again. I know that there are WINE ...
UliFFB's user avatar
  • 31
1 vote
0 answers
328 views

Error installing driver via make due to GCC-12 version not matching

Trying to install drivers that via a make command, but getting the error: warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu ...
user329488's user avatar
2 votes
0 answers
271 views

WSL Ubuntu: How to setup gcc to cross-compile for arm with a specific glibc version?

I'm not really an expert of linux, so i'm feeling a bit lost. I'm running an Ubuntu 22.04.3 LTS image in WSL, as i need to cross-compile a program for an ARM linux pc (a BeagleBone Black, "BBB&...
Parduz's user avatar
  • 143
0 votes
1 answer
60 views

How to install an older version of GCC for armhf?

I'm not really an expert of linux, so i'm feeling a bit lost. I'm running an Ubuntu 22.04.3 LTS image in WSL, as i need to cross-compile a program for an ARM linux pc using a Windows PC. That image ...
Parduz's user avatar
  • 143
0 votes
0 answers
293 views

ubuntu 22.04 show : Unable to locate package gcc-12

When I install gcc apt install --reinstall gcc-12 -y It report error: Unable to locate package gcc-12 How should a problem like this one be solved?
Andrew's user avatar
  • 155
0 votes
0 answers
38 views

Problem while compiling git repo

I'm trying to compile a git repository of a bioinformatics package (https://github.com/MBoemo/DNAscent) and I have been running into some problems and was hoping somebody could help with this. I'm ...
Tyhalj's user avatar
  • 11
0 votes
0 answers
87 views

gcc, g++, gfortran disappeared from system after Ubuntu upgrade [duplicate]

I have upgraded Ubuntu from 20.04lts to 22.04lts. However it seems that gcc, g++ and gfortran have disappeared from the system. I have tried: sudo apt install gcc but got the error: Reading package ...
mattiav27's user avatar
  • 895
0 votes
1 answer
69 views

What languages installed with APT on Ubuntu come with graphical features straight out of the box?

Just wondering what programming languages I can install straight from the APT that come with built in graphics functions on Ubuntu. I know Java can but I don't know of anything else and information on ...
Lonely Lad's user avatar
-1 votes
1 answer
97 views

Getting GCC 7.2.0 on UBUNTU 20.04

I have tried in many ways to download this version on UBUNTU 20.04, some places says I just have to get the GCC7.2.0 packages (which I haven't been able to do), and some places says it is only ...
Neta R's user avatar
  • 1
2 votes
0 answers
1k views

How to install glibc 2.31 from source on Ubuntu 22.04

I am trying to compile glibc 2.31 on Ubuntu 22.04 LTS. I followed a this answer as a template, which was incredibly helpful. My issue is that there are undefined references when I run make: ... make[...
Arizen's user avatar
  • 21
-1 votes
1 answer
149 views

Nvidia GeForce 9600M GT driver installer cannot find GCC version number in /proc/version

I have learned a lot doing this and now I’m a bit hung up on this next part. This is a 2009 15-inch MacBook Pro which has had internal components swapped out, such as a Samsung SSD and apparently 2 ...
Julius Hamilton's user avatar
0 votes
1 answer
44 views

Custom alias to run and compile .c file [duplicate]

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 ...
Jáchym Šmíd's user avatar
0 votes
0 answers
255 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 ...
robertolabarca's user avatar
0 votes
1 answer
2k 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 ...
Bilal's user avatar
  • 305
0 votes
1 answer
118 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 ...
J0sh's user avatar
  • 11
0 votes
1 answer
88 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 ...
Kode1000's user avatar
1 vote
1 answer
389 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 ...
matanox's user avatar
  • 2,343
5 votes
2 answers
2k 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 ...
John Dallman's user avatar
2 votes
1 answer
4k 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 ...
Frank's user avatar
  • 23
0 votes
1 answer
594 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 ...
Xamotex 1000's user avatar
8 votes
3 answers
29k 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 ...
Adam Sperry's user avatar
2 votes
3 answers
7k 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 ...
CraigJem10's user avatar
0 votes
1 answer
123 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 ...
Py-ser's user avatar
  • 707
0 votes
2 answers
1k 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 ...
Stephen Atty's user avatar
0 votes
3 answers
664 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 ...
Kirito's user avatar
  • 3
0 votes
1 answer
856 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: ...
RED SOFT ADAIR's user avatar
0 votes
1 answer
149 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 ...
Renegade's user avatar
1 vote
0 answers
1k 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/...
Sergey Kolesnik's user avatar
2 votes
0 answers
255 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 ...
Rohan Pande's user avatar
5 votes
1 answer
12k 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-...
lord_nimon's user avatar
0 votes
1 answer
100 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 ...
onepound's user avatar
  • 111
0 votes
1 answer
120 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?
qwr's user avatar
  • 2,860
0 votes
0 answers
118 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:~/...
Dingjun Chen's user avatar
0 votes
0 answers
72 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 ...
GGinside's user avatar
0 votes
0 answers
144 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 ...
sleeperservice's user avatar
0 votes
0 answers
161 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 ...
RedFox's user avatar
  • 113
1 vote
0 answers
86 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). ...
Hector Viruega's user avatar
0 votes
0 answers
250 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 ...
PhysicsInquiries's user avatar
0 votes
1 answer
581 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 ...
BlunterWeb's user avatar

1
2 3 4 5
25