Questions tagged [make]

For questions pertaining to make, a utility that automates the build process by managing dependencies amongst targets. Use this tag for questions about make itself or questions about issues arising from using the make command-line utility.

Filter by
Sorted by
Tagged with
0
votes
1answer
115 views

cmake and Installing opencv 4.x on Linux Debian 10 with Kernel 4.19.x

I am finding this info. online for building OpenCV 4.x on their homepage. I have not found a way to compile the samples or examples. Is it possible with cmake to install examples from the OpenCV 4.x ...
0
votes
1answer
138 views

How to compile only net/ipv4 of Linux Kernel?

Initially, My approach was to re-compile whole kernel from scratch but all hopes went down the moment I found out that it requires large amount of disk space. Now, I'm trying to figure out how to ...
3
votes
1answer
2k views

Error 24 : Write error : cannot write compressed block

I'm using Ubuntu 20.04 LTS Server and re-complied whole kernel with my patches. Now at the stage of installing it, but when I runs sudo make install I'm seeing following error, root@localhost:/home/...
0
votes
1answer
280 views

While making modules_install getting an error “No space left on device”

I'm using Ubuntu 20.4 LTS. I added a patch to the linux-5.4 kernel and followed below commands to complie it, cp /boot/config-$(uname -r) .config make oldconfig ccache make ARCH=i386 sudo make ...
1
vote
1answer
162 views

How to build only one program in binutils

Since there are many programs that are not related to my interests, I'd like to build a specific program in GNU binutils on Ubuntu. Program means that one binary file (e.g., ar, objcopy) for example, ...
0
votes
1answer
538 views

negetive width in bit field '<anonymous>' while running 'make'

Thank you for reading this question. I was trying to compile a kernel module that works with sysfs, and while executing make I ended up with this error. Can somebody please help me understand what ...
1
vote
0answers
121 views

phpinfo still shows old PHP version after installing new version from source

I downloaded PHP 7.3.18 from php.net. Then I configured it, maked it and installed it from source. If I execute php -v then I get PHP 7.3.18 (cli) (built: Jun 17 2020 12:55:46) ( NTS ) Copyright (c) ...
0
votes
1answer
560 views

Buildroot compile error, librt.so: undefined reference to

I'm trying to compile a Buildroot image using a preconfigured builtin _defconfig file... More specific the riscv64_xwin_defconfig which is a simple setup for a riscv64 image with Xorg builtin. Since ...
0
votes
1answer
86 views

How can I do string substitution in a variable created using cat in a Makefile?

In my Makefile, I'm assigning some variables based on the contents of a file, and I'd like to define a new variable by doing a string replacement on the contents of the file. I have a file called ....
0
votes
0answers
171 views

Custom error message in GNU make if required but not otherwise?

In GNU's make is it possible to print a custom error message instead of GNU's default one, possibly with the line number as well? I am fine with make's default behavior in all other scenarios. Here ...
1
vote
1answer
557 views

Can you compile make file in a different directory?

I once decided to build a program from source, but then realized that I will not be able to update it anymore, and therefore manually deleted all of it. Is there a way to make install without ...
0
votes
1answer
688 views

How to substitute variables with envsubst in Makefiles?

I want to substitute variables in my postfix template within Makefiles. .PHONY: replace clean export DOMAIN ?= home.lan replace: @echo $(DOMAIN) envsubst < template > main.cf cat out....
0
votes
1answer
366 views

make error 127 /bin/sh: 1: /usr/bin/g++: not found using Ubuntu

I am trying to make a program (hisat2) from the source code through Ubuntu. When I do, I get an error 127 and it says the following: /bin/sh: 1: /usr/bin/g++: not found Makefile:273: recipe for ...
0
votes
0answers
73 views

How could I make the changes in `usr/include/linux/binfmts.h` file make effect?

I have Ubuntu server that is running Linux 4.15.0-1082-azure. I updated the usr/include/linux/binfmts.h file in order to increase the size of argument list. I changed the MAX_ARG_PAGES. I need to ...
0
votes
1answer
128 views

I have a problem with Wi-Fi drivers in kali Linux Wi-Fi booster(TP Link) (TL-WN823N)

i have a problem with the wifi driver on kali Linux. I installed the driver and it tells me to compile the source of the driver and after compiling it I should see a name of the chip.ko file stored in ...
-1
votes
1answer
35 views

Meaning of these wildcards/paths *~ .*~ \#*\#

