Questions regarding GNU Compiler Collection Suite.

learn more… | top users | synonyms

1
vote
3answers
100 views

Is there a way to know which options were used at compile time?

Take a look at the following command line: gcc -o hello -Wall -D_BSD_SOURCE hello-world.c Now, is there a way to know about these options by doing some processing on the 'hello' executable.
2
votes
1answer
110 views

How to link different (incompatible) libraries at runtime depending on program?

I have a number of legacy codes that need to be compiled with specific (and often conflicting) libraries. To be specific I have a program which can only be compiled with g77 and another program which ...
2
votes
3answers
362 views

compile software with older version of gcc and linux kernel

Distributor ID: SUSE LINUX Description: openSUSE 11.4 (x86_64) Release: 11.4 Codename: Celadon gcc (SUSE Linux) 4.5.1 Linux linux-14ay 2.6.37.6-0.20-desktop #1 SMP PREEMPT 2011-12-19 ...
123
votes
4answers
45k views

Why is FreeBSD deprecating GCC in favor of Clang/LLVM?

So I was surfing the net and stumbled upon this article. It basically states that FreeBSD, starting from Version 10 and above will deprecate GCC in favor of Clang/LLVM. From what I have seen around ...
6
votes
1answer
680 views

CLFS: Building GCC cross compiler

Currently I try to build a embedded Linux from scratch with the instructions from Cross Linux from Scratch. Everything worked fine until I tried to compile the GCC Cross-Compiler. I want to build the ...
3
votes
1answer
5k views

Install gcc 4.7.2 on Debian squeeze 64x

I want to use gcc 4.7.2 on my Debian squeeze 64x I followed instructions in this thread: Get newest gcc for debian?, but I'm getting an error, I tried several apt-get install commands I will settle ...
2
votes
1answer
310 views

Being not admin user how to install local GCC instead of provided?

So I came into my classrom Debian is installed, and gcc 4.1. I want to install (compile from sources is an option - I have time..) for my self GCC 4.7 and adress it in bash as gcc anywhere. Is such ...
0
votes
2answers
508 views

Unable to install Mono 2.6 on CentOS

I have an application that breaks on mono 2.10, so I'm trying to install an older mono instead. I found an RPM and tried to install it, but it won't install (I believe) because the glibc and gcc ...
1
vote
2answers
203 views

Accidentally removed dev-libs/mpc from Gentoo

It seems I accidentally removed dev-libs/mpc instead of media-sound/mpc. Now I can't compile anything (including a replacement dev-libs/mpc) because in doing so I apparently murdered GCC. How does ...
2
votes
2answers
3k views

error while compiling ffmpeg: gcc is unable to create an executable file

When I run the ./configure command in ffmpeg source directory I get this error: gcc is unable to create an executable file. If gcc is a cross-compiler, use the --enable-cross-compile option. Only do ...
5
votes
1answer
2k views

Is there a way to deactivate Buffer overflow protection on my machine?

I want to do some experiments with buffer overflows on my various virtual machines, including (but not limited to) Debian 6, Ubuntu 12.04, Fedora 16, but every time I try to execute the buffer ...
2
votes
0answers
487 views

Compile parameters for MIPS based codesourcery toolchain?

I installed codesourcery cross compile toolchain for mips32 architecture on my WIN 7 machince. I want to first compile a simple 'factorial' binary for my router which is based on MIPS32. From little ...
2
votes
0answers
308 views

Error cross compiling linux kernel using buildroot

I am trying to build a kernel bt in cross compiling the kernel when I ran following command make CROSS_COMPILE=i686-linux- ARCH=x86 I got the following error: UCLIB_EXTRA_CFLAGS="" \ ...
2
votes
1answer
602 views

