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

learn more… | top users | synonyms (2)

199
votes
4answers
66k 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 ...
78
votes
17answers
10k 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?
70
votes
12answers
11k 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?
49
votes
4answers
3k 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 ...
46
votes
6answers
22k 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 ...
38
votes
2answers
29k views

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

What is the Fedora equivalent of the Debian build-essential package?
34
votes
1answer
1k views

./configure: What is an insane build environment?

./configure always checks whether the build environment is sane... I can't help but wonder what exactly a insane build environment is. What errors can this check raise?
27
votes
7answers
7k 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 ...
26
votes
5answers
2k 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 ...
23
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 ...
21
votes
1answer
3k 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?
19
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 ...
18
votes
4answers
3k 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
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 ...
17
votes
5answers
1k 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 ...
16
votes
3answers
15k 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 ...
15
votes
13answers
2k 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 ...
15
votes
2answers
3k 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. ...
11
votes
9answers
6k 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 ...
11
votes
6answers
7k 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?
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
3answers
7k 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 ...
11
votes
2answers
12k 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= ...
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 ...
11
votes
4answers
1k 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 ...
10
votes
2answers
13k 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.
10
votes
1answer
349 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?
9
votes
3answers
587 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 ...
9
votes
2answers
27k views

configure: error: C compiler cannot create executables

I am trying to upgrade apache 2.2.15 to 2.2.27. While running config.nice taken from apache2.2.15/build I am getting following error: checking whether the C compiler works... no configure: error: in ...
9
votes
1answer
2k 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 ...
9
votes
2answers
279 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
2answers
2k 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 ...
8
votes
1answer
2k 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
4k 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 ...
7
votes
3answers
5k 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 ...
7
votes
2answers
18k views

What is the correct syntax to add CFLAGS and LDFLAGS to “configure”?

I am a Unix/OpenBSD beginner and wish to install OpenVPN on OpenBSD 5.5 using OpenVPN source tarball. According to the instructions here, I have to install lzo and add ...
7
votes
1answer
60 views

Unable to run an executable built with NASM

I am attempting to assemble the assembly source file below using the following NASM command: nasm -f elf -o test.o test.asm This completes without errors and I then try to link an executable with ...
7
votes
1answer
734 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
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 ...
6
votes
3answers
520 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
344 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
3answers
8k views

What exactly are Linux kernel headers? [duplicate]

Possible Duplicate: What does a kernel source tree contain? Is this related to Linux kernel headers? I know that if I want to compile my own Linux kernel I need the Linux kernel headers, ...
6
votes
3answers
5k views

Error compiling drivers for Ralink RT2870

Im trying to install drivers for a rosewill RNX-N600UBE wireless card (Ralink RT2870 chipset) on Kali Linux. I downloaded the drivers form their website and unpacked/unzipped them, but now when i try ...
6
votes
2answers
934 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 ...
6
votes
2answers
13k 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
932 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
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 ...
6
votes
1answer
11k views

Unable to load module: Disagrees about version of symbol module_layout

Following this tutorial to write my first driver. The Makefile is: # Makefile – makefile of our first driver # if KERNELRELEASE is defined, we've been invoked from the # kernel build system and can ...
6
votes
3answers
1k 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
5answers
21k views

How to solve “building the main Guest Additions module Failed”

I tried to install the VirtualBox Guest Additions module in a VM guest running CentOS but I get this error message when everything else was okay: building the main Guest Additions module Failed ...