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
1
vote
1answer
19 views

How to find which ubuntu repo does a package belongs to?

Long story short, i wanna to install gcc but it gave me errors and i found it resulted by Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.12 is to be installed I have tried ...
0
votes
0answers
29 views

Problems installing gcc 8 on Ubuntu 20.04 [duplicate]

I am trying to install gcc-8 and g++-8 on Ubuntu 20.04 (for CUDA) but when I try to install both gcc 8 & 9, I get an error: $ sudo apt -y install build-essential $ sudo apt -y install gcc-8 g++-...
0
votes
0answers
19 views

compiling multiple c-files in a directory

I want to compile my program which has multiple c-files in multiple subfolders. I tried compiling it with gcc *.c -o test and I also tried entering every single filename with and without the directory ...
0
votes
0answers
43 views

how can I fix gcc and g++. I use desktop Ubuntu version 18.04

sudo apt-get install gcc g++ git gcc-*-aarch64-linux-gnu g++-*-aarch64-linux-gnu libncurses5-dev Reading package lists... Done Building dependency tree Reading state information... Done x 'g+' ...
2
votes
1answer
140 views

How to install arm-none-eabi-gdb on Ubuntu 20.04 LTS (Focal Fossa) [duplicate]

I tried to install arm-none-eabi-gdb as a part of gcc-arm-embedded. I added PPA: sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa and executed: sudo apt install gcc-arm-embedded It ...
0
votes
0answers
12 views

How to install GCC without internet [duplicate]

Hello there thanks for being here, I recently installed Ubuntu 18.04 on VMWare, Host OS(win 10) has internet connection but not the guest. How can I install GCC packages by downloading .deb packages ...
0
votes
0answers
10 views

Can't compile VICE 3.4 from apt package - gcc gives error “compiler cannot create executables” [duplicate]

I installed the snap package of the VICE Commodore emulator from the snap store. That's version 3.3. There is a newer version, 3.4, available, but not in the snap store. I installed the package using ...
1
vote
1answer
39 views

Unable to run program on Linux target

I am working on Ubuntu 20.04. I made a simple program (Hello World), and a makefile for it on my laptop and run it (./Simple), and everything worked. Then I included the program (Simple.c) in the ...
1
vote
0answers
36 views

gcc not installed on ubuntu 18.04

tried installing gcc with the following commands: raihan@raihan-home:~$ sudo apt install build-essential Reading package lists... Done Building dependency tree Reading state information... ...
-1
votes
1answer
37 views

trying to install GCC [duplicate]

I would like to install gcc compiler by this command apt install build-essential and after pressing Yes, it asks me to insert some media. Media change: please insert the disc labeled 'Ubuntu 18.04....
-1
votes
0answers
34 views

My gcc include sys files are broken and behaving strangely

Suddenly I can't compile any C file at all, and it always says that sys/cdefs.h file does not exist. I checked where the include file path is, and I found this weird recursive symbolic link that does ...
1
vote
0answers
30 views

Ubuntu 18.04, downgrading gcc from 8.4 to 8.3

I am in the position of using some slightly out of date build tools that refuse to work with gcc 8.4; the latest they recognize is gcc 8.3. I am using Ubuntu 18.04, and when I run apt list gcc-8 --all-...
0
votes
1answer
84 views

gcc build and compile error ubuntu 20.04

I've installed cudnn but couldn't verify the installation because of this error: #error -- unsupported GNU version! gcc versions later than 8 are not supported! After searching I found out that I ...
0
votes
1answer
216 views

How can I downgrade GCC to version 6 on 20.04?

How can I downgrade GCC to version 6 on 20.04? I need GCC6 to compile CUDA9 files. Trying apt install gcc-6 is giving me this error: Package gcc-6 is not available, but is referred to by another ...
1
vote
0answers
120 views

Ubuntu 20.04 - gcc version lower than gcc-7

I recently upgraded my Ubuntu version to the latest 20.04 release. Some of my earlier projects (developed on 16.04) were compiling just fine with a gcc version of 5 (gcc-5.4.0). The default version ...
0
votes
0answers
24 views

how to build kernel without config_retpoline?

How to disable CONFIG_RETPOLINE in gcc? Need to compile. ??? https://unix.stackexchange.com/questions/435778/how-to-check-if-linux-kernel-is-retpoline-enabled-or-not
0
votes
0answers
84 views

test cudnn installation ubuntu 20 failed

Okay so I have installed cudnn and want to test and verify the installation, but I got the below error, no matter what I do, the problem won't be solved. edit: I have removed gcc and tried installing ...
-2
votes
1answer
229 views

Three problems with Ubuntu 20.04 under Windows WSL

