Compiling is the process of transforming source code into byte codes for a particular computer architecture.

learn more… | top users | synonyms (2)

162
votes
4answers
56k 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 ...
66
votes
17answers
7k views

Where should I put software I compile myself?

I need to compile some software on my Fedora machine. Where's the best place to put it so not to interfere with the packaged software?
66
votes
12answers
9k views

What is the benefit of compiling your own linux kernel?

What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
46
votes
5answers
2k views

How to compile the C compiler from scratch, then compile Unix/Linux from scratch

Let's say I work for a large services organisation outside the US/UK. We use UNIX and Linux servers extensively. Reading through this article it mentions that it would be easy to insert a backdoor ...
37
votes
4answers
18k views

Why can't gcc find libevent when building tmux from source?

I want to install tmux on a machine where I don't have root access. I already compiled libevent and installed it in $HOME/.bin-libevent and now I want to compile tmux, but configure always ends with ...
26
votes
2answers
19k views

What is the Fedora equivalent of the Debian build-essential package?

What is the Fedora equivalent of the Debian build-essential package?
23
votes
5answers
1k views

Keeping track of programs

When I install a simple program it often uses make && make install and doesn't often even have an uninstall target. If I wish to upgrade a program is it standard protocol to assume it just ...
22
votes
7answers
6k views

Force directory to always be in cache

I've been testing out different methods to improve the time it takes to compile my entire c++ project. Currently it takes ~5 minutes. I experimented with distcc, ccache, and others. Recently, I ...
21
votes
2answers
2k views

Is it possible to compile a full Linux system with Intel's compiler instead of GCC?

Perhaps this is a stupid idea? Maybe there are some compatibility issues? I have the impression that for Intel-based systems, the Intel compiler would potentially do a better job than GCC. Perhaps ...
18
votes
4answers
2k views

What is the difference between building from source and using an install package?

It was wondering: when installing something, there's an easy way of double clicking an install executable file, and on the other hand, there is a way of building it from source. The latter one, ...
18
votes
1answer
2k views

Configuring, compiling and installing a custom Linux kernel

I'd like to try using a kernel other than the one provided by my distro -- either from somewhere else, or as customized by me. Is this difficult or dangerous? Where do I start?
17
votes
5answers
2k views

Is automake and autoconf the standard way to compile code?

I sometimes compile apps from source and I've either been using: ./configure make sudo make install But recently, I came across ./autogen.sh which generates the configure and make scripts for me ...
15
votes
5answers
940 views

How to compile and install programs from source

This is an issue that really limits my enjoyment of Linux. If the application isn't on a repository or if it doesn't have an installer script, then I really struggle where and how to install an ...
15
votes
2answers
1k views

What is Wayland?

I was looking for a lightweight X server, but failed to find one. Then I found out about Wayland. I says that it aims to coexist with X, but can run standalone. When I try to compile it, it needs ...
14
votes
13answers
1k views

Distros that support compiling from source

A long time ago I used to use FreeBSD with its ports system and after that Gentoo for portage in order to install applications via compiling from source. I did this in order to directly target my ...
11
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 ...
11
votes
6answers
1k views

Looking for tools to build minimal linux desktop

Increasingly I am dissatisfied by the fact, that configuring my linux desktop usually means removing bloat instead of adding and tweaking features. I have come to the conclusion that I would rather ...
10
votes
6answers
6k views

Compiling GNU/Linux with -O3 optimization

It's said that compiling GNU tools and Linux kernel with -O3 gcc optimization option will produce weird and funky bugs. Is it true? Has anyone tried it or is it just a hoax?
10
votes
1answer
285 views

How do I apply software patches?

I have an application foobar for which someone has written a patch to add a feature I like. How can I use the patch?
10
votes
2answers
2k views

Why are there no -dev packages in Arch Linux?

I understand that source based distributions like Gentoo or Slackware do not need *-dev versions of programs. They include the source code as well as header files for compiling everything locally. ...
9
votes
2answers
235 views

best way to set up separate linux environment in ~

