Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
15 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 ...
1
vote
1answer
84 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 -...
2
votes
1answer
75 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 ...
0
votes
1answer
56 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 ...
1
vote
1answer
46 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/...
4
votes
1answer
81 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/...
0
votes
0answers
61 views

Is there a conflict between rust (cargo) and libxcb?

I've just installed rust under Raspbian on my Pi 3 B+, and had some difficulty compiling (trying both stable and nightly toolchains): >cargo build ... ld: cannot find -lxcb Searching around, I ...
1
vote
0answers
66 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 ...
1
vote
1answer
172 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 ...
2
votes
2answers
2k 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 ....
0
votes
3answers
480 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 ...
4
votes
3answers
3k 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/...
1
vote
0answers
104 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 ...
0
votes
1answer
322 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 ...
2
votes
1answer
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 ...
0
votes
1answer
286 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.
3
votes
1answer
104 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/...
0
votes
1answer
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....
0
votes
1answer
425 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 ...
0
votes
1answer
173 views

NXP XTRINSIC-SENSE-BOARD using C

https://www.element14.com/community/thread/37836/l/reverse-engineered-sensorso-with-source https://github.com/larsch/rpi-mems-sensor Hello Everyone :) I have a raspberry V1 and a NXP senseboard, ...
2
votes
0answers
484 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 ...
1
vote
1answer
72 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 ...
1
vote
1answer
311 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 ...
1
vote
1answer
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/...
2
votes
0answers
912 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-...
3
votes
1answer
189 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 ...
2
votes
1answer
417 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 ...
-1
votes
1answer
152 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 ...
-1
votes
1answer
380 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 ...
1
vote
2answers
3k 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 ...
2
votes
2answers
256 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 ...
2
votes
2answers
1k 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 ...
3
votes
1answer
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 ...
3
votes
3answers
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 ...
0
votes
1answer
349 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 ...
3
votes
1answer
998 views

Unable to compile Chromium

I am trying to compile Chromium for Raspberry PI. I am using an Ubuntu 10.10 installation, and have tried using Ubuntu 14.04 but all with the same result. I followed all the steps in the link below. ...
11
votes
3answers
13k views

How can I install GCC 4.8 on the Raspberry Pi?

How can I install GCC 4.8 on Raspberry Pi? Do I need to compile it from source? Should I update from Raspbian wheezy to a newer version?
6
votes
2answers
30k views

How do I see which ARM CPU version I have?

When compiling a package for the Pi I came across a message like this: CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8 and CFLAGS += -mtune=arm1176jzf-s -...
0
votes
1answer
2k views

Cross compiling, missing packages

I've set up a cross compile toolchain for raspberry pi and I can compile basic helloworld and run it on raspberry. I'm stuck at compiling some open-source programs as ./configure is complaining about ...
5
votes
3answers
160k views

How to compile C files in terminal

Question Can someone please tell me how to compile from the command line in a clear, concise way. Preferably, my programs will be written in a real text editor (such as leaf pad). Background I am a ...
0
votes
2answers
706 views

trying to build file with gcc getting several errors [closed]

I have the code below I am trying to build #include stdio.h #include stdlib.h #include signal.h #include wiringPi.h #include softPwm.h void control_event(int sig); int HARD_PWM_PIN=1; Hardware PWM ...
8
votes
3answers
58k views

How to install GNU C++ Development Tools on Raspberry Pi (using apt-get)

Is there a well-known package I should install for C++ Development Tools? What do I type at the command-line after sudo apt-get install? Ideally, I want the same tools that were installed with "...
3
votes
2answers
1k views

What can cause libs to not be found on raspberry pi

On my Raspberry Pi, with Debian Squeeze, I want to link to the shared objects in /opt/vc/lib. I have added this directory to a file in /etc/ld.so.conf.d/ which is included in /etc/ld.so.conf. The ...
2
votes
2answers
1k views

Compiling for CPAN not possible on raspbian?

I'm trying to install the Perl module Linux::Inotify2. The installation requires some C compiling. Which compiler CPAN uses is the same one Perl was compiled with. Which one that is can be seen with: ...
23
votes
1answer
10k views

How can I detect that I'm compiling for Raspberry Pi?

As Raspberry Pi needs a bit of special code (I'm talking about C/C++) for accessing some hardware features (e.g. a call to bcm_host_init()). I'm looking for a reliable and elegant way to detect this ...
79
votes
8answers
50k views

How do I build a GCC 4.7 toolchain for cross-compiling?

I already asked this question on Stack Overflow, but I would like to know if anyone managed to build a GCC 4.7 toolchain for ARM cross-compilation (for a x86/x86-64 Linux host). There are many ...