Questions tagged [gcc]

The GCC (GNU Compiler Collection) is a set of compilers for various high-level languages. Use this tag for questions related to how to install and use the GCC.

Filter by
Sorted by
Tagged with
0 votes
2 answers
39 views

Makefile file format not recognized when using cross compiler

I setup a container to cross compile my program so taht i can run it on a Raspberry Pi. It compiles fine when using ${CC} but prints: /usr/bin/arm-linux-gnueabihf-gcc -o test main.o CAcquireData.o ...
user avatar
0 votes
0 answers
95 views

How to install gcc-4.8 on Raspberry Pi 4B

I tried to install it by apt-get, but it turns out there is no gcc-4.8 in any repositories, here is my /etc/apt/source.list file: deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib ...
user avatar
0 votes
1 answer
1k views

Updating to newest GCC/G++

After updating my Raspbian Pi 4B through sudo apt update && sudo apt upgrade -y, I noticed that it has quite old GCC/G++ version 8.3.0 while there exists already release of 11.2. Can anyone ...
user avatar
  • 101
0 votes
0 answers
693 views

Failed building wheel for pandas on model 3B+

I'm trying to install pandas in a Python virtualenv on a RPi model 3B+, but its wheel fails to build. Pandas does however successfully build/install for the system Python (py3.7.3, pip 18.1). Could ...
user avatar
  • 101
0 votes
0 answers
289 views

Package gcc-arm-linux-gnueabi is not available, but is referred to by another package

I try to compile a piece of software with a pre-defined Docker-enviroment, where following packages are getting installed: gcc-arm-linux-gnueabi, g++-arm-linux-gnueabi, gcc-arm-linux-gnueabihf and g++-...
user avatar
  • 111
3 votes
2 answers
891 views

Running ARM64 binaries on RP4

I'm trying to run an ARM64 binary on my RP4 with arm_64bit enabled in /boot/config.txt. I get an error: No such file or directory. Running file cloudflared-linux-arm64 I get: cloudflared-linux-arm64: ...
user avatar
-1 votes
1 answer
194 views

Pi 4 doesn't recognize .o file format? [closed]

Was trying to compile some .c files along with one .o file using gcc, and it failed with an error message saying: .o file format not recognized. The same files got compiled on centOS vm though.
user avatar
  • 1
1 vote
1 answer
1k views

How can I fix "atomic" related issues in my build?

I'm trying to build gRPC using this tutorial (https://lzqblog.top/2018-11-08/Cross-compile-gRPC-for-ARM/) but I still get "atomic" related issues (undefined reference: __atomic_fetch_add_8 )....
user avatar
-1 votes
1 answer
103 views

Code not compiling on raspberry pi 4 but compiles fine on rasperry pi 3 B

https://github.com/ABHIRAMSHIBU/rpimultiboot/ I have this code, currently I didn't polish it at all because its under development. But I am having an issue with compiling this. I have a sdcard with ...
user avatar
1 vote
2 answers
2k views

wiringPi.h not found by gcc. Works in Raspian, not Ubuntu Mate

This is my first time posting on stack exchange so I apologize if this is too much or not enough info on the problem. A few months ago I installed Ubuntu Mate 18.04 on a Raspberry Pi 3B+ and tried to ...
user avatar
3 votes
1 answer
694 views

Why does the new Raspberry Pi OS come with a version of GCC that targets ARMv6 by default?

The August 2020 version of Raspberry Pi OS ships with arm-linux-gnueabihf-gcc-8. Checking arm-linux-gnueabihf-gcc-8 -v I see that it has this option set: --with-arch=armv6. However, the new Raspberry ...
user avatar
  • 673
1 vote
0 answers
98 views

How do I use the proper linux header extension folder

I am trying to build a TP-Link driver and when I run make I get... "******************************************" "NO SKRC,we will use default KSRC" "******************************************" make ...
user avatar
  • 171
0 votes
3 answers
1k views

How can I run 32-bit compiled assembly code on Rasberry PI 4 B, if possible at all?

I bought the PI 4 B for a university project, as I have to make small 32-bit ARM assembly program. However I realized it too late, that it comes with an aarch64 architecture ARM processor. I would ...
user avatar
1 vote
0 answers
182 views

Why does writing to I2C is too slow in Python comparing to C? [closed]

I am trying to find out why the same code in Python works 25 times slower than C even if I use CDLL, when I try to write into I2C. Below I will describe all the details what I am doing step by step. ...
user avatar
  • 111
1 vote
1 answer
815 views

symbol lookup error: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

I have cross-compiled executable file from QT 4.8.7. I am running it on a Raspberry PI (Ubuntu), with QT 4.8.7 and QT declarative module installed. When i run the executable file on my raspberry pi, i ...
user avatar
  • 21
1 vote
0 answers
183 views

Strange segfault after several hours of running program

I created a program fairly closely related to hello_pi/hello_video.c. And for some reason after several hours of running the program I get these very strange segfaults that I cannot for the life of me ...
user avatar
  • 141
