Questions tagged as ['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.
Score: 0
DannyNiu avatar
Why is there no cross-compiler in Arm64 version of Ubuntu?
us flag

In the Amd64 version of Ubuntu, there's the gcc-{version}-{architecture}-linux-gnu packages that I can use to build binaries for different architectures, of which, the built binaries can be tested using qemu-user. But in Arm64 version of Ubuntu, there isn't such cross compiler.

Q1: Why isn't there such packages (as of 20.04 TLS)?

Next, I'd like to use the Clang/LLVM toolchain to build binaries in place  ...

Score: 1
Frigyes avatar
PeerGuardian building from source
cn flag

I have been trying to get PeerGuardian on my Ubuntu 21.04 system, but the PPA maintainer is not updating the package, and the project seems to be abandoned.

When I try to compile on my laptop, I get this error:

/usr/bin/ld: src/stream.o:/home/frigyes/Desktop/peerguardian-code/pgld/src/blocklist.h:77: multiple definition of `blocklist'; src/pgld.o:/home/frigyes/Desktop/peerguardian-code/pgld/src/blockl ...
Score: 0
Aaron Franke avatar
How do I install libobjc-9-dev on Ubuntu for ARM?
ar flag

I'm trying to install Clang on Ubuntu 20.04 for ARM, which needs libobjc-9-dev. The Ubuntu 20.04 ARM repositories only have a version that needs GCC 9.3 but I currently have GCC 9.4 (trying to downgrade to GCC 9.3 leads to apt prompting me to uninstall x11 and xwayland).

I'm looking for a way to just grab a newer libobjc-9-dev but I can't find any links. I found this official website, and it says "Yo ...

Score: 0
David Clark avatar
cannot find compiler-gcc9.h
th flag

I have not seen an answer for this make file error. It cannot find the linux/compiler-gcc.h or linux/compiler-gcc9.h? Trying to build "build root" embedded linux. Additionally it is stating include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc9.h: No such file or directory.

What am I missing here? I looked through other posted solution, but to no avail.

Score: 0
Rob avatar
Why won't Ubuntu 20.04.3 LTS copy con.c to external USB drive?
vn flag
Rob

I upgraded from Ubuntu 18.04 LTS to Ubuntu 20.04.3 LTS on my desktop on 11-12-2021.
I compiled con.c on the new gcc version 9.3.0-17 compiler and it gave me warnings on
using sprintf(). I converted all the sprintf()'s warnings to snprintf()'s and got a clean compile.
I copied the folder that contained con.c and 8 other .c files and their .o files to an external
USB drive. It copied all but the con ...

Score: 0
VMware Player launch - GNU compiler missing
jp flag

I've followed many step by step howtos and it seemed that the installation went well (from here: https://linuxize.com/post/how-to-install-vmware-workstation-player-on-ubuntu-20-04/).

Unfortunately, I still have the same message, whatever I try: error message

Ubuntu is fully updated (21.04) and I've downloaded the latest VMware Player from the main website.

  • I've tried to install/uninstall VMware, same res ...
Score: 2
scamander avatar
How to install libg2c.so.0 on Ubuntu 18.04 64bit
at flag

I'm using:

Linux ip-172-31-28-209 5.4.0-1059-aws #62~18.04.1-Ubuntu SMP Fri Oct 22 21:51:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I encounter an error while running a program:

while loading shared libraries: libg2c.so.0: wrong ELF class: ELFCLASS32

How can I resolve it?

I looked at this post, but it's for 32bit version of Ubuntu.

Score: 0
Ray Wilson avatar
Error with Cloudy's make command on WSL2
tc flag

I'm using a WSL2 (windows subsystem Linux) with Ubuntu 20.04 LTS. I want to use the Cloudy package, a Linux based simulation tool https://gitlab.nublado.org/cloudy/cloudy I have installed the package and tried to run the make command but I'm getting this error:

sh: 0: Illegal option --
Creating cloudyconfig.h
no object file found, is the compiler working?
make: *** [Makefile:255: /home/ray/cloudy_m ...
Score: 2
student_11 avatar
problem with making a c++ project with G++
aq flag

I am trying to build cascade library using G++ 8.3.0. In the documentation they mention that it was tested on G++ 4.7.2. My question is, is it necessary to downgrade to 4.7.2? if so could you please tell me how? because I tried both 4.8 (oldest version available according to $which gcc command) and 8.3.0 to build cascade and received the following error:

In file included from ../../include/descore/ ...
Score: 2
Sagar avatar
How to build gcc-mips-linux-gnu from source
jp flag

I've been using the gcc-mips-linux-gnu package, and now I want to make a small modification to the compiler. How can I build the exact same package locally?

I already tried using apt-get source based on this answer, but that does not retrieve the gcc source. The "source" retrieved is just a few shell scripts. Running

dpkg-buildpackage -rfakeroot -uc -us -b

takes less than two minutes (red flag since bui ...

Score: -2
Packages and meaning of gcc-8
us flag

ls -la commands below brings file information gcc-8 that looks strange for me. I suppose it is not link. I know there are different GCC packages with different GCC versions and it looks like I have package with GCC version 8.

How to know gcc-8 is package and not link? Where this package is located? Why other binaries does not show its packages?

ls -la /usr/bin/gcc

brings

lrwxrwxrwx 1 root root 5  ...
Score: -1
carlosgrt avatar
Problem with module add
us flag
  1. Hi, I have to do some work on Ubuntu-20.04.3, the pdf guide tells me to use "module add miniconda/3" and "module add gcc/10.2.0" to set up the enviroment. Then I have to use cythonize then compile with gcc and then python command to execute the program.
  2. I used the computers at school for that so I didnt have a problem using that commands but now im trying on my pc with ubuntu. Everytime I use the ...
Score: 0
Cmake can't find gcc compiler
nl flag

I have Ubuntu 18.04.6 LTS and I am trying to install and run gcc v8 (a v7 version is the default).

I have done: sudo apt-get install build-essential

sudo apt-get install gcc-8

To try to get the v8 to be default I did: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --sla ...

Score: 0
baudneo avatar
Install gcc/g++ 6 on Ubuntu 21.04
cn flag

I am trying to compile Cuda 10.2 and predictably gcc-10 will not work to compile it. When using 20.04 it was simple, add bionic repo, update, install, update-alternatives. Using 21.04 I cannot get anything to work.

I tried with both xenial and bionic 'main' and 'universe' repos, which throws an error about the PUBKEY. I got the PUBKEYs from the ubuntu keyserver and update the package list, no err ...

Score: 0
thesavagen avatar
I am using ubuntu 20.04 LTS trying to get from GCC 9.4 to gcc 10 or higher
cn flag

sudo apt-get install gcc-10 g++-10:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++-10 is already the newest version (10.3.0-1ubuntu1~20.04).
gcc-10 is already the newest version (10.3.0-1ubuntu1~20.04).
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
<pre>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/li ...
Score: 0
covar avatar
Trying to recompile kernel in order to enable rfcomm support
in flag

I'm trying to recompile the android_kernel_oneplus_msm8998 in order to enable RFCOMM support. I have followed the following instructions:

https://github.com/offensive-security/kali-nethunter/wiki/Porting-Nethunter

https://github.com/offensive-security/kali-nethunter/wiki/Modifying-the-Kernel

When I try to make oneplus5-stock_defconfig I get the following error:

make oneplus5-stock_defconfig
./scripts/ ...
Score: 0
mstdmstd avatar
Docker failed with [Makefile:192: imagick_file.lo] Error 127
jp flag

I try to install php in docker of w2orking project with header in Dockerfile :

FROM composer:1 AS composer
FROM php:7.4-fpm-alpine
COPY --from=composer /usr/bin/composer /usr/bin/composer
ENV PHPIZE_DEPS \
build-base \
...

I got errors building the project with error below the output:

docker-compose up -d --build
...
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static wo ...
Score: 1
Unable to correct problems, you have held broken packages while installing gcc
jp flag

i can't install this on my Ubuntu 20.04 LTS

:~$ sudo apt install gcc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The f ...
Score: 0
libgcc_s.so.1 must be installed for pthread_cancel to work, Loguru caught a signal: SIGABRT
cn flag

I am working on docker container with Ubuntu version 18.04.

I am running a python file inside docker container and encountered this libgcc_s.so.1 error.

This error occurs from the main python file when importing function from another python file in same directory.

I have the lib file in /lib/x86_64-linux-gnu.

I have also installed gcc-multilib using apt-get from Dockerfile. But the error still pe ...

Score: 0
sam avatar
'cc1obj': execvp: No such file
ru flag
sam

I'm trying to install cider by using the command

pip3 install cider 

but got

 x86_64-linux-gnu-gcc: error trying to exec 'cc1obj': execvp: No such file or directory

what should I check ? or install ?

i tried to install sudo apt-get install libgnustep-gui-dev and the error become

  cider/_osx.m:1:9: fatal error: AppKit/AppKit.h: No such file or directory
     #import <AppKit/AppKit.h>
     ...
Score: 1
Dequog avatar
GCC compiling problem
es flag

I just downloaded the GCC compile for C/C++. After compiling with the command gcc main.c -c -lGL -lGLU -lglut I get a permission error which can be fixed by changing the permissions. I then get this error: bash: ./main.o: cannot execute binary file: Exec format error. Will you help me fix this? Also if it helps I'm using C.

-Thank you in advance

Score: 0
gogogo avatar
Ubuntu Gcc arm compiler
cl flag

I am trying to use arm 4.9.3 on my ubuntu 20.04 system. I downloaded related files on https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update and I want to use this gcc version instead of my gcc arm version. How can I do that ? When I enter this command arm-none-eabi-gcc --version I want to show 4.9.3 how can I do that ?

Score: 0
Mateoglzc avatar
Upgrade gcc version in Ubuntu 18,04
in flag

I'm running Ubuntu 18.04 in WSL, which I use to compile my c++ programs.

I need to write a program that gets the name of all the files in a certain directory and adds them into a vector of strings. Browsing the internet I found that I can use the "filesystem" library to do this in a simple and easy way.

The problem is that whenever I try using this answer I get the error 'filesystem' has not been declar ...

Score: 0
Shah Jacob avatar
Getting E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing when trying to install g++
cn flag

So I am trying to install gcc to install g++ on WSl-2 for Windows10 (which is basically a real Linux kernel) and I get this unable to fetch archives error try apt-get update error message after a bunch of Failed to Fetch errors

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libubsan0_7.4.0-1ubuntu1~18.04_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://a ...
Score: 0
jnava1612 avatar
While trying to install RegCM I get configure: error: C compiler cannot create executables after executing ./configure
ng flag

used

configure: error: C compiler cannot create executables

and got this

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/jorgenava/Modelos_de_Simulacion/RegCM-master':
configure: error: C compiler cannot create e ...
Score: 0
bioptools compilation problem (make)
jp flag
MTG

[ubuntu 20.04.3]

Im trying to install program (https://github.com/ACRMGroup/bioptools) and have this error when im run make (following the installation instructions)

(base) marcin@marcin-Lenovo-ideapad-Y700-15ISK:~/bioptools-1.9/src$ makeenter code here
(cd libsrc/bioplib/src; make)
make[1]: enter the catalogue '/home/marcin/bioptools-1.9/src/libsrc/bioplib/src'

[...]

gcc -fPIC -ansi -Wall -ped ...
Score: 2
Harsh avatar
Cross compile C/Cpp application for target ARM arch support ubuntu18.04 32-bit, on host machine i.e. ubuntu 18.04 64-bit machine using cross compiler
mx flag

Trying to achieve the below task

Cross compile C/Cpp application for target ARM architechture supports ubuntu 18.04 32-bit on a host machine i.e. ubuntu 18.04 64-bit machine using cross compiler.

followed steps below but nothing is working out and getting the Error given below..

sudo apt-get install gcc-7-multilib

/home/user/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/arm-linux-gnueabihf-gcc ...
Score: 0
ikreb avatar
How to install the missing header sys/sockio.h?
cn flag

I use Ubuntu 20.04 and want wo build a C program. But the sys/sockio.h header files is missing. Which package do I have to install?

The command locate -b '\sockio.h' returns nothing.

Score: 0
user1398416 avatar
gcc: fatal error: no input files compilation terminated
ph flag

I'm new to linux environment. I created a file s1.c in a folder named 'program' which is present in desktop. When I try to compile my code using "/program gcc s1.c " it's showing "gcc: error: s1.c: No such file or directory gcc: fatal error: no input files compilation terminated." What may be the problem

Score: 0
Joseph avatar
gcc 11.2 package in Ubuntu Hirsute?
br flag

Is it planned to add package for gcc 11.2 for Ubuntu Hirsute please? I see it exists for Ubuntu Impish as listed in https://packages.ubuntu.com/impish/devel/gcc-11 but not for Ubuntu Hirsute which is gcc 11.1. Is is possible to install Impish package on a machine running Hirsute (I use WSL2). Thanks in advance, Best regards Joseph