date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,349,361,022,000 |
Say I have a C program main.c that statically links to libmine.a. Statically linking to a library causes library functions to be embedded into the main executable at compile time.
If libmine.a were to feature functions that weren't used by main.c, would the compiler (e.g. GCC) discard these functions?
This question is... |
By default, linkers handle object files as a whole. In your example, the executable will end up containing the code from main.c (main.o), and any object files from libmine.a (which is an archive of object files) required to provide all the functions used by main.c (transitively).
So the linker won’t necessarily includ... | Do C compilers discard unused functions when statically linking to .a file? |
1,349,361,022,000 |
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 rewrites seamlessly over the old program?
How do I keep track of these programs; do most people just 'fire and forget' and if no ... |
Install each program in a dedicated directory tree, and use Stow or XStow to make all the programs appear in a common hierarchy. Stow creates symbolic links from the program-specific directory to a common tree.
In more detail, pick a toplevel directory, for example /usr/local/stow. Install each program under /usr/loca... | Keeping track of programs |
1,349,361,022,000 |
When I compile my own kernel, basically what I do is the following:
I download the sources from www.kernel.org and uncompress it.
I copy my previous .config to the sources and do a make menuconfig to watch for the new options and modify the configuration according to the new policy of the kernel.
Then, I compile it: ... |
This is because all the kernel modules are not stripped. You need to strip it to down its size.
Use this command:
SHW@SHW:/tmp# cd /lib/modules/<new_kernel>
SHW@SHW:/tmp# find . -name *.ko -exec strip --strip-unneeded {} +
This will drastically reduce the size.
After executing above command, you can proceed to create... | How to reduce the size of the initrd when compiling your kernel? |
1,349,361,022,000 |
I know that Linux is available and has been ported for many different platforms such as for X86, ARM, PowerPC etc.
However, in terms of porting, what is required exactly?
My understanding is that Linux is software written in C. Therefore when porting Linux originally from X86 to ARM or others for example, is it not j... |
Even though most of the code in the Linux kernel is written in C, there are still many parts of that code that are very specific to the platform where it's running and need to account for that.
One particular example of this is virtual memory, which works in similar fashion on most architectures (hierarchy of page tab... | Porting Linux to another platform requirements [closed] |
1,349,361,022,000 |
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 Mesa, which needs X.
What exactly is Wayland?
|
Wayland is an experimental new display server. It is not an X server, and to run X applications you will need to run an X server with it (see the bottom diagram on Wayland Architecture). Since there are very few Wayland applications so far, this means you really can't use it to replace X yet.
Update: As noted in ... | What is Wayland? |
1,349,361,022,000 |
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 there's already a distro that has attempted this?
I would think this might be quite straightforward using Gentoo.
|
You won't be able to compile everything with icc. Many programs out there use GCC extensions to the C language. However Intel have made a lot of effort to support most of these extensions; for example, recent versions of icc can compile the Linux kernel.
Gentoo is indeed your best bet if you like recompiling your soft... | Is it possible to compile a full Linux system with Intel's compiler instead of GCC? |
1,349,361,022,000 |
I have already followed this guide to disable middle mouse button paste on my Ubuntu 12.04.
Works like a charm.
Now I am trying to achieve the same on my Linux Mint 17. When I try to
sudo apt-get build-dep libgtk2.0-0
it gives me the following output:
Reading package lists... Done
Building dependency tree
R... |
As others have already noted, make sure that for every deb … entry in /etc/apt/sources.list and /etc/apt/sources.list.d/*, you have a matching deb-src … entry. The rest of the line must be identical.
The deb entry is for binary packages (i.e. ready to install), the deb-src is for source packages (i.e. ready to compil... | apt-get build-dep is unable to find a source package |
1,349,361,022,000 |
After some googling, I found a way to compile BASH scripts to binary executables (using shc).
I know that shell is an interpreted language, but what does this compiler do? Will it improve the performance of my script in any way?
|
To answer the question in your title, compiled shell scripts could be better for performance — if the result of the compilation represented the result of the interpretation, without having to re-interpret the commands in the script over and over. See for instance ksh93's shcomp or zsh's zcompile.
However, shc doesn’t ... | Are compiled shell scripts better for performance? |
1,349,361,022,000 |
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 and executes them.
What other methods to streamline C/C++/C#(mono) compilation exist? Make seems a bit old. Are there new t... |
Autoconf and Automake were set out to solve an evolutionary problem of Unix.
As Unix evolved into different directions, developers that wanted portable code tended to write code like this:
#if RUNNING_ON_BSD
Set things up in the BSD way
#if RUNNING_ON_SYSTEMV
Set things up in the SystemV way
#endif
As Unix was forked... | Is automake and autoconf the standard way to compile code? |
1,349,361,022,000 |
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?
|
It's used in Gentoo, and I didn't notice anything unusual.
| Compiling GNU/Linux with -O3 optimization |
1,349,361,022,000 |
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 compiling went smooth and really fast at first, but at some point make hung using 100% CPU on just one core.
I did some googlin... |
I don't have an answer to this precise issue, but I can try to give you a hint of what may be happening: Missing dependencies in Makefiles.
Example:
target: a.bytecode b.bytecode
link a.bytecode b.bytecode -o target
a.bytecode: a.source
compile a.source -o a.bytecode
b.bytecode: b.source
compile b.source... | What could be causing make to hang when compiling on multiple cores? |
1,349,361,022,000 |
Examining a buildlog from a failed build, what does the following error mean,
fatal error: ac_nonexistent.h: No such file or directory #include <ac_nonexistent.h>
Here is some context.
configure:6614: $? = 0
configure:6627: result: none needed
configure:6648: checking how to run the C preprocessor
configure:6679: gcc... |
That’s a sanity check, to ensure that the configuration script is correctly able to determine whether a header file is present or not: it asks the compiler to use a non-existant header, and checks that the compiler (correctly) fails.
Note that your build goes on after that “error”... To figure out the cause of a build... | What is ac_nonexistent.h? |
1,349,361,022,000 |
I want to get detail about binary package and run them on linux. I am running Debian base (Ubuntu/Linux mint) Linux os.
How to build binary package from source? And can I directly download
binary package for applications (like firefox, etc.) and games (like
boswars, etc.) ?
I run some direct package which is in "xyz.... |
In a strict sense a binary file is one which is not character encoded as human readable text. More colloquially, a "binary" refers to a file that is compiled, executable code, although the file itself may not be executable (referring not so much to permissions as to the capacity to be run alone; some binary code file... | What is Binary package? How to build them? |
1,349,361,022,000 |
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.
|
There are several possibilities.
One method is to compile using
:!gcc file.c
But a nicer strategy would be to have a Makefile and compile just using
:make
Where the easiest Makefile would look like.
program:
gcc file.c
Others can explain this a lot better.
| How to compile a c program without leaving the editor? [duplicate] |
1,349,361,022,000 |
I'm building a custom kernel based off 4.11 (for Mintx64, if it matters). I've already compiled and installed it to prove that it works. Now I've made a few small changes to a couple of files (in the driver and net subsystems, this is why I need to compile a custom kernel in the first place!)
Now I want to build the m... |
The make clean is only for the deb-pkg target. Take a look at scripts/package/Makefile:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you buil... | Re-building Linux kernel without "clean" |
1,349,361,022,000 |
I have seen the following install command used in multiple yocto recipes
install -d ${D}${libdir}
I am aware of the install command and its purpose, however I am unable to understand the purpose of the ${D} variable as it is often nowhere defined in the recipe. Can somebody explain the purpose of this shell variable?... |
The ${D} variable allows the software being built to be installed in a directory other than its real target. For example, you might configure the software so that libdir is /usr/lib, but that's for the target device; when you run the installation on your build system, you don't want the newly-built files to actually b... | ${D} variable in install command |
1,349,361,022,000 |
Just now I have began reading the book: Advanced Programming in the UNIX® Environment. I wanted to try running its first code example. I am running Scientific Linux 6.4.
I downloaded the source code and as it says in its README, I ran make in the uncompressed file.
I wrote the first program (a mock ls command)
#inclu... |
A short review of how to write and compile the programs in Advanced Programming in the UNIX® Environment, thanks to slm for helping me understand the steps. You can download the source code from here.
I wish this information was included as part of appendix b of the book,
where the header file is explained.
The uncomp... | Compiling code from apue |
1,349,361,022,000 |
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 source tar and compile it:
./configure
make
make install
Does this overwrite the existing 1.7 binaries?
If the... |
The overwhelming majority of .deb packages, whether or not they are provided by official repositories, install with the prefix /usr.
What that means is that executables intended to be run by the user go in /usr/bin or /usr/sbin (or /usr/games if it's a game), shared libraries go in /usr/lib, platform-independent share... | Effect of compiling from source on already installed applications |
1,349,361,022,000 |
I have an application foobar for which someone has written a patch to add a feature I like. How can I use the patch?
|
Patches are usually contained in .diff files, because the patches are created using the diff command.
A patch is a series of insertions and deletions into source code. For this reason, in order to use the patch, you must build the application (e.g., "foobar") from source after applying the patch. So, in steps:
1. Ge... | How do I apply software patches? |
1,349,361,022,000 |
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 way. I've also noticed that fixfiles -R mypackage check says the files are wrong when they are right (as expected; the R... |
The Fedora Packaging Guidelines have a draft document explaining how to handle SELinux in packages, and they use semanage. Without semanage, it looks like supporting RHEL 4 is going to be a hack, and there's no way around that.
According to the rpm 4.9.0 release notes, there has been some support directly in rpm for ... | What is the proper way to set SELinux context in an RPM .spec? |
1,349,361,022,000 |
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 HUGE. It's 114MB, while my /boot/initrd.img-3.0.0-14-generic is about 13MB. I want to get rid of the bloat, which is cl... |
When building the kernel and module using make oldconfig, make and make install, the resulting modules will have debug information available in the files.
Use the INSTALL_MOD_STRIP option for removing debugging symbols:
make INSTALL_MOD_STRIP=1 modules_install
Similarly, for building the deb packages:
make INSTALL_MO... | Why is my initial ramdisk so big? |
1,415,789,761,000 |
I want to build a debian package with git build package.(gbp)
I passed all steps, and at least, when I entered gbp buildpackage, This error appeared.
what does it mean?
and what should I do?
gbp:error: upstream/1.5.13 is not a valid treeish
|
The current tag/branch you are in, is not a Debian source tree, it doesn't contain the debian/ directory in its root. This is evident because you are using a "upstream/" branch, a name utilized to upload the pristine source tree to git repositories. Try using the branch stable, testing or unstable, or any branch that ... | what does " gbp:error: upstream/1.5.13 is not a valid treeish" mean? |
1,415,789,761,000 |
I put up a bug report and have been asked to apply the patch therein and see if it works. I have tried to find documentation about how to go about doing it but is unclear.
The closest I have been able to figure out is http://www.thegeekstuff.com/2014/12/patch-command-examples/ .
I downloaded the latest source via ap... |
Starting with the situation you have:
cd dpkg-1.18.15
patch -p1 < ../d-m-h-verbose-version-check.patch
will apply the patch. Before building, add a NMU changelog entry (this will avoid having your patched version of dpkg overwritten by apt & co., but will ensure your version is upgraded to the next dpkg release when ... | how to apply a patch in a debian package? |
1,415,789,761,000 |
Is there any way to have make use multi-threading (6 threads is ideal on my system) system-wide, instead of by just adding -j6 to the command line? So, that if I run make, it acts the same as if I was running make -j6? I want this functionality because I install a lot of packages from the AUR using pacaur (I'm on Arc... |
(pacaur uses makepkg, see https://wiki.archlinux.org/index.php/Makepkg )
In /etc/makepkg.conf add
MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
to run #cores + 1 compiling jobs concurrently.
When using bash you can also add
export MAKEFLAGS="-j$(expr $(nproc) \+ 1)"
to your ~/.bashrc to make this default for all make commands,... | Use multi-threaded make by default? |
1,415,789,761,000 |
After configuring and building the kernel using make, why don't I have vmlinuz-<version>-default.img and initrd-<version>.img, but only got a huge vmlinux binary (~150MB)?
|
The compressed images are under arch/xxx/boot/, where xxx is the arch. For example, for x86 and amd64, I've got a compressed image at /usr/src/linux/arch/x86/boot/bzImage, along with /usr/src/linux/vmlinux.
If you still don't have the image, check if bzip2 is installed and working (but I guess if that were the problem... | vmlinuz and initrd not found after building the kernel? |
1,415,789,761,000 |
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 this FAQ?
|
TL;DR
I have a different take on this as a Gentoo user. While I agree with peterph's approach of "Let the System Decide," I disagree when it comes to an ABI Update. An ABI Update is sometimes a major shift in behavior. In the case of GCC 4.7, the ABI Change was the adoption of the new C++11 Standard, which peterph a... | Packages to rebuild after upgrading gcc on gentoo systems |
1,415,789,761,000 |
I'm building a custom Android kernel based on the Cyanogenmod ROM's kernel source code. I'd like to add folders and files into the root folder of the OS (/). For instance, after having compiled my kernel, I'd like for an extra folder named toto (absolute path = /toto) to be created.
I really have no idea which files h... |
On Android, like on many Linux-based systems, the kernel first mounts an initramfs on /. The initramfs is stored in RAM; it is loaded from a CPIO archive which is stored together with the kernel itself (or in some other place where the bootloader can find it).
Most desktop Linux systems have a small initramfs which co... | How to compile extra files into the root directory of an Android ROM |
1,415,789,761,000 |
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 modified after the last compilation.
But if I interrupt make, there will surely be one or more (depending on the concurrenc... |
In simple terms, you can think of make as having a (possibly large) number of steps, where each step takes a number of files as input and creates one file as output.
A step might be "compile file.c to file.o" or "use ld to link main.o and file.o into program". If you interrupt make with CtrlC, then the currently execu... | How does make continue compilation? |
1,415,789,761,000 |
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
Since I'm very new to CentOS and VirtualBox, I have no idea about to solve this and wasnt able to find any solution searc... |
You lack the make command. Make is a utility that is often used to build programs from source; it runs the compiler on every source file in the right order. You need to install the make package, and possibly others: the C compiler, and the kernel headers (files generated during the compilation of the Linux kernel, tha... | How to solve "building the main Guest Additions module Failed" |
1,415,789,761,000 |
I recently bought a Raspberry Pi. I already have configured it, and I install a cross compiler for arm on my desktop (amd64). I compiled a simple "hello world" program and then I copy it from my desktop to my Pi with scp ./hello [email protected]:~/hello.
After login in my Pi I run ls -l hello and I get a normal respo... |
If ldd says it is not a dynamic executable, then it was compiled for the wrong target.
Obviously you did cross-compile it, as file says is a 32-bit ARM executable. However, there's more than one "ARM" architecture, so possibly your toolchain was configured incorrectly.
If you are using crosstool-NG, have a look at th... | “No such file or directory” when executing a cross-compiled program on a Raspberry Pi |
1,415,789,761,000 |
I wrote a bash script, and I executed it without compiling it first. It worked perfectly. It can work with or without permissions, but when it comes to C programs, we need to compile the source code. Why?
|
It means that shell scripts aren't compiled, they're interpreted: the shell interprets scripts one command at a time, and figures out every time how to execute each command. That makes sense for shell scripts since they spend most of their time running other programs anyway.
C programs on the other hand are usually co... | Why does C programming need a compiler and shell scripts don't? |
1,415,789,761,000 |
I'd like to try some shell codes and I want to disable linux protections.
I know I could compile using flags but I know another way exists to disable these protections in general I just can't remember. Can you help me?
|
Stack protection is done by the compiler (add some extra data to the stack and stash some away on call, check sanity on return). Can't disable that without recompiling. It's part of the point, really...
| Disable stack protection on Ubuntu for buffer overflow without C compiler flags |
1,415,789,761,000 |
I was trying to compile libnetfilter_conntrack source from github as it was requested by iptables while compiling iptables and as any of these were not available in the HURD software repo and ended up in an error while configuring libnetfilter_conntrack
checking whether stripping libraries is possible... yes
checking ... |
In general, it’s not very different; there are lists of known pitfalls on the Hurd’s site and on the Debian wiki. Many projects build fine, or after a few fixes (the most common issue being the absence of PATH_MAX).
However in your case you’ll find it difficult to get anywhere: netfilter and iptables are specific to t... | How different is compiling source code in Debian GNU/Hurd from Debian GNU/Linux? |
1,415,789,761,000 |
When compiling Icecast 2, I get this error when I run autogen.sh:
$ autogen.sh
... stuff ommitted
configure: error: XSLT configuration could not be found
What is the reason for it, and how do I fix it?
|
You're missing some XML libraries. Try installing libxml2-dev. On Ubuntu or Debian, use
sudo apt-get install libxslt-dev
On Fedora or such it would be
yum install libxslt-devel
| How do I resolve the following error during "configure: error: XSLT configuration could not be found" |
1,415,789,761,000 |
There are some tools in side the kernel,
<kernel source root directory>/tools
perf is one of them.
In ubuntu I think the tools inside this folder is available as package linux-tools
How can I compile it form source and install it and run it?
|
what's wrong with the following?
make -C <kernel source root directory>/tools/perf
| How can I compile, install and run the tools inside kernel/tools? |
1,415,789,761,000 |
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 include the necessary other libraries?
|
If by OpenCV you mean the computer vision libraries at http://opencv.willowgarage.com/ then they are already packaged for debian by the Debian Science Team.
Your best bet is to download the debianised source package from your nearest debian mirror, modify the debian/rules and/or Makefile or configure etc as needed to ... | How can I create a .deb package with my compiled OpenCV build? |
1,415,789,761,000 |
I am trying to install R in our cluster (the cluster is Red Hat Enterprise Linux 6), where I don't have root access. I tried:
$wget http://cran.rstudio.com/src/base/R-3/R-3.1.1.tar.gz
$ tar xvf R-3.1.1.tar.gz
$ cd R-3.1.1
$ ./configure --prefix=/home/Kryo/R-3.1.1
But I am getting an error:
configure: error: --with-x=... |
According to this thread, you should just install libXt-devel package and you should be fine.
But perhaps you also should install xorg-x11-server-devel and libX11-devel?
That would be:
yum install xorg-x11-server-devel libX11-devel libXt-devel
| "--with-x=yes (default) and X11 headers/libs are not available" |
1,415,789,761,000 |
One can find several threads on the Internet such as this:
http://www.gossamer-threads.com/lists/linux/kernel/972619
where people complain they cannot build Linux with -O0, and are told that this is not supported; Linux relies on GCC optimizations to auto-inline functions, remove dead code, and otherwise do things th... |
You've combined together several different (but related) questions. A few of them aren't really on-topic here (e.g., coding standards), so I'm going to ignore those.
I'm going to start with if the kernel is "technically incorrect C code". I'm starting here because the answer explains the special position a kernel occu... | Linux cannot compile without GCC optimizations; implications? [closed] |
1,415,789,761,000 |
Running example C code is a painful exercise unless it comes with a makefile.
I often find myself with a C file containing code that supposedly does something very cool, but for which a first basic attempt at compilation (gcc main.c) fails with—
main.c:(.text+0x1f): undefined reference to `XListInputDevices'
clang-3.7... |
The question is how to determine what linker flag to use from inspection of the source file. The example below will work for Debian. The header files are the relevant items to note here.
So, suppose one has a C source file containing the header
#include <X11/extensions/XInput.h>.
We can do a search for XInput.h using... | How can I find out what linker flags are needed to use a given C library function? |
1,415,789,761,000 |
When cross compiling the Linux kernel 3.18.10, the compiler adds a .part.<N> suffix at the end of some symbols (see an example below). The number <N> changes when using different defconfigs. Does anybody know under which conditions the compiler adds the part suffix at the end of a symbol?
$ arm-none-linux-gnueabi-read... |
The symbol ending in .part is a real function symbol, not some kind of function decoration. More precisely, a function ending in .part is a function generated by GCC from a bigger function.
Sometimes, GCC evaluates that a some part of the control flow of a big function could esily be inlined, but that it would not be ... | Function symbol gets '.part' suffix after compilation |
1,415,789,761,000 |
When compiling, errors are often accompanied by a lengthy series of notes (cyan). Is there a g++ flag to disable this, only showing the error itself?
|
The compiler will not do this for you, but (so far...) the compiler developers are following a longstanding (30+ year) convention adapted from other compilers which gives the essential information on the first line, using error: or warning: to mark the warning. If you grep stderr for those, you will see the minimal w... | How do I disable g++ displaying notes for errors? |
1,415,789,761,000 |
I'm using Nix to install packages under my home (so no binary packages) on a shared host with limited resources. I'm trying to install git-annex. When building one of its dependencies, haskell-lens, the unit tests consume so much memory that they get killed and the installation fails.
Is there a way to skip the unit t... |
I see you trying to use disableTest found in haskell-package.nix to remove testing from the lens packages. I would have to do some testing to tell you exactly why it is not meeting your needs.
I have disabled testing in general overriding the cabal package in config.nix to cabalNoTest. This overrides the cabal packa... | Nix: Skipping unit tests when installing a Haskell package |
1,415,789,761,000 |
On system start up I currently see Linux 4.0.0-rc6yy and 4.0.0-rc6yy.old from the bootloader menu. I'm not certain where they came from. I suspect "yy" is arbitrary but can someone explain the ".old" suffix?
Also can someone explain what CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO is from .config? I've looked the... |
When you are installing your kernel the responsible script is copying kernel image and initramfs into your /boot directory.
If a previous kernel image with the same name already exist, it is renamed by appending .old to its name.
CONFIG_LOCALVERSION:
Append an extra string to the end of your kernel version.
T... | Linux kernel version suffix + CONFIG_LOCALVERSION |
1,415,789,761,000 |
I wand to build multiple .deb packages from same source for different versions and distros.
Even if the source code is exactly same, some files in debian folder can not be shared because different dependency and distro name.
So, I want to make multiple 'debian' directories for each version/distro and specify where to ... |
Using different branches is one approach, and I can suggest edits for @mestia’s answer if it seems appropriate (but read on...).
Another approach is to keep different files side-by-side; see Solaar for an example of this.
But both of these approaches have a significant shortcoming: they’re unsuitable for packages in D... | Build the same source package for different Debian based distros |
1,415,789,761,000 |
I know there are similar questions out there, but I haven't found a solution nor this exact case. The binary was built on Arch Linux using its GCC 4.7. The package works fine on the build system. The commands below were executed on:
Linux vbox-ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64... |
If I run ldd -v as on my system, I get:
./as: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./as)
linux-vdso.so.1 => (0x00007fff89ab1000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1e4c81f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e4c4... | executing binary file: file not found |
1,415,789,761,000 |
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 have to do? I compiled a kernel 2-3 times in my life but I never touched a config file, I always have used an interactive me... |
The recommended answer, as the comment suggests, is to save it as .config in the top-level source directory, and then run make xconfig (GUI, easier) or make menuconfig (TUI) on a 64-bit system.
That said, to simply switch from 32-bit to 64-bit without changing anything else, a little editing at the beginning is all th... | How do I convert a kernel .config file from 32-bit to 64-bit? |
1,415,789,761,000 |
I know that apt-get source <package_name> gives you the source package. It contains a debian folder with a file called rules. If I understand it correctly, this file describes how the source package can be transformed into a .deb package, including which compiler flags should be used.
Two questions:
How do I get the ... |
The compiler flags used are a function of
the debian/rules file,
the package's build files (since the upstream author may specify flags there too),
the build system used (dh, cdbs etc.),
the default compiler settings.
To see the flags used you effectively need to at least compile the package:
debian/rules build
Try... | How to get the compiler flags that are used to build the binaries in a (.deb) package? |
1,415,789,761,000 |
I have a corporate Linux server which does not have internet connection, and sudo access needs to be approved through many levels of hierachy. I've tried install git but I soon realized this needs a whole bunch of dependencies like C compiler to install, of which I do not have the dependencies.
What I need is a method... |
I found a solution that works. To iterate my steps:
1) Download relevant RPM (or here)
2) Copy to Linux server and upack using (replace filename as
necessary)
rpm2cpio git-1.7.9.6-1.el6.rfx.x86_64.rpm | cpio -idmv
3) Update $PATH:
PATH=$PATH:<your path to git>/usr/bin
4) Now see it work
git --version
| Install Git offline without sudo |
1,415,789,761,000 |
I've seen that make is useful for large projects, especially with confusing dependencies described in a Makefile, and also helping with workflow.
I haven't heard any advantages for using make for small projects.
Are there any?
|
As opposed to what?
Suppose you have a program that you have split into two files,
which you have imaginatively named file1.c and file2.c.
You can compile the program by running
cc file1.c file2.c -o yourprogram
But this requires recompiling both files every time,
even if only one has changed.
You can decompose the... | What are the advantages of using `make` for small projects? [closed] |
1,415,789,761,000 |
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 than using a package management system like APT/yum? If there is some kind of optimization gain when does that outweigh ... |
Building from source provides the following options which are not available when using a version from a binary package manager.
Compiling from source allows you to:
use processor-specific optimizations
use the very latest version
learn how compilation & linking work (suggestion from @mattdm)
fix bugs, development wor... | What are the advantages of building tools/libs from source? [duplicate] |
1,415,789,761,000 |
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 shows several features are still not installed.
Huge version without GUI. Features
included (+) or not (-):
+arabic +... |
According to this building Vim page, you'll need these dependencies on Ubuntu
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev
Run configure again.
./configure --with-features=huge --enable-gui=gnome2... | Why does my vim-7.3 compile fail to include clientserver? |
1,415,789,761,000 |
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 rebuild them?
|
On way is to use equery's depends function to get the list of things that depend on a package.
# equery depends perl
If you want to rebuild all of them, try something like:
# emerge -a --oneshot `equery depends perl|awk '{print " ="$1}'`
You'll have issues with that if you have packages installed that were removed f... | On Gentoo, how do I rebuild all packages depended on some other package? |
1,415,789,761,000 |
I'm debugging a closed-source software installer that seems to have some pre-conceived notions about my distribution. The installation aborts after not finding apt-get. The command it attempts to run is:
apt-get -y -q install linux-headers-3.7.5-1-ARCH
I suppose the "package name" comes from /usr/src, where the sole ... |
You're running Arch linux. According to pacman -Q -i linux-headers, the package "linux-headers" contains "Header files and scripts for building modules for linux kernel". When the linux kernel gets built, various constants, which might be numbers or strings or what have you, get defined. Some loadable modules need to... | What package could "linux-headers-3.7.5-1-ARCH" mean? |
1,415,789,761,000 |
When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note. The note messages are useless and distracting. How do I make them go away using the command line? (I don't use any sort of IDE.)
Example: /home/user/src9/AllBack3.c:129:9: note: each und... |
Pass the -fcompare-debug-second option to gcc.
gcc's internal API has a diagnostic_inhibit_note() function which turns any "note:" messages off, but that is only serviceable via the unexpected -fcompare-debug-second command line switch, defined here.
Fortunately, turning notes off is its only effect, unless the -fcom... | Want to turn off "note" level messages in GCC |
1,415,789,761,000 |
I've recently applied a one-line patch to drivers/bluetooth/btusb.c in order to enable compatibility with my Bluetooth device. However, whenever I get a kernel upgrade, the patch will be lost until someone backports it (which isn't likely). Is there a way for me to run a script and patch each new kernel upgrade automa... |
Yes, you should package up your changes as a DKMS module. Building modules for several installed kernels or automatically rebuilding them on an updated kernel is the main feature of DKMS.
Ubuntu community documention has a nice article on this topic here.
| Automatically apply module patch and compile kernel when updated? |
1,550,151,359,000 |
I'm trying to experiment with shared objects and found the below snippet on http://www.gambas-it.org/wiki/index.php?title=Creare_una_Libreria_condivisa_(Shared_Library)_.so
gcc -g -shared -Wl,-soname,libprimo.so.0 -o libprimo.so.0.0 primo.o -lc
I browsed trough the manpages and online, but I didn't find what the -lc ... |
The option is shown as "-l_library_" (no space) or "-l _library_" (with a space) and c is the library argument,
see https://linux.die.net/man/1/gcc
-lc will link libc (-lfoobar would link libfoobar etc.)
General information about options and arguments
UNIX commands often accept option arguments with or without whitesp... | gcc - unknown switches (absent also from the manpage) |
1,550,151,359,000 |
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 output but also intact words.
If you file them, you get the answer immediately - there seem to be no computation. Do the binar... |
This Super User question: Why don't you see binary code when you open a binary file with text editor? addresses your first point quite well.
Binary and text data aren't separated: They are simply data. It depends on the interpretation that makes them one or the other. If you open binary data (such as an image file) i... | Mystery of binary files |
1,550,151,359,000 |
I'm trying to build btrfs-progs from sources, but when I run ./configure I get the error:
checking for BLKID... no
configure: error: Package requirements (blkid) were not met:
No package 'blkid' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alt... |
If there are missing packages, you can use apt-cache:
% apt-cache search blkid
libblkid-dev - block device id library - headers and static libraries
libblkid1 - block device id library
or even:
% apt-cache search blkid | grep '\-dev'
libblkid-dev - block device id library - headers and static libraries
We know that ... | "configure: error: Package requirements (blkid) were not met" |
1,550,151,359,000 |
I am trying to install a Linux kernel (3.8.1) from source in a Fedora distribution.
The kernel is a vanilla one.
I follow the kernel's build instructions closely that is:
make menuconfig
make
sudo make modules_install install
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Everything in /boot seems fine.
I can see System... |
Easiest way to get a working kernel configuration is to just copy Fedora's .config over and then do a make oldconfig to configure it. The configuration is found at /boot/config-*
| Self-built kernel: failed to mount /dev: No such device |
1,550,151,359,000 |
I am currently trying to build a version of opencv, featuring cuda, on my arch linux computer. For that, I use opencv-cuda-git as base version. Additionally, I modified the PKGBUILD and added additional flags to further adapt opencv to my system.
However, everytime I run the buildprocess (makepkg csri), it fails with ... |
Okay so to close the question:
The Problem was that opencv needs both Lapack with the normal blas and cblas if you are using the ceres-solver. However, the opencv build only links cublas, which apparently lacks support for some needed functions of cblas.
One solution to this Problem was to manually link cblas by addin... | Arch Linux: problems building opencv with cuda; libopencv_core.so.3.4.0: undefined reference to `cblas_dgemm' |
1,550,151,359,000 |
I have compiled openvpn from source, running openvpn --version returns:
OpenVPN 2.4.4 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 19 2017
library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
And created a /etc/openvpn/server.conf file with some basic settings. Howev... |
Made it work by manually creating two files in /lib/systemd/system.
The first one is openvpn.service:
[Unit]
Description=OpenVPN service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn
[Install]
WantedBy=multi-user.target
and sec... | Self-compiled OpenVPN won't start from systemd |
1,550,151,359,000 |
I am trying to work with gtk which is located at /usr/include/gtk-3.0/gtk/ .., but all of the header files in the toolkit have #include <gtk/gtk.h>.
Aside from adding /usr/local/gtk-3.0 to PATH or adding gtk-3.0 to all the include preprocessors, what other options does one have with this?
|
Adding the appropriate directory to your include path is exactly what you're supposed to do in this case, only you're supposed to do it by pkg-config. Accessing the files directly using full pathnames is unsupported.
Add something like this to your Makefile:
CFLAGS += `pkg-config --cflags gtk+-3.0`
LIBS += `pkg-config... | Compiler cannot find header file, do I add the directory to PATH? |
1,550,151,359,000 |
I want to build my Linux kernel on my host and use it in my VWware virtual machine. They both use the same Ubuntu kernel now.
On my Host, I do make and make configure. Then, what files should I copy to the target machine, before I do make modules_install and make install?
What other things do I need to do?
|
The 'best' way to do this, is building it as a package. You can then distribute and install it to any Ubuntu machine running the same (major) version.
For building vanilla kernels from source, there's a tool make-kpkg which can build the kernel as packages. Other major advantages: easy reverting by just removing the p... | Build kernel in one machine, install in another |
1,550,151,359,000 |
/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 "/boot"
You may need to create an initial ramdisk now.
--
/boot # mkinitrd initrd-3.2.1-12-desktop.img 3.2.1-12-deskto... |
You should be using mkinitramfs, not mkinitrd. The actual initrd format is obsolete and initramfs is used instead these days, even though it is still called an initrd. Better yet, just use update-initramfs. Also you need to run make modules_install to install the modules.
| How to create an initrd image on OpenSuSE linux? |
1,550,151,359,000 |
This is my first question and I'm still pretty new so please forgive me if I've missed or botched something, or if this is an obvious solution.
I'm using CentOS 5.8 (yes I know it's ancient) and trying to test some squid configurations
From the Squid wiki:
NP: Squid must be built with the --enable-http-violations con... |
The question is about using RPM metadata to retrieve information about package specific compile time options. The information you're looking for isn't present in the RPM metadata. Either you need to have more than just an RPM (ideally a package build log or some of the files from the build directory), or you need to u... | How do I determine which configuration options an rpm package is built with? |
1,550,151,359,000 |
I'm using Linux Mint 13 MATE 32bit, I'm trying to build the kernel (primarily for experience and for fun).
For now, I like to build it with the same configuration as precompiled kernel, so firstly I've installed precompiled kernel 3.16.0-031600rc6 from kernel.ubuntu.com, booted to it successfully.
Then I've downloaded... |
Despite what file says, it turns out to be debugging symbols after all. A thread about this on the LKML led me to try:
make INSTALL_MOD_STRIP=1 modules_install
And low and behold, a comparison from within the /lib/modules/x.x.x directory; before:
> ls -hs kernel/crypto/anubis.ko
112K kernel/crypto/anubis.ko
And af... | Linux kernel manual build: resulting binary is 10 times larger than precompiled binaries |
1,550,151,359,000 |
I'd like to make a "portable" version of Emacs 24.3. I am using some Debian 7 systems, where I don't have root access. Since Debian 7 is missing Emacs 24, I'd like to build a portable version of it, which I can carry with me on a USB thumb drive.
My specific questions are:
Can I make the install prefix flexible, or i... |
I have a few ways to do this, easy ones first:
Making the install prefix flexible is hard - I would just make the install prefix to your home directory, or somewhere that you can access on any of the machines, and use
make install DESTDIR=/path/to/place/where/binaries/should/be/installed
to install them to somewhere ... | How to make a portable Linux app? |
1,550,151,359,000 |
I am building custom linux kernel packages in a Ubuntu 13.10 amd64 environment usingapt-get source linux-image-$(uname -r)the debian way make-kpkg clean;fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers.
Linux headers is larger than image
The result are two .deb files where the file l... |
The linux-headers package is only needed when you want to compile sources, kernels or build other packages.
Package description from debian:
This package provides the architecture-specific kernel header files for
Linux kernel 2.6.32-5-686, generally used for building out-of-tree
kernel modules. These files are g... | How to strip unused architectures, drivers, etc from headers when building a custom linux kernel? |
1,550,151,359,000 |
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?
|
Short answer: not possible. The difficulty of getting the exact dependencies from a source distribution is the reason why package management is so popular on Linux (okay, one of several reasons). In fact, if you just need to get it done and don't care so much how, the most reliable way to get the dependencies will pro... | Get list of required libraries when installing something from source |
1,550,151,359,000 |
I need to generate MIPS specific code on my machine when I run my C program. When I simply run,
gcc -O2 -S -c hello.c
On my system, I get the hello.s which seems to generate some assembly code but it doesn't seem to be MIPS specific code. The contents of hello.s file is as below.
.file "hello.c"
.section ... |
Understanding the Basics
From the wiki entry of MIPS architecture, it is described as,
MIPS (originally an acronym for Microprocessor without Interlocked
Pipeline Stages) is a reduced instruction set computer (RISC)
instruction set (ISA) developed by MIPS Technologies (formerly MIPS
Computer Systems, Inc.).
... | Generate MIPS architecture assembly code on a X86 machine |
1,550,151,359,000 |
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 -I/usr/local/include/thrift -c Something_server.cpp -o server.o
g++ -Wall -I/usr/local/include/thrift -c your_thrift_file_constants.cpp -o con... |
You're right that you'll end up with the same executable at the end (albeit with a different name); in the first case gcc will actually create a bunch of temporary object files that it removes after linking, versus the second case where you're making the object files yourself.
The main reason to do things the second w... | Why would one want to compile multiple .cpp files to the same executable? |
1,550,151,359,000 |
I've been messing around with my NAS which runs on Linux. I have root access, but there is no compiler. I seem to remember something about being able to compile on another system, but I'm not certain.
root@LSB1:~# uname -a
Linux LSB1 2.6.22.18-88f6281 #50 Tue Dec 22 18:06:23 JST 2009 armv5tejl unknown
|
Cross-compiling may be the solution for you It allows you to compile executables for one architecture on a system of a different architecture. Here's an introduction
| How do I install GCC on a system with no compiler? |
1,550,151,359,000 |
I recently had a conversation with a friend who is a highly skill software engineer, and he showed me some articles outlining the fact libc was much better than glibc.
I wonder if its possible to use libc instead, and what kind of problems would I come up against if I went this route?
|
Context: assuming from above comments that a BSDish libc is meant.
I think it's been looked into, but libc tends to be tightly tied to a given kernel (glibc has an abstraction layer, which allows it some portability but causes the usual problems that an abstraction layer causes) and making BSD libc work with a Linux ... | Can I build a linux distro with libc instead of glibc |
1,550,151,359,000 |
Whenever I use yaourt -Syua in my Manjaro Linux system, it'll give me
Edit PKGBUILD ? [Y/n] ("A" to abort)
and sometimes
Edit chromium-pepper-flash.install ? [Y/n] ("A" to abort)
Somewhere I read to just say no to editing these files.
The wiki : https://wiki.archlinux.org/index.php/PKGBUILD
Says the PKGBUILD is jus... |
Why don't you thoroughly read the wiki page that you linked:
Packages in Arch Linux are built using the makepkg utility and
information stored in PKGBUILDs. When makepkg is run, it
searches for a PKGBUILD in the current directory and follows the instructions therein to either compile or otherwise acquire the
fi... | What exactly is PKGBUILD and should I edit it when installing packages? |
1,550,151,359,000 |
I would like to build Debian package from source, using dpkg-buildpackage. I have downloaded package source:
apt-get -t wheezy-backports source gnucash
Inside the file gnucash-2.6.9/configure I see, that there are options which can be selected/deselected when building the package.
Debian maintainer has already made t... |
OK, take a look at gnucash-2.6.x/debian/rules.
Find the line that says override_dh_auto_configure: (line 23 in my case), and add your overrides below it.
In your case --enable-aqbanking is already there (for wheezy-backports at least), so simply delete it.
More info can be found in the man page.
Update: In addition, ... | building Debian package with non-standard options |
1,550,151,359,000 |
I need to install redis 2.8.x into a specific directory so I can later use fpm to create an rpm.
From my research, it seems that this should be possible by using make PREFIX=
mkdir /tmp/installdir
cd /tmp
wget http://download.redis.io/releases/redis-2.8.6.tar.gz
tar -xvf redis-*.tar.gz
cd redis-2.8.6
make PREFIX=/tmp/... |
I was successful by prefixing
PREFIX=/tmp/installdir make
and
PREFIX=/tmp/installdir make install
to check what happens, use -n
root@wizzard:/tmp/redis-2.8.6# PREFIX=/tmp/installdir make install -n
cd src && make install
make[1]: Entering directory `/tmp/redis-2.8.6/src'
echo ""
echo "Hint: To run 'make test' is a g... | specify PREFIX location when running make |
1,550,151,359,000 |
I tried to make && make install package, but I get an error:
libX11.so.6 not found
Where can I get this library?
|
You need to install the libX11 package:
$ rpm -qf /usr/lib/libX11.so.6
libX11-1.3.1-3.fc13.i686
Just go
$ yum -y install libX11
One more thing though: if you don't know how to find and install a library package, care to share why you are trying to compile a piece of software that is officially packaged for Fedora... | libX11.so.6 Not found |
1,550,151,359,000 |
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
the available gcc and run it on the
target?
Do i need to cross compile it for x86
64 bit processor? If yes, how can i spec... |
All amd64 (i.e. 64-bit x64) processors can run 32-bit x86 binaries. Also, on most operating systems, you can run x86 programs on an amd64 OS. So it is often possible to deploy x86 binaries on amd64 processors.
Whether it's desirable to do so is a different matter. 64-bit OSes often come with a restricted set of 32-bit... | Do I need to cross-compile my program when my target is 64 bit arch. and host is 32 bit arch from x86 family? |
1,550,151,359,000 |
I need to recompile my kernel on RHEL WS5 with only two changes.
Change stack size from 4k to 8k
Limit usable memory to 4096.
How do I recompile the kernel without changing anything else but these two items?
|
To change only the new values you will need the config the old kernel was build from.
In RHEL you can find this in: /boot/config-$(\uname -r)
Copy this file to the kernel source and change the values you want. Use make menuconfig for a ncurses gui.
For other distributions: If the config option CONFIG_IKCONFIG_PROC was... | Recompile Kernel to Change Stack Size |
1,550,151,359,000 |
I am working with a virtual machine (CentOS 5.3) that has very little storage space on the main drive (which includes /usr, /usr/local, etc). Most of the storage space is available on a separate drive that is mounted to /mnt. Consequently, on this drive I have created a basic installation directory (with subdirectorie... |
/etc/ld.so.conf only influences the dynamic linker, i.e. where libraries are looked for at run time. When you build an executable, what matters is the paths where ld looks for the library. The usual way to specify these is to pass the -L option; most configure scripts have a way to pass additional -L options. There us... | ldconfig issue with non-standard lib directory in CentOS |
1,550,151,359,000 |
I am trying to work my way around with the BuildPrereq flag in the spec files.
I want a few pre-requisites to be included if the OS is of a particular version. something like
if os == fedora 4
BuildPrereq >= apr0.9
endif
if os == feodra 10
BuildPrereq >= apr2.0
endif
Is there any way to achieve the above ? Also ... |
To translate what you wrote directly into specfile macros:
%if 0%{?fedora} == 4
BuildPrereq >= apr0.9
%endif
%if 0%{?fedora} == 10
BuildPrereq >= apr2.0
%endif
You could probably change the first %endif to an %else but I wanted to keep my rewrite as similar as possible in case there are other circumstances involved.... | How can I specify OS-conditional build requirements in an RPM spec file? |
1,550,151,359,000 |
I cannot find any packages for vdo for Debian, and my own attempts to compile and run the software have failed. Can anyone shed light on how to compile vdo for use with Debian as this is software released by RHEL after acquiring another company.
My current steps are:
apt-get update -y
apt-get install -y git sudo
sudo ... |
OP's question is incomplete: the end of the error message which contains an important clue to solve this is not included. Here it is (on Debian buster. Debian 9 would instead search for python3.5):
# vdo status
Traceback (most recent call last):
File "/usr/local/bin/vdo", line 46, in <module>
from vdo.utils impo... | Compiling VDO for use on Debian |
1,550,151,359,000 |
My company uses a small out-dated cluster (CentOS 5.4) to do number crunching (finite element calculations to be more specific). They are using a commercial package and have no idea of Linux. They don't want to change anything on the machines as long as they run, which I accept as a time-effective policy. I do not hav... |
Your management is wise in not trying to upgrade a working cluster that is performing an important function based on a proprietary package.
Backporting packages is time consuming and risky, that is, not always feasible. You might avoid the time penalty if you can finding the packages that you want to install in the or... | What is an effective method for installing up-to-date software on an out-dated production machine? |
1,550,151,359,000 |
Is there a way to build emacs on Linux so it doesn't embed the path where it was built into the binary, and it can be relocated harmlessly to a different path?
That is, if you build with --prefix=/a/b/c then move everything to /d/e/f it won't run, because it depends on the fixed path /a/b/c. I see the string /a/b/c i... |
Emacs can be relocated mostly harmlessly, even if you don't take any precautions when compiling. If the hardcoded paths don't work, Emacs looks for directories near the executable.
Emacs tries to determine where the executable that invoked it is located. It stores this information in the variable invocation-directory.... | Relocatable emacs |
1,550,151,359,000 |
I have Ubuntu 14.04 upgraded from 12.04 making dist-upgrades. I did many manual installations such as ffmpeg, libglib and so on, in the past. I have a nice custom distro now, it works well but I have problems while trying to compile applications. It stems from library conflicts between manually installed packages fro... |
Stuff in /usr/local usually supersedes stuff in /usr, so I'm a bit confused as to why you would install libraries there to have a "a nice custom distro", but then not want to compile against them. Those are the libraries the system will use actually use.
Anyway, man pkg-config claims the base search path:
is libdir... | How can I exclude some library paths listed in " pkg-config --variable pc_path pkg-config"? |
1,550,151,359,000 |
Is there a way to build and install only a few of the GNU coreutils?
The README in coreutils-8.19.tar.xz lists 100-odd, but the INSTALL doesn't say how to install only a few, and the Makefile is (to me) opaque.
|
./configure
cd ./lib
make
cd ../src
make version.h
make cat
make ls
HTH
===
UPDATE as of February 26, 2015:
The recipe above doesn't work in at least coreutils-8.23. I would not recommended building separate files.
The following shows the complexity of internal dependencies for cat and ls:
./configure
m... | Install only a few GNU coreutils? |
1,550,151,359,000 |
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 ld:
ld -m elf_i386 -e main -o test test.o -lc
This also appears to succeed and I then try to run the executable:
$ ./test... |
You need to also link start up fragments like crt1.o and others if you want to call libc functions. The linking process can be very complicated, so you'd better use gcc for that.
On amd64 Ubuntu, you can:
sudo apt-get install gcc-multilib
gcc -m32 -o test test.o
You can see files and commands for the link by adding ... | Unable to run an executable built with NASM |
1,308,324,734,000 |
I am doing a build on a Linux machine with Ubuntu 10.04 on it. 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 something else I can do?
|
Most software build processes use make. Make sure you make make use the -j argument with a number usually about twice the number of CPUs you have, so make -j 8 would be appropriate for your case.
| How to speed up my build |
1,308,324,734,000 |
I'm using Arch linux and I need GCC 4.7.0 for a class.
I only have GCC 6.2.1 installed on my system currently.
I followed all the install instructions correctly but I still yield this error after running the initial make.
$ make
.
.
In file included from /home/flounder/src/gcc-4.7.0/gcc-4.7.0/gcc/cp/except.c:987:0:
c... |
You'll probably end up spending an awful lot of time getting GCC 4.7 built on your current system, and in the end you still won't be sure of the result: your school's computers' version of GCC may include distribution patches or even local changes which your version won't have.
I would suggest instead that you run the... | How to handle error compiling GCC 4.7.0 using GCC 6.2.1 |
1,308,324,734,000 |
When installing a rpm package it warns that there is a necessary dependent library missing. In fact I have already installed that library from source, so I guess rpm just doesn't know about that.
Then can I let rpm know the existing library, and how? Maybe add some code in a rpm configure file?
By the way, installing... |
The RPM dependency database cannot tell that you installed a package from source. The RPM database only knows about the metadata present in the RPM packages, a package installed from source does not contains this metadata.
Some configure scripts that build a package from source will produce pkg-config, which is met... | RPM says missing dependency but I have already installed that library (from source) |
1,308,324,734,000 |
I'd like to install software from source (e.g., third-party GitHub repos) to my machine. Generally /usr/local/bin and /usr/local/src are for non-distribution-specific software, right?
Taking ownership of /usr/local seems risky: anything running with my privileges could make nefarious changes to executables in /usr/loc... |
Don't take ownership of /usr/local. Use sudo to install software. But use your own account to build it.
git clone … # or tar -x or …
cd …
./configure
make
sudo make install
Why not take ownership of /usr/local? You nailed it. That would allow any program running on your account to write there. Against a malicious ... | Recommended way to install software to /usr/local -- use sudo or chown? |
1,308,324,734,000 |
I would like to compile some C programs for Windows. So I used a search engine and I found that I probably need to install mingw32.
If I run:
sudo apt-get install mingw32
and I got:
E: Unable to locate package mingw32
So, I used a search engine again, and I found this answer on AskUbuntu and this answer on StackOv... |
On modern Debian derivatives, including Mint, mingw32 is no longer available; it has been replaced by mingw-w64:
sudo apt install mingw-w64
should work.
This package provides both 32- and 64-bit Windows compilers. When switching from mingw32 to mingw-w64, you’ll need to adjust the target triplets:
i686-w64-mingw32 f... | E: Unable to locate package mingw32, Linux Mint |
1,308,324,734,000 |
My immediate objective is to compile a small kernel for my laptop without sacrificing usability. I am familiar with the kernel compilation steps (don't necessarily understand the process). What are the options I can get rid of in menuconfig for a faster, slimmer kernel? I have been using the trial and error method, i.... |
Unchecking filesystems and drivers isn't going to reduce the size of the kernel at all, because they are compiled as modules and only the modules that correspond to hardware that you have are loaded.
There are a few features of the kernel that can't be compiled as modules and that you might not be using. Start with Ub... | Stripped down Kernel for a Laptop |
1,308,324,734,000 |
If someone used a Python virtualenv he knows we can run scripts in its own environment installing all necessary libraries which won't impact main python distribution.
Do we have something similar in a Linux (Debian) world for make utility?
Case 1: I downloaded sources and I know what dependencies I need. I
put librar... |
Case one is relatively easy, at least for some programs. Most source packages include a configure script which checks for the availability of needed libraries. These scripts will generally have options to specify search paths. For example --lib-prefix. That way, you don't even need to modify the Makefile yourself. Now... | Does Debian have any kind of virtual environment for make install? |
1,308,324,734,000 |
I want to install vim via homebrew, from the compile, but even when I ran the command with -s flag, the compile does not occur.
brew install -s vim --with-luajit
Or
brew reinstall -s vim --with-luajit
==> Reinstalling vim
==> Downloading https://homebrew.bintray.com/bottles/vim-8.1.0202
Already downloaded: /Users/... |
The consequence might not be exactly the same, but adding --HEAD flag on the command worked like a charm.
brew uninstall --force vim
brew install --HEAD -s vim --with-luajit
And now the vim is installed with Lua support.
| "brew install -s" does not compile from source |
1,308,324,734,000 |
I am trying to install Zsh without root privileges on a Linux machine. I downloaded the source tarball and run:
./configure --prefix=<my_installation_path>
but then I got:
configure: error: "No terminal handling library was found on your
system. This is probably a library called curses or ncurses. You may
need t... |
Update:
Following Gilles' answer, I updated CPPFLAGS and LDFLAGS and the problem goes away during configure.
However, I now get an error during make:
<INSTALLATION_PATH>/lib/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
I also get a recompile with -fPIC. I guess this refers to th... | Building zsh without admin priv: No terminal handling library found |
1,308,324,734,000 |
My situation. uname -a gives Linux computer2 4.4.0-62-generic #83~14.04.1-Ubuntu SMP Wed Jan 18 18:10:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I am trying to install HDF5 1.8.18 with GNU make 3.81 invoking gcc 6.3.0. I have successfully installed this gcc 6.3.0 alongside the version 4.8.4 that is shipped with the Ub... |
That's looking for a C++ header file, normally part of a development package such as libstdc++ (with a version and "-dev" or "-devel" as part of the package name).
For instance in Debian (where Ubuntu gets most of its packages), I have a "libstdc++6-4.6-dev" on my Debian 7 machine, which has this file:
/usr/include/c+... | gcc compilation terminated with "fatal error: string: No such file or directory #include <string>" |
1,308,324,734,000 |
I'm building a jessie build of Debian. Passwords are saved in /etc/shadow in the build tree, but they are salted obviously so I cannot change it just by editing the file. If this was my installed system, I could call passwd, but here I want to change the password in the file in the build tree.
How do I change the root... |
At the stage where you have a directory tree containing a file …/etc/shadow (before building the filesystem image), modify that file to inject the password hash(es) that you want to have.
The easiest way to do that is with recent enough versions of the chpasswd tool from the Linux shadow utilities suite (Debian wheezy... | Change the root password of a Linux image |
1,308,324,734,000 |
I want to use Meson to build a new c++ project. The first thing I need is a
dependency for the Boost library. But though the Boost libs are installed on my Arch system (headers
and libs), Meson complains that it doesn't find them.
Here is the meson build file:
project('myproj', 'cpp')
boost_dep = dependency('boost')... |
The following issue solved my problem:
Boost not detected on Fedora · Issue #2547
I replaced the meson build file by the following:
project('myproj', 'cpp')
cxx = meson.get_compiler('cpp')
boost_dep = [
cxx.find_library('boost_system'),
cxx.find_library('boost_filesystem'),
]
executable('myproj', 'main.cpp', d... | Meson doesn't find the Boost libraries |
1,308,324,734,000 |
Following up on this article I use GPP to empower Markdown parser pandoc with some macros. Unfortunately, gpp seems to copy all whitespace into the result.
For example, consider file test.md
% Title
% Raphael
% 2012
\lorem \ipsum
with test.gpp
\define{lorem}{Lorem}
\define{ipsum}{ipsum...}
Now, calling gpp -T --inc... |
Assuming all the junk is in the include file, and therefore before the start of the document, you could just post-process it:
test.gpp:
\define{lorem}{Lorem}
\define{ipsum}{ipsum...}
----- cut here ------
Then do:
gpp -T --include test.gpp test.md | sed '1,/----- cut here ------/d'
(Does gpp output to stdout? Otherw... | Generic Preprocessor adds extra whitespace |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.