/usr/include/stdio.h:140: parse error before `__gnuc_va_list'

I keep getting this error, when trying to compile my C program in SCO (using gcc). I have had a look on Google, and found this other forum: Linux Questions, and that guy had the exact same issue as I ...
1
vote
1answer
177 views

Compiling against a newer version of glib?

I'm working on a piece of software that needs to compile against a very modern version of glib, but also needs to run on Ubuntu 11.10 (which doesn't come with that version). My first thought was to ...
2
votes
1answer
545 views

Extracting / Installing a TAR file

When I extract a tar file using this command: tar xvzf gcc-4.7.1.tar.gz (This is the directory the tar file is in: cd /u/test/GCC-4.7.1/) The files were extracted but they are in /dev/... (see below ...
2
votes
1answer
520 views

How to build Shallot

I am trying to build Shallot. I run x64 Debian Sqeeze. It runs into compile problems I don't understand... john@hayek:~/build/katmagic-Shallot-831de01$ make cc -O3 -I/usr/include ...
0
votes
2answers
4k views

How to install older version of glibc?

I'm trying to install gcc-4.4 on RHEL6: sudo rpm -ivh /mnt/dvd/Packages/gcc-4.4.3-1.el6.x86_64.rpm. But the problem is that is depends on glibc and glibc-common libraries. When I try to install them ...
1
vote
1answer
1k views

Unable to find headers in GCC

I am trying to compile a program using GCC in SCO, and I am unable to find the ctype.h file. I have managed to find the other files that were missing when compiling, like string.h etc. I was getting ...
0
votes
1answer
464 views

Error compiling glib

I am trying to compile glib 2.24.2 under Debian 64bit GNU/Linux 6.0.4 (squeeze) using: gcc 4.0.3 glibc 2.3.6 Configure command: CPP="/home/swarkentin/externalBins/bin/cpp" \ ...
-1
votes
1answer
283 views

Installing a .ko module on an embedded Linux system that does not support modules

From the answers to this question I have discovered that the embedded Linux distribution provided to me, by my hardware supplier, was not built with kernel support. If I am to use this distribution I ...
1
vote
1answer
467 views

Building GCC inside a chroot from source

In a previous question I asked about creating a chroot that simulates my embedded device environment. It was suggested that I build from source GCC and binutils first inside my chroot. To attempt this ...
3
votes
1answer
367 views

Install Compiler, GCC, in SCO

I am having difficulty trying to install the GCC compiler in SCO, but can't get it to work. I have used an FTP to transfer some files (.tar.gz) to /u/test/installgnu/ and I extracted the files, but ...
4
votes
1answer
396 views

Can I use a chroot on my dev machine to build an application to run on embedded linux installation?

I am trying to develop an application to run on an embedded linux installation. It comes with an older version of libc than I have on my development maching. If I were to create a chroot environment ...
0
votes
0answers
554 views

How to set library searching path using environment variable in compile-time

-I option set header file searching path for gcc/g++, and CPLUS_INCLUDE_PATH/CPATH append the searching path list. Then what about libs? It seems that LD_LIBRARY_PATH is just a path list for ...
7
votes
2answers
704 views

Find and install man file manually

I seem to be missing some man pages, notably gcc and g++. It doesn't help that I specify the section. whereis doesn't list man pages for those two, so I think they are simply not there. With Google I ...
3
votes
2answers
614 views

Unix/Linux C++ debugger that supports STL containers?

Currently I am using gcc-4.3.6 and Eclipse IDE for c++ development. I want to debug my project in Eclipse with gdb. I am having a hard time debugging code when it contains STL containers. Also I am ...
-4
votes
2answers
237 views

How to compile & execute C programs under Linux?

I'm migrating to from Windows to Linux and I heard a lot about Linux and how you can do some real good programming under Linux. But I'm have no idea about how to compile a code written in C on Linux.
2
votes
1answer
3k views

/usr/bin/ld: cannot find -lfl

After running the following command: g++ lex.yy.c -lfl I get the following error: /usr/bin/ld: cannot find -lfl How can I solve it?
4
votes
1answer
169 views

Where does GCC look for its internal executables?

I have installed GCC to a custom prefix. When it is invoked, it complains that it cannot find some of its internal binaries. My computer's "official" GCC keeps them here: ...
6
votes
2answers
9k views

Get newest gcc for debian?

I can't build my apps on gcc since I use various c++0x features. I'm on Debian 6 (Lenny) and after upgrade/updating I have gcc version 4.4.5-8. I'm unsure which version is required but mingw 4.6.2 ...
1
vote
1answer
803 views

Configurations needed to be done post GCC compilation and installation

I have compiled the latest GCC 4.7.0, on my Linux Mint 12, using gcc 4.6.1 (default). Compiler compiled successfully, steps followed ./configure make make install Binaries of gcc-4.7.0 are in ...
1
vote
1answer
4k views

C++ compile in Arch Linux with no g++ package in repositories

I wanna compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example. Using -x too won't work. like this: gcc -x c++ -o myprog myprog.cpp
2
votes
3answers
822 views

Compiling a C program that defines a function getline by GCC

I'm trying to compile by GCC an old C program that defines and uses a function named getline, which conflicts with the function of the same name in the GNU C library. How can you compile it? Passing ...
4
votes
1answer
19k views

gcc can't link to pthread?

I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code pthread_simple.c: #include <stdio.h> #include ...
2
votes
1answer
10k views

Installing GCC 4.5 on Fedora 16

The default GCC package available in the Fedora 16 repositories is gcc-4.6. I need to install gcc-4.5 on my system. I downloaded the packages from the kijo repository, but when I try to install them ...
5
votes
1answer
842 views

How can I get a static C compiler?

I'm playing around with chroot environments, and I'd like to have a portable C compiler so that I can easily set up some basic build-tools in each environment without having to move too many libraries ...
4
votes
1answer
147 views

How/why can Firefox packages work on all Linuxes?

How/why can a Firefox 64bit (or 32bit) package work on different Linux distributions since each Linux distribution has a different version for gcc, glibc, linux kernel, etc. ?
2
votes
2answers
668 views

is stack-smashing protection on on Debian?

I heard that every binary that comes with Ubuntu is protected with stack-smashing protection and possibly other gcc features to harden programs against common security threats. What about Debian? I ...
8
votes
2answers
2k views

Why does FreeBSD use the GPL-licensed GCC?

Why does FreeBSD use GCC as its default compiler? I am under the impression that a core pillar of the FreeBSD philosophy is not to use any GNU software and in particular, GPL code. Yet GCC which is ...
1
vote
1answer
1k views

Linking issues with libjpeg

I have a game I'm writing which recently required libjpeg. I wrote some code using libjpeg on some-other-machine and it worked as expected. I pulled the code to this machine and tried compiling and ...
0
votes
1answer
8k views

Installing gcc on rhel 6.1

GCC doesnt seem to be installed on my Rhel 6.1 machine. Also, when i did: sudo yum install gcc It barfed: Updating Red Hat repositories. Setting up Install Process No package gcc available. ...
3
votes
2answers
14k views

Debian 6 Squeeze - installing build-essentials - gcc / g++

The first thing to say is: "I am noob", so please be patient and don't laugh.. too much on me. I need to install c / c++ compiler and I heard that the best thing to do is to install gcc/g++ for that ...
2
votes
1answer
466 views

What is the fastest way to install GCC on Wind River 3.02?

I am fairly new to installing things on a bare-bones Linux system and really do not want to just blindly install rpm after rpm of dependencies I think I might need... I know that this version of ...
2
votes
2answers
1k views

How to set the default gcc version for only one user

I share a server (Ubuntu 11.04) with other people and I am the only one who has to use gcc 4-4 for my code, the rest is using 4.5. I already installed gcc 4.4 but how do I make it the default for me, ...
4
votes
2answers
686 views

list header files used by a project compiled with gcc along with hierarchy

I currently have a C++ project that spans two different source control systems. Without checking in the full complete source code from the first system into the second system I plan to check in just ...
2
votes
1answer
741 views

Core files when the symbols are stripped

I am building an application using g++ 4.3. I am using the with maximum possible optimization level, not using the -g option, and I am stripping symbols after it builds. If I do NOT strip symbols ...
5
votes
4answers
813 views

Does optimizing for size reduce runtime memory usage as well as binary size?

Does optimizing for size with gcc -Os only reduce the binary size of a program, or does it reduce its runtime memory usage as well? I know what exactly the results are depend on the specific code, but ...
0
votes
1answer
3k views

how to Update gcc of OpenSuse 11.2?

I have OpenSuse 11.2 with gcc version 4.4.1. I would like to update my gcc version to 4.5.1. I have downloaded gcc-4.5-19.1.i586.rpm. When I rpm install it, it's asking for ...
1
vote
2answers
915 views

Cannot find libgmp when compiling GCC 4.5.2

I'm attempting to compile GCC 4.5.2 as part of the Linux from Scratch book (http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.html). My configure is as follows: ./configure \ ...