When using 'gcc' -Os option not accepted sleep command produces sleep: cannot read realtime clock Can no longer perform: sudo cat XXX >> YYY Results in Permission denied where XXX and YYY ...
2
votes
0answers
60 views

when doing upgrade from 16.04 to 18.04 there is an error

I got this error when doing upgrade from 16.04 to 18.04 and power-lost in the middle. This is what the error looked like, and apt-get install -f does not fix it. Reading package lists... Done ...
1
vote
0answers
83 views

Package 'g++-4.8' has no installation candidate

So i recently updated to Ubuntu-20.04 and my g++-4.8 compiler got deleted when i tried to reinstall it using "sudo apt-get install g++-4.8" i get an error: "Package g++-4.8 is not available, but is ...
2
votes
2answers
214 views

QtCreator not recognizing linked libraries after upgrading Ubuntu to 20.04

I've upgraded from Ubuntu 18.04 to 20.04 and besides some nasty grub issues most things worked out of the box. But my QtCreator (Qt Creator 4.11.0, Based on Qt 5.12.8 (GCC 9.3.0, 64 bit)) is facing ...
0
votes
0answers
33 views

linker ld cannot find an existing library

OpenCV 3.4.10 C++ on Ububtu 18.04 worked fine, yet suddenly the linker started complaining: /usr/bin/ld: cannot find -lopencv_xxxx though this library is sitting in the same folder together with ...
0
votes
0answers
45 views

sudo apt install gcc not working

I already tried this Unable to install GCC, depends gcc-7 It did not work. Here is what I get $ sudo apt install gcc **Reading package lists... Done Building dependency tree Reading state ...
0
votes
1answer
61 views

Error missing binary operator while preprocessor compiling C program

I tried upgrade to Ubuntu 18.04 and compile a simple C program from the terminal with gcc -o test test.c. #include <stdio.h> void main() { printf("h\n"); } but it threw a missing binary ...
1
vote
0answers
125 views

Can we install older versions of gcc and g++ on ubuntu 20.04

I currently have Ubuntu 19.10 with gcc 9.1.2 I want to install previous versions of gcc for CUDA 8 (gcc 5 in this case). But I am getting this error: (base) ➜ ~ sudo apt-get install gcc-5 g++-5 ...
0
votes
1answer
192 views

How to use an older version of GCC

I'm using Ubuntu 18.04.4 LTS, and I'm trying to compile a MATLAB-based program (SPM12), following their online instructions, and I believe I'm running into a problem of having a GCC version that is '...
0
votes
0answers
319 views

Cannot execute binary file: Exec format error: (Compiling 32 bit code on 64 bit machine)

I want to execute a 32-bit assembly code and I am using gcc for linking my object file (created by NASM) to an executable. I have already tried the methods stated in this post: https://stackoverflow....
0
votes
0answers
34 views

Installing different version of gcc

I am running Ubuntu 19.10. The gcc binary installed is > ls -laht /usr/bin | grep gcc ... lrwxrwxrwx 1 root root 12 Apr 8 17:38 x86_64-linux-gnu-gcc-ranlib -> gcc-ranlib-9 lrwxrwxrwx 1 ...
0
votes
1answer
35 views

Will GCC compiler or anything else update if I install Atom Editor?

I want to install atom in Ubuntu 18.04.1 LTS like this: # Install Atom $sudo dpkg -i atom-amd64.deb # Install Atom's dependencies if they are missing $sudo apt-get -f install Will Atom work without ...
0
votes
0answers
43 views

Installing a specific version of gcc-5 (gcc 5.4.0)

There are many questions here asking how to install gcc 5.4.0. The ones that I have found have answers saying to just sudo apt install gcc-5 and then run the appropriate update-alternatives. That ...
0
votes
1answer
74 views

cannot execute binary file: Exec format error Ubuntu 18.04 x86-64 target

I get the following error when executing my binary test1: $ ./test1 bash: ./test1: cannot execute binary file: Exec format error I checked that I have the 'x' right on this binary: $ ...
0
votes
1answer
197 views

How can I install a specific version of gcc on ubuntu 18.04

I'm trying to install gcc 7.3.0 on ubuntu 18.04. Ubuntu got updated and now my gcc is 7.5.0. I have seen other questions on stack overflow, but they are either for older versions which their solution ...
0
votes
0answers
43 views

“time out” error when adding ppa for installing gcc 7.5

I currently have gcc 5.4 on ubuntu 16.04 and want to install gcc 7.5. I found in several websites these steps: sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:ubuntu-...
0
votes
0answers
11 views

Unable to detect toolchain information - DS-5 CE