In a Makefile I am studying I saw the following line: @rm -f *~ .*~ \#*\# Probably because these are special characters and hard to search, I can't find anything about the meaning of: *~ .*~ \#*\# ...
1
vote
1answer
7k views

makefile error “No rule to make target” how to solve it?

what's wrong with my makefile? CC = gcc OBJS = main.o map.o extended_map.o election.o utilities.o EXEC = election DEBUG_FLAG = -DNDEBUG COMP_FLAG = -std=c99 -Wall -pedantic-errors -Werror $(EXEC) : $...
0
votes
0answers
77 views

What to do about a make failure?

This follows from this question. I am trying to install cryptsetup 2.3.2. The pre-existing version is 1.6.6 (installed on the system, and "latest version" according to Synaptic). So I followed those ...
-1
votes
1answer
270 views

How to build gcc without make?

I'm trying to build tools from source codes. I start with make and get the following error: configure: error: no acceptable C compiler found in $PATH So it means that I need to install gcc. But as ...
1
vote
2answers
260 views

makefile: same target and directory name

In my make file I have a target test: and make test works fine. But when I also have a subdir called test, I get the message: make: 'test' is up to date. How can I force make to ignore the subdir and ...
0
votes
1answer
347 views

How to build loadable builtins for Bash

As I recently learned, it's possible to dynamically load custom builtins into Bash (see enable in the manual, and this answer). However I'm not sure how to take advantage of this feature. The linked ...
0
votes
2answers
220 views

understanding the execution flow of GNU make

I have a following Makefile: $ cat Makefile all: foo foo: bar @true bar: file.txt touch file.txt file.txt: @echo 'Created file.txt' run: @echo 'Target without ...
7
votes
3answers
675 views

Multiline sed in Makefile

I have a sed command that I want to use in a Makefile. It works in the terminal. The command is sed -n '/[{]/,/[}]/{ p /[}]/a\ //end of block matching brace }' myfile.txt This results in these ...
1
vote
1answer
3k views

How do you install Make from source?

I have tried Make version 4.2 and 4.3 on Ubuntu 18.x, RHEL 8.x, and SUSE 15.x servers. But I get the same problem. I cannot use binary packages (e.g, yum, apt, or zypper commands). I try to run ...
1
vote
0answers
24 views

Pattern-specific make variable based on the highest level target name

Goal In the usual case of a target (mother target) calling another target (child target) as prerequisite, I'd like to assign a pattern-specific variable (see the manual page) with the following ...
1
vote
1answer
852 views

What's the difference between percent vs asterisk (star) makefile prerequisite

I'm trying to understand why some Makefiles have prerequisites with %.txt and others have *.txt. I've created this folder layout. $ tree . . ├── hi1.txt ├── hi2.txt ├── hi3.txt └── Makefile First, ...
0
votes
0answers
36 views

Does running a command using sudo cause future commands in the same session to also be run as root?

I was in a hurry trying to get a project up and building, using raw make. I had a Makefile whose relevant bits went like this: TARGET := libtest BIN_DIR := bin BUILD_DIR := build .PHONY: clean ...
0
votes
0answers
30 views

Subset of string variable in Makefile

I am relatively new to using Make. I am trying to port a shell script that has a variable that is accessed using ${var:9:-1}, however in Make as $ is reserved I cannot use this convention. I am lost ...
2
votes
1answer
697 views

Makefile get list of targets

I use the following code to get a makefile targets list which works OK for most cases, however when you use makefile like this you get only two targets and not all. The another command doesn't show ...
1
vote
1answer
400 views

./Configure error installing xDebug - wrong php version

I am trying to install xDebug for php7.2 but keep receiving the following error when i execute ./configure to generate the make file: checking Check for supported PHP versions... configure: error: ...
0
votes
1answer
32 views

Not override a file when used as stdout of a c program

I have used gcc and make to compile a c file. The name of the run file is sequence. I have two goals: Have an input file (i.ein1) as stdin and run the program. when the program finishes using in1 and ...
0
votes
1answer
231 views

Setting variable in Makefile through shell script logic or native make logic but assigning default value when not found in environment variable

I have something like the snippet below. How do I properly set an undefined ENV var in the Makefile through shell script logic? Everything seems to work when the ENV var is already defined in the ...
0
votes
1answer
39 views

Compile a package against different kernel headers?

I have a set of kernel headers that I want to build against in /usr/src/kernels/$(uname -r)/... Is it possible to have make wholesale just look for kernel headers there or do they need to be installed ...
0
votes
1answer
250 views

