Skip to main content
8 votes
Accepted

Running ARM64 binaries on RP4

You are most likely using Raspbian with a 64-bit kernel and 32-bit userland. You need to use a distribution with 64-bit kernel and 64-bit userland. The latest beta of Raspbian seems to work. See also: ...
Michael's user avatar
  • 196
7 votes
Accepted

gcc manual not found

The documentation for GCC is actually contained in its own package1, gcc-doc. Just run: sudo apt-get install gcc-doc and then man gcc will work as expected. Note that your attempt, sudo apt-get --...
Aurora0001's user avatar
  • 6,328
5 votes

Updating to newest GCC/G++

Upgrade your system to Bullseye, then you'll get GCC 10.2. In order to upgrade, replace buster with bullseye in your /etc/apt/sources.list file and run apt-get update apt-get upgrade apt-get dist-...
Dmitry Grigoryev's user avatar
4 votes
Accepted

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

First of all to clear up ambiguities: Aarch32/Aarch64: These are two main Instruction Set Architectures for ARM (Advanced RISC Machine) architecture processors. Armv7-A/Armv8-A: These are the most ...
Balázs Börcsök's user avatar
3 votes

Running ARM64 binaries on RP4

The 64-bit Pi OS is available here and here (for the "lite" version). You must be using one of these if you intend to run 64-bit applications. The kernel architecture has no direct impact on ...
Dmitry Grigoryev's user avatar
3 votes

How do I see which ARM CPU version I have?

as STEJ's answer suggested, run uname -m. If you have arm64 then it's 64bit and if you have armv7l, then it's 32bit For more information: https://www.raspberrypi.org/forums/viewtopic.php?t=251721
Aharon Ohayon's user avatar
3 votes

G++4.9 not found, Raspberry Pi Jessie

You made a mistake in your command. It should be: sudo apt-get install gcc-4.9 g++-4.9
Huczu's user avatar
  • 1,251
3 votes
Accepted

Problem with gcc/g++ versions

In the main guide says Now you have the needed compiler, but it is not yet set to be the default compiler. You can fix that using the instructions here. If you read the link, it says that after you ...
GramThanos's user avatar
3 votes
Accepted

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

The -o option to gcc specifies the name to be given to the executable. You are saying name the executable as the input source code. That is almost certainly an error.
joan's user avatar
  • 71.2k
3 votes

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

The default version of the GCC are as follows: Raspbian Stretch: GCC 6.3.0 Raspbian Jessie: GCC 4.9.2 (GCC 4.8.4 available) Raspbian Wheezy: GCC 4.6.3 (GCC 4.4.7 and 4.7.2 available) g++ always ...
flakeshake's user avatar
  • 6,213
3 votes

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

Strictly speaking, Raspberry Pi comes with no software. The gcc version will depend on which distribution of Linux (or other OS) you take and exactly when you take it. Most Linux distribution images ...
Brick's user avatar
  • 1,377
2 votes
Accepted

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

This is in part a duplicate of these questions: compilation errors : gtk+-2.0 gthread-2.0 not found Installing dependancies Although since apt has a new, simplified, slightly snazzier interface I'll ...
goldilocks's user avatar
  • 59.2k
2 votes

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

One thing that doesn't look right is that your LD_PRELOAD contains an absolute path, while the error message complains about a relative path, ./libfoo.so. Make sure you use the absolute path in ...
Dmitry Grigoryev's user avatar
2 votes

Compiling GCC 8.1.0 on Pi64

I think that just omitting the gcc parameter --with-arch will compile according to your real architecture.
Francesco Boi's user avatar
2 votes

C Program compilation problem