5 votes
1 answer
1k views

AddressSanitizer on Raspbian

I am trying to use AddressSanitizer on Raspbian. I use the following to compile my program: gcc -fsanitize=address -fno-omit-frame-pointer -g prog.c -o prog Even for the simplest program (just a ...
user avatar
  • 602
-1 votes
1 answer
299 views

Not able to compile the u-boot 2017.09

This is the OS info that I am using in my pi3 (BCM 2837) board. pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux [ am I using the ...
user avatar
2 votes
1 answer
601 views

How to compile project on Raspberry Pi, even when g++'s virtual memory exhausted despide big SWAP?

I want to build Iroha hyperledger on Raspberry Pi 3. So I've downloaded code and all dependencies and compiler gcc-8.2 (downloaded precompiled from here), then configured without tests: cmake -...
user avatar
  • 131
3 votes
1 answer
3k views

Problem with gcc/g++ versions

I'm currently setting up Homebridge to run on my Pi using this installation guide. I have run into a problem regarding the C++ compiler section; I understand that this part of the guide is out of date ...
user avatar
  • 133
0 votes
1 answer
484 views

GCC and makefile on Raspberry Pi running NOOBS deletes my c file

I am having an issue with my pi where I run gcc or make from the terminal and my main c file included in the compilation is deleted. I am using the wiringPi library to communicate with some sensors ...
user avatar
  • 13
2 votes
1 answer
180 views

Compiling GCC 8.1.0 on Pi64

I have installed Pi64 from here. I want to compile GCC 8.1.0 as per the instructions here. However the text of the article sets the target architecture to --with-arch=armv6 which is 32bit? Should/...
user avatar
6 votes
1 answer
473 views

gcc manual not found

I wanted to see gcc's maual but $ man gcc No manual entry for gcc See 'man 7 undocumented' for help when manual pages are not available. $ man gcc-XX No manual entry for gcc-XX $sudo nano /etc/apt/...
user avatar
1 vote
0 answers
128 views

Installing a higiher version of GCC on Wheezy that doesn't rely on a newer glibc [closed]

We have software that we distributed to a bunch of Pis that have Raspian Wheezy. Recently, we've added in a bit of code that uses C++ standards that aren't integrated until >=gcc-4.8. If I compile on ...
user avatar
1 vote
1 answer
744 views

Adding gcc compiler to Poky image for raspberry Pi

I am using raspberry Pi 3 running a poky image built using the Yocto project. Is there any possible solution to add gcc compiler to the image? I found the cross-compilation very complicated and ...
user avatar
  • 45
3 votes
2 answers
5k views

Error while loading shared libraries: foo.so: cannot open shared object file: No such file or directory

I have cross compiled c++ code for raspberry pi. Below is process I followed: 1) Cloned the official toolchain from raspberry pi github. Set the environment variable of arm-linux-gnueabihf-c++ (in ....
user avatar
0 votes
3 answers
1k views

GCC version for compiling a loadable kernel module

I am not very familiar with Linux, so may be my question is a little bit foolish. I would like to compile kernel module without recompiling the kernel (USB Wi-Fi stick driver for MT7106U chip). I ...
user avatar
5 votes
3 answers
9k views

What is the gcc and g++ version in Raspberry Pi 2 and 3?

I am reading an article on raspberry pi on a local magazine and they do this sudo apr-get install gcc-4.8 g++-4.8 sudo rm -rf /usr/bin/gcc sudo rm -rf /usr/bin/g++ sudo ln -s /usr/bin/gcc-4.8 /usr/...
user avatar
1 vote
0 answers
224 views

Cross Compile on maxOS fails linking System library (CMake), but other libraries succeed

tl;dr - CMake fails at linker not finding System library with precompiled RaspberryPi toolchain when other libraries work So I've been fighting this for a few days, and I believe I'm nearing the end ...
user avatar
  • 11
0 votes
1 answer
623 views

Where can I get a COMPLETE libfcgi install for Pi 3B

I used apt-get to install the fastcgi package recently (sudo apt-get install libfcgi) and my Pi3B duly chuckled away then announced that it hwas finished. BUT when I tried to compile the backend to ...
user avatar
2 votes
1 answer
1k views

Raspberry Pi 2 NEON instruction set, vector report generation?

Lately I have been trying to generate a vector report of an OpenCV project implemented on the raspberry pi 2 model B, but for some reason there is no output. The same algorithm produces vector report ...
user avatar
  • 41
0 votes
1 answer
349 views

Cross compiler gcc on Raspbian

Is it possible to install cross compiler on Raspbian? I mean arm-linux-gcc. I would like to try compile cross platform project on Raspbian instead of on virtual machine with Ubuntu.
user avatar
  • 1
2 votes
1 answer
249 views

Arguments for execl compiling with gcc [closed]

I have a weird problem with a Raspberry Pi 2 (model b). I'm compiling the following program in GCC in Raspbian Jessie (Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/...
user avatar
  • 21
0 votes
1 answer
2k views

G++4.9 not found, Raspberry Pi Jessie

I am trying to install gcc4.9 and g++4.9 on my raspberry pi jessie. I am following this tutorial, however when it comes to running: sudo apt-get install gcc-4.9 g++4.9 I get: Reading Package Lists....
user avatar
  • 101
0 votes
1 answer
733 views

C Program compilation problem [closed]

I wrote a program using nano and tried to compile it using gcc command on Lx-terminal. It's showing stray error. Can anyone tell me what is the problem? For simple "hello world" program also is ...
user avatar
2 votes
0 answers
956 views

How to compile boost libraries [closed]

I'm trying to compile boost libraries that I need for compiling and installing Ocelot tracker on the Raspberry Pi. I tried with libraries from apt-get but it doesn't work. These are instructions for ...
user avatar
1 vote
1 answer
137 views

Foreign characters showing from gcc compiler output

My locales are are set to generate en_US.ISO-8859-15 ISO-8859-15 and en_US.UTF-8 UTF-8. However the borders of raspi-config still have borders showing the accented âââ. And the gcc compiler output ...
user avatar
1 vote
1 answer
411 views

CMake error while doing yotta build on Raspberry Pi

I am getting following error while I run 'yotta build' command. I am trying to install mbed client on Raspberry Pi. I am following this tutorial mbed client linux example Error: info: generate for ...
user avatar
2 votes
1 answer
2k views

Cross-Compiling kernel can't find gcc

I am cross compiling the Raspbian kernel since it will take about 12 hours for the Pi to do (Raspberry Pi 1). I have the build tools for ARM and the kernel in two separate folders in /home/gray/...
user avatar
  • 41
2 votes
0 answers
1k views

Which gcc compilation flags should use for RPi1 model B ? what is the ABI, architecture and CPU?

I want compile some binaries for RPi model B (revision 2.0) 512MB , I got installed arm-linux-gnueabi-gcc on Fedora 23 dnf copr enable lantw44/arm-linux-gnueabi-toolchain dnf install arm-linux-...
user avatar
  • 121
3 votes
1 answer
221 views

Compile GCC for Raspberry Pi 2B - Patches required?

I need to compile a modern version of GCC in order to compile CMake in order to compile OpenCV 3.0.0. So I want to compile a modern and stable version of GCC for the Raspberry Pi 2b. I've read this ...
user avatar
2 votes
1 answer
548 views

Error compiling kernel using guide provided on Raspberry Pi website

I'm encountering errors while trying to compile the kernel from source. I've looked around but I'm not finding anything that deals with the error I'm seeing specifically. I am using the guide on the ...
user avatar
-1 votes
1 answer
203 views

Cannot compile anything on raspberry or works code I compile in another linux

I got a simple C++ code. The hard part is that I use -std=c++11 flag. I've tried: Compiling on Mint Code::Blocks and then move bin to run it: cannot execute binary file Compiling on gcc 4.6.3 ...
user avatar
  • 79
-1 votes
1 answer
515 views

gcc -L .so and .a files [closed]

I am examining gcc with an example that uses the -L option this seems to point to a directory where I see .so and .a files. Can anyone explain the meaning of these two file types (it doesn't seem to ...
user avatar
  • 103
1 vote
2 answers
4k views

Cross-compiling to Raspbian

I have Raspbian Jessie installed on my Raspberry PI, and I have a virtual box with a fresh install of Debian Jessie for amd64 with the armhf architecture enabled, and with the ARM cross toolchain from ...
user avatar
  • 191
2 votes
2 answers
324 views

Not able to fetch register values using Mike M's BCM2835 C code

I'm attempting to utilize the bcm2835_peri_read(uint32_t*) function from Mike M's BCM2835 code, however console-output-debugging indicates I'm continually getting back my address. I'm using g++ on ...
user avatar
  • 306
2 votes
2 answers
2k views

How do I compile gcc 5 for my Raspberry Pi 2 [closed]

I have a Raspberry Pi 2. What is the best way to get a functional gcc 5 (from the current trunk) on the Raspberry Pi? Since compiling gcc takes a good two hours on my x86-based computer and probably ...
user avatar
  • 129
3 votes
1 answer
1k views

Raspberry Pi 2 and its FPU

I've been looking into switching a floating point heavy application from my B+ to a B 2. However, there are some things I don't quite understand about the 2: Is there a FPU for each core or is there ...
user avatar
3 votes
3 answers
2k views

Will gcc produce ARM7 code

I don't have a Raspberry Pi 2 yet, but was wondering what code gcc will produce. Many of my programs use WiringPi and if I compile this and my programs will they use ARM7 code, and thus be ...
user avatar
  • 53.5k
0 votes
1 answer
503 views

"…relocation truncated to fit: R_AVR_13_PCREL against symbol…" using PlatformIO on Raspbmc through ssh

I ssh into my Raspbmc installation through my iPad (I don't have a keyboard). I was looking into developing for Arduino on the Pi, as I don't have my primary PC with me right now. I installed ...
user avatar
  • 171