Questions tagged [compiling]

Questions related to compiling software from sources, usually using the "make" command.

In Ubuntu, most software is installed through APT from repositories, which involves copying precompiled binaries into the right system directories. This is generally the preferable method.

However, sometimes it's necessary to compile software from the source code yourself (usually downloaded as a .tar archive). This usually requires running a script in the source directory or using cmake to configure the build environment, and installing extra packages (such as compilers and development libraries) as build dependencies, and then running the make command. Once the binaries have been built, they can be copied to the right locations, usually with sudo make install. Compiling a kernel requires a .config file, and the kernel image and modules to be built and installed.

This tag should be used for questions about compiling software from sources in or to use in Ubuntu, generally as an end user. If you are writing programs in a compiled language and you need help compiling them, you may be better off asking about it on Stack Overflow.

Helpful links:
How do I install a .tar file?
Manual for GNU make

2568 questions
216
votes
10 answers

If I build a package from source how can I uninstall or remove completely?

I used source code to build one package such as below: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc…
user25165
196
votes
16 answers

How do I install the latest version of node.js?

How do I install the latest node.js on Ubuntu? I've been looking around, and I can't find anything. Is there a Ubuntu package for node.js, or do I have to compile it myself?
jrg
  • 61,707
125
votes
6 answers

How to compile a .java file on Ubuntu?

How can I compile a .java file? What programs will I need? If I need the Java JDK I will also need help installing that. I'm very new to Ubuntu, so any program that I need to install I will need a tutorial on how to install them.
user65407
  • 1,385
  • 4
  • 11
  • 8
83
votes
3 answers

How to cross compile for ARM?

How do I set up GCC for cross compiling for the ARM processor? The host would be on x86_64 ( AMD64 - Ubuntu 12.04 ) and the target would be ARM (Raspberry Pi as well as Pandaboard - will do separate compilations for each)?
haziz
  • 3,067
74
votes
5 answers

How to compile a python file?

I have started learning python and I'm also a new user to Ubuntu. I need to know the ways of compiling the .py files. I have tried with the command python "hello.py" What are the other ways of compiling python?
73
votes
4 answers

Compile OpenGL Program (Missing GL/gl.h)

I am a complete Linux/Ubuntu noob, so I apologize for any dumb portions of this question or follow up ones. I am trying to get a program that my software engineering class's group wrote onto my home computer. At school, we have Linux, and it will…
Seldom
  • 833
  • 1
  • 7
  • 5
71
votes
4 answers

Installing packages into local directory?

I'd like to install software packages, similar to apt-get install but: Without sudo, and Into a local directory The purpose of this exercise is to isolate independent builds in my continuous integration server. I don't mind compiling from…
Gili
  • 1,345
67
votes
1 answer

How to add libraries path to the ./configure command?

I would like ./configure to link to a library and some include files. My library is stored in /home/foo/sw/lib/ and my files are stored in /home/foo/sw/include. ./configure --help throws out the following: Some influential environment variables: …
61
votes
1 answer

No acceptable C compiler found in $PATH

I want to install one package named speech_tools-2.1-release.tar.gz. After I run command ./configure in this package, it show me a message: Configure: error: no acceptable C compiler found in $PATH See 'config.log' for more details What do I…
61
votes
3 answers

cmake fails with "CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found."

jonquil@jonquil-Satellite-L755D:~/Downloads/akonadi-googledata-1.2.0/build$ cmake .. -- The C compiler identification is GNU -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler:…
xjonquilx
  • 1,497
  • 3
  • 12
  • 19
60
votes
3 answers

How do I install glib?

I want to build the Empathy in Ubuntu 11.04. When I follow the build process, ./autogen.sh The shell said to me that libtoolize: copying file `m4/lt~obsolete.m4' checking for autoconf >= 2.53... testing autoconf2.50... not found. testing…
user8260
57
votes
3 answers

How do I set up ccache?

I want to use ccache to speed up compilation. I came across How do I enable ccache?. This is what I have done so far: $ sudo apt-get install -y ccache $ dpkg -l ccache ii ccache 3.1.6-1 Compiler cache for fast recompilation of C/C++ code $…
55
votes
3 answers

"fatal error: openssl/opensslv.h: No such file or directory" compiling mitmproxy

I'm trying to install the mitmproxy package via pip like this: $ sudo pip install mitmproxy It terminates with following error message: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing…
Niklas
  • 711
54
votes
5 answers

What's a simple way to recompile the kernel?

I'm interested in compiling a new kernel under Ubuntu 12.04 x86 64 bit. I found this wiki page which is basically a mirror for this blog and there are a lot of steps (git, etc.) that appear useless to me. With earlier releases/distros, I used to…
user827992
  • 2,901
51
votes
4 answers

What are the packages/libraries I should install before compiling Python from source?

Once in a while I need to install a new Ubuntu (I used it both for desktop and servers) and I always forget a couple of libraries I should have installed before compiling, meaning I have to recompile, and it's getting annoying. So now I want to make…
1
2 3
99 100