The problem is with your printf line. printf(hello world; you are missing the closing parenthesis ")", You are also missing quotes around the text "Hello World" change that line to: printf("hello ...
Steve Robillard's user avatar
2 votes

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

You can always run 32 bit programs/operating systems on a 64 bit architecture. That is downstream compatible. You cannot run 64 bit programs on a 32 bit architecture, of course. So it is no problem to ...
Ingo's user avatar
  • 42.2k
2 votes
Accepted

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

A version of wiringPi is probably installed with Raspbian. I doubt it is included with Ubuntu. You will probably need to build from source. You could try installing the binary from the author's site. ...
joan's user avatar
  • 71.2k
2 votes
Accepted

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

Is it because the OS itself is compiled for ARMv6? Yes. Why... The same reason the OS is compiled for ARMv6: Because it is intended for use on all models, including the ARMv6 Zeros, etc. There is ...
goldilocks's user avatar
  • 59.2k
2 votes
Accepted

AddressSanitizer on Raspbian

Basically libasan can not guarantee correct work if it's not the first loaded library (which is e.g. the case when /etc/ld.so.preload is not empty). There were several cases when preloaded libraries ...
user96931's user avatar
  • 739
2 votes

Pi 4 doesn't recognize .o file format?

The .o files are object files and they must be compiled for the Pi. You cannot take a .o file from an X86 platform and expect it to link on a Pi. That produces the error message that you describe, so ...
Ljm Dullaart's user avatar
  • 2,511
2 votes
Accepted

Makefile file format not recognized when using cross compiler

There are no build rules for the object files you list as dependencies, so Make compiles them using its default rule, using g++, i.e. the native compiler, not the cross-compiler. You then try to link ...
tttapa's user avatar
  • 986
1 vote

Makefile file format not recognized when using cross compiler

The problem is that you set CC for the cross compiler, but you need to set CXX to set the C++ cross compiler. Since you didn't change that, it used the native C++ compiler, and the object files are ...
user10489's user avatar
  • 991
1 vote
Accepted

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

I made it work! :) I'm no Linux expert and I made plenty of tests (trial & errors) so here are some notes that might help the next person who has this problem: The app I was needing the grpc for ...
Don Madrino's user avatar
1 vote

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

Compiling with add -fcommon to CFLAGS made it work. Got this answer from raspberry pi forums after posting it there Try CFLAGS="-fcommon" gcc test.c -o test
Abhiram Shibu's user avatar
1 vote
Accepted

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

I found some hack to compile the file, but it is not sure that this won't make any troubles in future. I've run gcc's preprocessor on the file (-E flag) in Raspberry: /usr/bin/c++ -E -DBOOST_NO_RTTI -...
baziorek's user avatar
  • 141
1 vote

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

do you say that it does not matter if the the processor is 32 or 64 bit because if I have a 32-bit OS running on it, 32 bit programs will run just fine on it? Yes; this is also true for x86-64: You ...
goldilocks's user avatar
  • 59.2k
1 vote

symbol lookup error: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

$ c++filt _ZN7QWidget8qwsEventEP8QWSEvent QWidget::qwsEvent(QWSEvent*) If you look at the documentation, this method is only available if Qt is built under the windowing configuration of Qt for ...
jdonald's user avatar
  • 2,914
1 vote

GCC version for compiling a loadable kernel module

first I'll address the headers, most distros provide a convenience package for you to download the headers for your current kernel, on raspbian this is in the package raspberrypi-kernel-headers so a ...
James Kent's user avatar
1 vote

GCC version for compiling a loadable kernel module

I do not believe that is the right link. You ought to be able to build a custom kernel with the relevant packages, which I think could be: linux-kbuild and linux-source and dependences although the ...
SlySven's user avatar
  • 3,621
1 vote
Accepted

Raspberry Pi 2 NEON instruction set, vector report generation?

I had posted the same question on the Raspberry Pi forums and all thanks to the user: Paeryn, for the answer. I am re-posting his answer here : With the latest GCC compilers the -ftree-vectorizer-...
Ragesam's user avatar
  • 41

Only top scored, non community-wiki answers of a minimum length are eligible