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
2 answers
2k views

I get a blinking cursor instead of output when running this C program in Ubuntu [closed]

Here's my code for finding the distance between two points. My assignment makes it mandatory to make use of functions, hence a separate one for finding the distance. I don't get any syntax errors but ...
Sayantan Mukherjee's user avatar
2 votes
1 answer
955 views

gcc -Hello.s Problem

My system is Ubuntu 18.04 64bit . with build-essentials and devtools installed. Hi, I have an assembly file called Hello.s Here is it's content: #This is a simple "Hello World!" program ....
SDIdo's user avatar
  • 105
3 votes
2 answers
8k views

Install gcc 4.4.7 on Ubuntu 18.04

I tried installing gcc 4.4.7 with no success, using: sudo apt-get install gcc 4.4.7 I tried to run it via the source code and install a fresh one... Nothing seems to work. I keep getting this error: ...
Simple user's user avatar
0 votes
0 answers
484 views

Installing RTAI 5.0 with linux kernel 3.18.20 in Linux 18.04 LTS

I tried to use the command make or make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-rtai I got the following error - CHK include/config/kernel.release CHK include/generated/uapi/...
S_whynot's user avatar
1 vote
0 answers
598 views

Can't manange to build Rtmpdump with KSV Patch

I'm trying to build rtmpdump with KSV patch git clone https://github.com/chopraaa/rtmpdump-ksv.git cd rtmpdump-ksv patch -p0 -i Patch.diff make Patch is OK but then i have errors root@ubuntu:~/...
MR RsO's user avatar
  • 11
2 votes
0 answers
735 views

How to compile Mesa with debug symbols?

I want to modify Mesa's source code and build it with debugging symbols enabled. I downloaded and built the sources with these commands: sudo apt build-dep libgl1-mesa-dev apt source libgl1-mesa-dev ...
SurvivalMachine's user avatar
1 vote
1 answer
4k views

How to compile Linux kernel module: printk missing?

So I'm trying to compile a simple kernel module on Ubuntu 18.04, kernel 4-15.32 generic: #define MODULE #include <linux/module.h> #include <linux/kernel.h> int init_module(void){ ...
Sergiy Kolodyazhnyy's user avatar
1 vote
1 answer
3k views