I've installed Arm DS-5 CE in a VM with Ubuntu 18.04. I'm trying to add the linaro toolchain to DS-5 but I can't. I downloaded the gcc-linaro-7.3.1-2018.05-i686-mingw32_aarch64-elf.tar.xz. I created ...
1
vote
0answers
33 views

Dependency error installing build-essential

In recently istalled Ubuntu 18.04.4 on SSD hard disk and Intel Core i5-6500 I've try to install build-essential with this error: The following packages have unmet dependencies: build-essential: ...
0
votes
2answers
223 views

Help! on installing TP-link AC13000 T4U V3 driver on 18.04 without Internet connection and without dkms package installed?

I am having bad trouble. I bought TP-link AC13000 T4U V3 and try to use it with ubuntu 18.04 (Linux version 5.3.0-40 with gcc 7.4.0). However, I cannot gain any Internet connection from my Desktop at ...
1
vote
0answers
43 views

g++ cannot find main function for simple “hello world” program

I have been trying to compile a simple hello world program in C++ on my lubuntu laptop. I use the command g++ -o out cta.cpp but I always get the error message below.. /usr/bin/ld: /usr/lib/gcc/...
0
votes
0answers
106 views

How to include <linux/timer.h> head file in Ubuntu?

I'm using Ubuntu 18.04 with kernel-4.15. When I include the header file <linux/timer.h> in the source code, the header file cannot be found:fatal error: linux/timer.h: No such file or directory. ...
0
votes
1answer
149 views

How to downgrade to gcc 7.3?

I am Ubuntu 19.10, and I wanted to install CUDA on it. But I am hampered by the 'gcc' version on my OS. CUDA can't use gcc 9 (supported version here) So, using this answer, I managed to download the ....
1
vote
1answer
32 views

how can I compile Ortep3 on Ubuntu?

I recently compiled ortep3 on an older CentOS server using gfortran -o ortep3 ortep.f -lpgplot -lX11. I think the gfortran version was 6.5 or something like that. My version of gfortran is: gcc ...
1
vote
1answer
92 views

Install default gcc version

I've installed gcc on my ubuntu 18.4. The default for this ubuntu version is 7.4.0, but a 7.5.0 version was installed on my computer. How do I downgrade the version to the default? Edit: I'll be ...
0
votes
1answer
37 views

link error with cpp-7 version 7.5.0 asan

My ubuntu18.04.4 LTS system just updated my cpp-7 package from 7.4.0 to 7.5.0 . Now I get a link error when building with asan: undefined reference to `__asan_version_mismatch_check_v8' My command-...
0
votes
0answers
22 views

writing to another tty doesn't get prompt back

I have a program written in c that writes 'hello another tty' to another terminal. #include <stdio.h> int main(void){ FILE *fp; fp = fopen("/dev/pts/4", "w"); fprintf(fp, "Hello, another ...
0
votes
1answer
1k views

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 (for lssl and lcrypto)

I've tried installing whatever was suggested, libssl-dev being the most common answer, but I still receive the error: PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int); x86_64-linux-gnu-gcc ...
0
votes
0answers
69 views

cannot execute binary file: Exec format error - Ubuntu 16.04 + Make + GCC

I am aware that other people had similar issues but mine seem to be unique as I am not making obvious mistakes. I have reviewed other questions and putting all required details below. When I am ...
0
votes
0answers
29 views

How compile c code which include python libraries for raspberri pi 3 b+ in ubuntu machine?

I have to compile python code into .exe. To do that on my RPi3 b+ I use cython to convert .py into .c code and then using gcc to create an executable file. The compiling process is very slow but it ...
0
votes
0answers
292 views

Install gcc 6 under ubuntu 19.10

Is it possible to install gcc-6 on Ubuntu 19.10? Any way I can include it in default repo or install through deb package? $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu ...
1
vote
1answer
119 views

Install PycURL in my virtual environment in PyCharm

I am using and PyCharm in Ubuntu 18.04. I am also using Python 3.7 and pip 20.0.2. So far I have not been able to install PycURL in the virtual environment that I created in PyCharm. I tried: https:...
0
votes
0answers
45 views

18.04: Compiling On The Network Share

I am trying to compile a basic "hello world" program with GCC on my network share (smb) but only to get: /usr/bin/ld: final link failed: Operation not supported collect2: error: ld returned 1 exit ...
2
votes
0answers
161 views

Error when building GCC 6.3.0 from source on Ubuntu 18.04

I tried to build GCC-6.3.0 from source following the official guide. I need this version because is the one required by the Matlab compiler. I was able to install GCC 7.4 (the default version of ...

1
2 3 4 5
20