Makefile cache problem

I am not sure about the problem so apologies if the title is not appropriate. I implemented the following Makefile rule: check-vendor: @$(eval HASH1 = $(shell find vendor -type f -print0 | sort -...
8
votes
1answer
37k views

Why is there `No CMAKE_CXX_COMPILER could be found.` and how to solve?

In trying to build https://gitlab.com/interception/linux/tools on a new Kubuntu installation, running cmake .. from the tools/build directory returns the error: CMake Error at CMakeLists.txt:3 (...
1
vote
1answer
105 views

`make menuconfig` overrides configuration with architecture defaults

I'm cross-compiling a kernel, configuring it with $ make sunxi_arm64_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- which happens to be what I need to do, and then want to make a few ...
1
vote
1answer
250 views

Make error when executing recipe with conditional operator

My Makefile is very simple: all: [ -f MyFile ] && echo "MyFile exists" Of course the recipe line begins with tab. If the file MyFile really exists, everything is ok. But if this file ...
1
vote
2answers
175 views

How to get the relative path between two directories?

Say I have a variable with a path release/linux/x86, and want the relative path from a different directory (i.e. ../../.. for current working directory), how would I get that in a shell command (or ...
0
votes
1answer
41 views

fatal error: kdecoration.h: No such file or directory

I got the following error during the compilation of the AuroraeDesigner from source although I've installed libkdecorations* : fatal error: kdecoration.h: No such file or directory Kubuntu : 18.04 ...
0
votes
0answers
27 views

Write failed MAKE commands into a file

I am running make -j -k. I want to write the exact commands that fail into a file. The output should not be scrambled because of -j.
0
votes
1answer
63 views

My Makefile is empty but make is running some old commands [duplicate]

I had a strange bug that I managed to reduce to the following. I have a folder with only two empty files: a Makefile and a cpp file: $ ls -la total 8 drwxrwxr-x 2 erelsgl erelsgl 4096 Mar 3 20:12 . ...
1
vote
1answer
49 views

Make: start process that if being killed, does not kill make

I use GNU make to start benchmarks of different write/read calls in R. In some cases this will result in my RAM being fully used and the process being killed (which is fine, since I want to see the ...
0
votes
1answer
319 views

How to compile ath9k drivers from source?

I want to make some changes in ath9k drivers for learning purposes. My problem is that when I try to compile the driver, the make command is giving many implicit declaration errors, setup_timer, ...
0
votes
1answer
281 views

Building m4 from source on FreeBSD error: don't know how to make ../../build-aux/snippet/c++defs.h

I'm using FreeBSD 13.0-CURRENT (for more information see here), and I want to use GNU m4. Downloaded this version of it, configured, and tried to make. But it gives error as stated in the title: error:...
0
votes
1answer
460 views

In the LD flags of a makefile, is it better to give the dir with platform-specific libs priority over /usr/lib?

The makefile of my solution (for Raspbian Buster) contains an LDFLAGS definition like this: LDFLAGS=-L/usr/lib -L/usr/lib/arm-linux-gnueabihf …so that the standard libdir is given priority over the ...
2
votes
1answer
909 views

makefile syntax error for if-else construct

Hi I am stuck in this problem for long time. I expect output "ok" for this makefile. But I get syntax error on calling make: ifeq (0, 0) /bin/sh: 1: Syntax error: word unexpected (expecting ")"...
8
votes
1answer
712 views

What does $(number) mean in a Makefile?

I have some script and I didn't understand a line which contains $(1): wget --retry-connrefused --waitretry=5 --read-timeout=30 --tries=50 --no-dns-cache https://dataverse.harvard.edu/api/access/...
0
votes
1answer
90 views

Arch Linux: installing grep from source

I completely removed grep along with my package manager (Pacman) , on accident. Recovering form this issue would be easy but, I can't install grep. I downloaded the tarball and extracted it, but when ...
2
votes
2answers
2k views

“Command not found” passing argument from Makefile to shell script

I have a info.properties file where I have this MY_NAME property and I can use this property on my Makefile. I already tried but I can't use that property directly on myScript.sh file. So I'm trying ...
2
votes
1answer
1k views

Problem running make - Syntax error: “(” unexpected

Ubunutu 18.04.4 LTS - Linux 5.3.0-28 - gcc 7.4.0 I'm trying to run make, and I get the following output /bin/sh: 1: Syntax error: "(" unexpected Makefile:1699: recipe for target 'modules' ...

1 2
3
4 5
18