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.

learn more… | top users | synonyms

0
votes
1answer
32 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
0answers
27 views

Bitbake fails at do-compile in gcc-runtime-5.2.0-r0

I am trying to compile a minimal linux distro (rpi-hwup-image) for Raspberry Pi using The Yocto (poky-jethro). I have tried the process on Xubuntu-15.10 and Ubuntu-Server 14.04 LTS. Trials on both ...
0
votes
1answer
31 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
38 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
16 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
57 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 ...
0
votes
0answers
119 views

No available video device SDL2

I'm trying to get a simple window with OpenGL up with C (CodeBlocks IDE). I'm using SDL2 as a window manager. However, when I start it up SDL_Init fails and SDL_GetError "No available video device". ...
1
vote
1answer
212 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 ...
2
votes
0answers
141 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 ...
3
votes
1answer
89 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
101 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 ...
0
votes
1answer
76 views

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

I got simple c++ code, hard part is that i use -std=c++11 flag. I've tried: -Compile on mint codeblocks and then move bin to run it, cannot execute binary file -Compile on gcc 4.6.3 with ...
-1
votes
1answer
89 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
1k 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 ...
1
vote
2answers
127 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 ...
3
votes
2answers
600 views

How do I compile gcc 5 for my Raspberry Pi 2

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 ...
1
vote
1answer
595 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 ...
2
votes
3answers
1k 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
159 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
669 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. ...
9
votes
3answers
8k 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?
0
votes
2answers
3k views

How do I tell which version arm cpu on my Pi?

When compiling a package for Pi. I come across with something 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
860 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 ...
2
votes
3answers
52k 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
541 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 ...
6
votes
3answers
28k 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
740 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: ...
18
votes
1answer
4k 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 ...
67
votes
8answers
44k 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 ...