ubuntu, syntax error near unexpected token `('

I want to run a c program on ubuntu 18.04, on a virtual machine, and I get this error: ./test.c: line 3: syntax error near unexpected token `(' ./test.c: line 3: `void main(int argc, char** argv)' I ...
Alex C's user avatar
  • 13
9 votes
1 answer
11k views

Unable to build python 3.7.0 "_dbm" optional module

I've been able to successfully finish building python 3.7.0 but one last optional module keeps slipping through the net! _dbm What ubuntu or debian package is required for this? The necessary bits ...
DanglingPointer's user avatar
1 vote
1 answer
4k views

Disable -enable-default-pie for gcc

I need to disable the -enable-default-pie option in the configuration of gcc, but I don't know how to do it. Is there a text file where I simply have to delete that option or how should this be done?
Alfie González's user avatar
0 votes
0 answers
962 views

Cannot make install libcurl on Ubuntu 16.04.4 LTS

I am attempting to install libcurl from source on an Ubuntu server, OS version 16.04.4 LTS. I am using gcc 8.1. Here is the configuration script I used: curl version: 7.61.1 1234 Install ...
Alvaro Fernandez's user avatar
-1 votes
2 answers
8k views

GCC compiler not working

Original error: root@vishal-HP-Notebook:/home/vishal# sudo apt-get install gcc Reading package lists... Done Building dependency tree Reading state information... Done gcc is already the newest ...
VISHAL SINGH's user avatar
2 votes
0 answers
849 views

Why do GCC's linker-options (as per dumpspec) contain as-needed?

Within the specs of gcc (retrieved via -dumpspecs) in Ubuntu 18.04 (7.3.0-16ubuntu3) the link-section shows the explicit mention of the option as-needed (passed to ld). This influences linked ...
Patrick B.'s user avatar
1 vote
1 answer
133 views

Dependency for gcc-7-locales is not resolving despite installing cpp-7

I'm trying to set up my Ubuntu for wifi drivers by manually downloading the packages and installing them as suggested in Installing Broadcom Wireless Drivers. However the dependency for gcc-7-locales ...
Dominic Luther's user avatar
1 vote
1 answer
472 views

Free heap memory

So I'm using Ubuntu for programming I use atom text editor with gcc compiler for C. I want to ask what will happen if I don't clear memory allocated by malloc or calloc? Will the OS take care of it or ...
Ojas's user avatar
  • 11
1 vote
1 answer
2k views

Unsupported GNU version! gcc versions later than 6 are not supported! - causes importing cpp_extension

Then I import it says before error this: /home/dex/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning: !! WARNING !! !!!!!!!!!!!!!!!!...
Rocketq's user avatar
  • 123
1 vote
1 answer
6k views

I am not able to install GCC in my Ubuntu(18.04)...I already tried the command - sudo apt install gcc

This is showing after typing the command to install GCC:
Pala Ravi Kanth's user avatar
3 votes
1 answer
6k views

How to correctly upgrade gcc7.3 to gcc8 in Ubuntu 18.04.01 LTS?

In my Ubuntu 18.04 LTS: marco@PC:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic I have gcc ...
user2315094's user avatar
1 vote
1 answer
16k views

Installing Linaro on Ubuntu 18.04

I am following this guide to install Linaro on my Ubuntu 18.04 machine (64-bit Duo core). Unlike the guide, I want to have the latest Linaro version. Thus, these are the commands I use: sudo apt-...
J. Doe's user avatar
  • 121
1 vote
0 answers
526 views

Install gcc 7.2 in Ubuntu 18.04

NVIDIA CUDA Toolkit 9.2 currently supports only Gcc 7.2.0 for Ubuntu 17.10. However, Ubuntu 18.04 comes with default gcc 7.3.0. How can I downgrade gcc 7.3 to 7.2, or make CUDA 9.2 work with gcc 7....
chuong nguyen's user avatar
0 votes
2 answers
504 views

Can a c++ compiler and includes be in one drive (system drive) and the code files themselves (.cpp) be at another? [closed]

Can I use my home drive as a place where the compiler and its files (and includes) are placed/installed, but use a different drive for my c/cpp source files? For example, gcc and includes are in /...
Ma250's user avatar
  • 101
0 votes
1 answer
10k views

Installing gcc in Ubuntu 18.04.1 on VirtualBox

I installed Ubuntu 18.04.1 LTS in my VirtualBox. I want to use gcc in it but it doesn't have a pre-installed version, and when I try to install it shows the following message: sudo apt-get install ...
InfectedDNA's user avatar
1 vote
1 answer
115 views

gcc help page in Ubuntu

In Ubuntu, gcc is the compiler that comes with the Linux operating system. In TurboC we have a help menu to search for documentation on syntax of functions and header files. How do I find this help ...
Prahallad C's user avatar
12 votes
2 answers
8k views

Disabling C++11 in GCC 7.3

It seems like in Ubuntu 18.04, the default shipped g++ (version 7.3.0) runs in C++11 compatible mode by default. I am getting some errors in my old codes which are not C++11 compatible. I installed g++...
Soo's user avatar
  • 294
3 votes
0 answers
3k views

Upgrade gcc (4:7.3.0-3ubuntu2) to gcc-8 (8.2.0) in ubuntu 18.04

Has recently upgraded my ubuntu from 16.04 to 18.04.1 LTS. When trying to run vmware I am getting this message: gcc version 8.2.0 not found so I checked gcc v. and I found: (Ubuntu 7.3.0-16ubuntu3). I ...
carl's user avatar
  • 103
1 vote
2 answers
1k views

Compilation errors in Ubuntu 18.04 LTS for a QT-based project

When running make, the following errors appear in terminal: //usr/local/lib/liblua.a(loadlib.o) : In function « lookforfunc » : loadlib.c:(.text+0x576): warning : Using 'dlopen' in statically linked ...
ProgAndPlay's user avatar
1 vote
1 answer
434 views

Error while compiling bcmwl-kernel-source

Recently, the WiFi on option on my Ubuntu 16.04 disappeared. I figured that bcmwl-kernel-source needed to be updated so what I basically did was: sudo apt-get upgrade When the upgrade reached ...
Einsiedler's user avatar
2 votes
1 answer
1k views

Issue with gcc/g++ while cmake building (./bootstrap)

I decided to reinstall cmake but after removing it I am having an Issues with installing. After entering a ./bootstrap It prints I am using type of g++ which I dont know how I got it CMake 3.12.0, ...
Lukáš Vojtek's user avatar
0 votes
1 answer
1k views

Problem with reaver on Ubuntu 18.04 [duplicate]

So I was following up with this link https://www.learn2crack.com/2013/07/learn-to-hack-wifi-password-with-ubuntu.html I'm stuck with the 7th step. I'm pasting the output of the 6th step just in case ...
Janick's user avatar
  • 43
1 vote
1 answer
22k views

git clone fails with "Connection reset by peer"

While trying to git clone the RISC-V GNU toolchain Github project, it is showing following errors. I don't have any idea how to get rid of them. fatal: read error: Connection reset by peer fatal: ...
Abhinav Jain's user avatar
0 votes
0 answers
1k views

Error trying to import librosa in python3: symbol _ZTINSt8ios_base7failureB5cxx11E, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6

I've spent all day searching for solutions to this problem. At first it was an GLIBCXX_1.9 problem, I've tried to use solutions in here (install a gcc newest version and others solutions), and it ...
Gabriel Lins's user avatar
7 votes
3 answers
20k views

Unable to install libc6-dev

A gcc compiler was misbehaving, and in the process of fixing it part of the libc6 package was uninstalled. Now I am trying to reinstall it using apt-get on Ubuntu 14.04 (3.13.0-24-generic). However, ...
JAustin's user avatar
  • 123
2 votes
0 answers
2k views

How to build older version of glibc?

I want to build gcc-8.1.0 cross-compiler for ARM from sources, but with glibc 2.23 because of the backward compatibility with some other project I have. I am building it on Ubuntu Xenial 16.04. My ...
anicicn's user avatar
  • 21
4 votes
1 answer
1k views

gcc error in Ubuntu 18.04

I try to compile hello.c using gcc with -mnop-mcount option. But error occurs like below: $ gcc -pg -mfentry -mnop-mcount -o hello hello.c cc1: error: -mnop-mcount is not implemented for -fPIC My ...
Frodo's user avatar
  • 59
2 votes
1 answer
4k views

Fix problem when install Cuda 7.5 in Ubuntu 18.04 LTS

I have Ubuntu 18.04 LTS, and I want to install Cuda 7.5 (because this version is compatible with my Nvidia GF 820m graphics card). I configured gcc-4.8 as default gcc for (because it's the Cuda 7.5 C ...
Adel Madrid's user avatar
0 votes
1 answer
8k views

/usr/bin/x86_64-linux-gnu-ld: cannot find -lGL

This post has been translated from German. For the original, please see the revision history. I have written the following program in Qt Creator. The error message refers to Ubuntu. I'm using Ubuntu ...
Georgios's user avatar
2 votes
1 answer
12k views

Dependency error when installing gcc-multilib

I currently try to install gcc-multilib on my Ubuntu 16.04.4 LTS machine (freshly done apt-get update + upgrade). There are several dependencies and that's why I tried it with aptitude to resolve ...
izlin's user avatar
  • 181
1 vote
2 answers
2k views

Virtualbox won't start because of "retpoline"

After the 'retpoline' fix for spectre was added to the kernel, Virtualbox would not start. You could rebuild the driver, but it wouldn't install because of the "version magic" mismatch. Had to drop ...
bobwirka's user avatar
  • 111
0 votes
1 answer
5k views

Undefined reference to symbol acos@@GLIBC_2.2.5 while compiling xpdf

I get the following error while compiling xpdf using make. I've tried using the command: LIBS=-l make but it doesn't work. I know the problem is that the c compiler cannot recognise the math code in ...
bit's user avatar
  • 175
17 votes
1 answer
25k views

What are the GCC and clang versions available in Ubuntu 18.04? [duplicate]

In the new Ubuntu 18.04: What's the default GCC version (with which the binaries were built)? What GCC versions are available as separate packages (and what minor version is installed if I install ...
einpoklum's user avatar
  • 871
9 votes
1 answer
3k views

build-essential is not installed by default in 18.04. How to install network drivers offline?

We have a serious problem with new installations on laptops that have only a wireless network device requiring some network drivers, like bcmwl-kernel-source. Many laptops don't have an Ethenet port ...
Pilot6's user avatar
  • 90k
1 vote
1 answer
1k views

How to connect ICU library with gcc in the Ubuntu 16.04?

I have downloaded the icu4c-61_1-Ubuntu16.04-x64.tgz from the http://site.icu-project.org/download/61#TOC-ICU4C-Download site. I do not see any installation instruction there. In my NetBeans C/C++ '...
Tomáš Pečený's user avatar
8 votes
2 answers
36k views

Downgrade GNU Compilers Ubuntu 18.04

I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046). With the same suite I've compiled both szip and zlib and I'm proceeding to ...
Mutewinter's user avatar
4 votes
1 answer
21k views

How do I use the latest GCC on Ubuntu? (Ubuntu 18.04; gcc 8.1) [duplicate]

Ubuntu currently provides gcc version 7.3, however gcc version 8.1 is currently available. I'd like to install gcc 8.1 alongside gcc 7.3 (so that if I call c++ it invokes the version from gcc 7.3, and ...
Antonio Perez's user avatar
13 votes
2 answers
64k views

Development Tools [duplicate]

I just downloaded and installed the latest version of Ubuntu 18.04 (ISO was ubuntu-18.04-desktop-amd64.iso). I noticed that no development tools are installed by default (git, gcc, g++, make). Is ...
JKelly's user avatar
  • 139
11 votes
2 answers
45k views

Install gcc 4.9 at ubuntu 18.04

Is there any way to install gcc 4.9 at ubuntu 18.04? I tried sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa sudo apt-get update sudo apt-get install gcc-4.9 g++-4.9 but I get: Package g++-4.9 ...
Nikos's user avatar
  • 121
2 votes
1 answer
2k views

How to compile C program file in Ubuntu 18.04

I can't compile a C file in Ubuntu 18.04. In terminal I used this command: $ gcc -o abc.o abc.c -lm, but it says that gcc is not found. This exact command can compile a C program in Ubuntu 16.04 (...
Debajyoti's user avatar
  • 930
2 votes
0 answers
801 views

Header missing from Ubuntu 16.04 gcc-8?

When I try to compile my program using make and include immintrin.h, I get an error that movdirintrin.h does not exist. I've scoured the internet trying to figure out what is wrong. I'm using gcc-8, ...
Gabriel's user avatar
  • 121
62 votes
3 answers
128k views

Install gcc-8 only on Ubuntu 18.04?

I just installed Lubuntu 18.04 LTS. There are two options for installing gcc: gcc-7 and gcc-8. Both are available from apt-get install out of the box. Even after I installed gcc-8, the system is ...
tinlyx's user avatar
  • 3,220
1 vote
1 answer
399 views

Figuring out if gcc make was successful

I am a very inexperienced Ubuntu user. I am using a computer cluster at my university via SSH. The cluster has a version of gcc that was too old for something else that I needed to install, and I am ...
Gowri's user avatar
  • 11

1
8 9
10
11 12
24