I do most of my work (involves a lot of C/Python) on a development server that is shared with several other people. As a result we all seem to do a bit of the system administration chores (there is ...
8
votes
3answers
370 views

How does make continue compilation?

I know that I can interrupt a make process anytime without having to recompile the entire source tree again. As I know, make only compiles a target if it's not compiled yet, or the source code is ...
8
votes
2answers
8k views

How to compile a c program without leaving the editor? [duplicate]

I am using vim editor on Linux mint. I want to know if there is any way to compile c program without leaving the editor.
8
votes
1answer
1k views

Why is my initial ramdisk so big?

I'm running Ubuntu 11.10, which came with kernel version 3.0.0-14. I downloaded and built a kernel from the 3.1.0 branch. After installing the new kernel, I see that my /boot/initrd.img-3.1.0 file is ...
8
votes
2answers
8k views

How to include local header files in linux kernel module

Say I have a module mymod with source files as follows: src/mod/mymod.c src/inc/mymod.h I try to include mymod.h as follows #include <mymod.h> My makefile contains EXTRA_CFLAGS= ...
8
votes
1answer
1k views

What is the proper way to set SELinux context in an RPM .spec?

I am trying to build an RPM that targets RHEL4 and 5. Right now I call chcon from %post but multiple Google entries say "that's not how you are supposed to do it" with very limited help on the right ...
8
votes
4answers
808 views

What could be causing make to hang when compiling on multiple cores?

Yesterday I was trying to compile the ROOT package from source. Since I was compiling it on a 6 core monster machine, I decided to go ahead and build using multiple cores using make -j 6. The ...
7
votes
9answers
4k views

Compiling code from vim

New to vim and and I want to be able to compile code from within vim without running a new terminal and calling the compiler. How do I go about doing this? Note that this requirement is not ...
7
votes
2answers
3k views

On Gentoo, how do I rebuild all packages depended on some other package?

I made mistake and changed perl non-threaded version to threaded by unmerge first, change USE flags to include ithreads and emerge perl again. Now most packages depending on perl are broken. How do I ...
6
votes
3answers
3k views

What are .in files?

Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with ...
6
votes
3answers
7k views

Where do executables look for shared objects at runtime

The title is pretty explicit. I understand how to define include shared objects at linking/compile time. However I still wonder how do executables look for the shared object (*.so libraries) at ...
6
votes
2answers
1k views

What are the advantages of building tools/libs from source?

By building from source do you gain any benefits? Is the code better optimized to your hardware architecture? Is it optimized better in general? Why would someone choose to build from source rather ...
6
votes
3answers
353 views

Effect of compiling from source on already installed applications

I use Ubuntu 12.04. Say I have installed package x from the repository (with all its dependencies) at version 1.7 but I need some functionality that is only available in version 1.8, so I download the ...
6
votes
1answer
321 views

Why would one want to compile multiple .cpp files to the same executable?

Why would you do g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something instead of: g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o g++ -Wall ...
6
votes
2answers
10k views

How to create an initrd image on OpenSuSE linux?

/usr/src/linux-3.2.1 # make install scripts/kconfig/conf --silentoldconfig Kconfig sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \ System.map ...
6
votes
2answers
4k views

Some M4 macros don't seem to be defined

I am trying reinstall pacman on my Arch Linux distribution. When I run the configure script "configure.ac", I get a bunch of undefined macros: error: possibly undefined macro: AM_INIT_AUTOMAKE. If ...
6
votes
2answers
832 views

Do I need to cross-compile my program when my target is 64 bit arch. and host is 32 bit arch from x86 family?

I have scenario in which my host is : x86 32 bit processor my target is : x86 64 bit processor I have a couple of questions : I want to know if i can simply compile a program in my host using ...
6
votes
2answers
835 views

How to develop a small linux distro?

Since Linux uses open-source packages, I was wondering if I could develop my own Linux distro by compiling these packages. I tried to read the Linux From Scratch book but it's quite big and uses lots ...
6
votes
2answers
724 views

How can I create a .deb package with my compiled OpenCV build?

OpenCV 2.4.2 took 6 hours to compile on the Raspberry Pi and I'd love to package everything up as a deb but I have never done that before. How can I package the compiled files so that they download or ...
6
votes
1answer
2k views

WARNING: modpost: Found 10 section mismatch(es)

Is this error message something that I should be worried about? linux-y3pi:/usr/src/linux-2.6.38.8 # make modules scripts/kconfig/conf --silentoldconfig Kconfig CHK include/linux/version.h ...
6
votes
1answer
624 views

Grubby fatal error in Linux kernel installation

I have compiled Linux kernel 2.6.24.6 from source (without problem) and tried to install it. Specifically, after unpacking the Linux source code, I did make && make modules to compile. ...
6
votes
3answers
393 views

How can I build and install PL/R as a non-privileged user?

There is a postgres instance, and I have the ability to build my own instance. Using these instructions I ran: USE_PGXS=1 make which worked but then USE_PGXS=1 make install did not, with this ...
5
votes
3answers
868 views

How to speed up my build

I am doing a build on a Linux machine with ubuntu 10.04 on it. I want to know how can I really speed up my build. I have 4 CPUs and lots of RAM. I already reniced the process group to -20. Is there ...
5
votes
3answers
1k views

Mystery of binary files

This is about files straight from the compiler, say g++, and the -o (outfile) flag. If they are binary, shouldn't they just be a bunch of 0's and 1's? When you cat them, you get unintelligible ...
5
votes
3answers
3k views

Why does my vim-7.3 compile fail to include clientserver?

I am trying to compile vim-7.3 will all features enabled. I ran configure with $ ./configure --with-features=huge --enable-gui --enable-cscope $ make ; make install When I check the version, it ...
5
votes
4answers
106 views

Get list of required libraries when installing something from source

When installing something from source (say, Ruby 1.9.2), what command can I run to get a complete list of all the dependencies needed to install that application? Is this possible?
5
votes
4answers
1k 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 ...
5
votes
2answers
166 views

Emacs on OpenBSD for DEC VAX?

I have managed to install OpenBSD 5.2 on my DEC VaxStation 4000 Model 90 but to my surprise have not found a binary for Emacs (any version) for the VAX architecture. As best as I can tell I do not see ...
5
votes
2answers
125 views

Packages to rebuild after upgrading gcc on gentoo systems

Which packages should be rebuilt after upgrading gcc on a gentoo system? Is it sufficient to run # emerge -a --oneshot `equery depends gcc |awk '{print " ="$1}'` as suggested similar for perl in ...
5
votes
1answer
4k views

How do I convert a kernel .config file from 32-bit to 64-bit?

At this page you can download a configuration file that lets you target a particular notebook architecture during the compilation of a new 32-bit Linux kernel. I need a 64 bit version. What do I ...