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
3 votes
1 answer
313 views

How can I use $0 in Makefile?

I would like to include the following command (taken from here) in a Makefile. A simple version of my Makefile script containing the command is: copy_files: sed 's/^/\./' ./input_file | \ ...
ellat's user avatar
  • 33
0 votes
0 answers
14 views

How to replace installed openssl and use my own openssl to build `make` script

I'm really new in Linuxverse, so please understand if I'm asking standard (or may a dumb) question. I've seen so many post about how to remove openssl, but mostly they told to not remove it because it'...
flix's user avatar
  • 137
3 votes
1 answer
125 views

Why does the Makefile rule still execute when prerequisites do not exist in the current directory?

I have a Makefile that says: aaa:bbb echo 456 bbb: echo 123 When there is no bbb file in the directory, these two rules will execute regardless of whether there is an aaa file or not. But why?...
lcWhhx's user avatar
  • 33
0 votes
1 answer
25 views

what is the meaning when a makefile rule has prerequisites but without the recipe?

INSTALL = /usr/local/bin/install -c INSTALLDATA = /usr/local/bin/install -c -m 644 # The directory to install tar in. bindir = $(prefix)/bin # The directory to install the info files in. infodir = $(...
lcWhhx's user avatar
  • 33
1 vote
1 answer
59 views

make: *** No targets. Stop

why when the make command in the code code throws an error make: *** No targets. Stop. Code: NAME := program FLAG := -std=c11 -Wall -Wextra -Werror -Wpedantic all: $(NAME) $(NAME): *.c clang $...
German Enjoy's user avatar
0 votes
0 answers
45 views

Building httpd can't find Openssl

I am attempting to rebuild apache from source and am encountering an issue I have not previously had. I have built apache version 2.4.57 from source many times in the past and have had no issue during ...
user10709800's user avatar
0 votes
0 answers
50 views

How to compile this SDL2 sample program?

I tried to build this SDL2 sample program, but failed. I made it with Makefile: CFLAGS = -I/usr/include CC = arm-linux-g++ sdltest: sdl2-test.cpp $(CC) sdl2-test.cpp -L/usr/lib/x86_64-...
Stan Huang at Taiwan's user avatar
0 votes
0 answers
14 views

Failed to build newlib4.4 for ARM in WSL2 Linux x86_64

I am working on an embedded RTOS system for ARM platform, it is using newlib-3.1. Now I am trying to support newlib-4.4 for the system in WSL2 (Ubuntu-20.04.6 for X86_64). The cross-compiler for ARM ...
wangt13's user avatar
  • 429
0 votes
1 answer
33 views

Why Package libnetfilter_queue was not found in the pkg-config search path?

I tried make all go build -o bettercap . go build github.com/chifflier/nfqueue-go/nfqueue: # pkg-config --cflags -- libnetfilter_queue Package libnetfilter_queue was not found in the pkg-config ...
MikiBelavista's user avatar
0 votes
1 answer
33 views

Why is the configuration file in the parameter list of make command?

Here is the command line I got from a chip maker: make sunxi_defconfig ARCH=arm CROSS_COMPILE=arm-linux- It surely failed with message of *** Error during writing of the configuration. make[1]: *** [...
Stan Huang at Taiwan's user avatar
1 vote
0 answers
75 views

log output (stdout) from within make file

How do I send the output (stdout) to a log file from WITHIN the make file? I am NOT interested in a command line solution such as "make > build.log". Listed below is my generic make file. ...
jwzumwalt's user avatar
  • 259
1 vote
1 answer
129 views

Makefile:12: *** missing separator. Stop [duplicate]

In trying to compile my makefile, I keep getting the same error message repeatedly: Makefile:12: *** missing separator. Stop I've removed the tabs, removed the spaces, deleted the makefile entirely ...
Kyla Henry's user avatar
1 vote
1 answer
57 views

ADCIRC - Cannot find -lhdf5_fortran: No such file or directory

Trying to compile ADCIRC, a Fortran program with NetCDF support, and I hit the following error. /usr/bin/ld: cannot find -lhdf5_fortran: No such file or directory collect2: error: ld returned 1 exit ...
Alexandre Georges's user avatar
0 votes
1 answer
70 views

Help with Makefile for C program

I'm trying to generate a new library that includes another one I have created previously. In my current folder I have my source files inside a src folder and my headers inside an include folder. This ...
Ricardo Sisco's user avatar
0 votes
0 answers
51 views

Makefile and pid files

I have some convenience rules in a Makefile that depends on pid files, but sometimes the pid files are there when the processes aren't. What's a good pattern to work around this in make? For example, ...
gcb's user avatar
  • 400
0 votes
1 answer
47 views

Make does not rebuild transitive dependencies of pattern rules on change, why?

I have a Makefile, roughly so: .PRECIOUS: %.a %.b %.c %.a: touch $@ %.b: %.a touch $@ %.c: %.b touch $@ If I create "test.c" with a make test.c, all the 3 files (...
peterh's user avatar
  • 9,731
0 votes
0 answers
56 views

make: *** No rule to make target 'mykernel.bin'. Stop

I'm worrking on an OS but I'm getting this error with my makefile.win. Looks like the linker.ld output file doesn't match the naming convention of the file i'm making (mykernel.bin). Not sure if that'...
Abilaash's user avatar
0 votes
1 answer
197 views

Issue with make and sudo make in Linux kernel module compilation

I am currently working on a simple Linux kernel module and have encountered an issue related to running make and sudo make commands. Here's the content of my Makefile: obj-m := main.o all: make -...
pro-codes's user avatar
0 votes
0 answers
65 views

makefile value of variable is a the name of another variable

In a makefile, the value of variable is a the name of another variable. How do I get it inside target? For example: my_variable := Hello target: @var_name="my_variable" ; \ result=$(...
Yevhen's user avatar
  • 1
0 votes
0 answers
39 views

Makefile with Automatic Dependency Generation

I am going crazy, please can someone help... I want: .c files in src .h files in include .o files in build .d files in build binary executables in bin I have taken inspiration from the OSDev wiki, I ...
wjcblair's user avatar
1 vote
1 answer
1k views

How to compile every c file separately and then link all objects with a makefile?

I am working with microchip microcontrollers for a quite a while, and I fully dislike very much Netbeans. So since Mplab migrated to Netbeans I am trying to do all the work by my own, and here is the ...
Lazcol's user avatar
  • 11
0 votes
1 answer
197 views

using mingw on Linux Mint

I need to build Windows binaries from a conventional source tarball. I recall that I used to do this in a RedHat environment using specialised configure and make scripts from mingw packages. But I'm ...
user22108's user avatar
  • 101
1 vote
1 answer
172 views

make command doesn't produce any executable

My Makefile contains the following: CC=gcc CFLAGS=-Wall main: hello.o hello_fn.o clean: rm -f main hello.o hello_fn.o It should have produced an executable file main (I've read that in ...
Rodion Iskhakov's user avatar
1 vote
1 answer
61 views

How to ask make to not always re-create files depending on .PHONY targets?

I have this: .PHONY: check check: script-returning-nearly-always-zero obj2.img: obj1.img check make-obj2-from-obj1 So, logic is that I want to re-generate obj2.img, if it is older as obj1 (...
peterh's user avatar
  • 9,731
0 votes
0 answers
288 views

Correctly run interactive command through Makefile

I have a bespoke interactive command (a "repl") which needs a series of build steps to be performed beforehand. Makefiles are a very good fit for this particular build process, because of ...
deprecated's user avatar
  • 2,361
0 votes
0 answers
496 views

Linux kernel build fails with sed: can't read modules.order: No such file or directory

I am trying to build Linux Kernel for the first time and I am facing below issue while trying to make modules_install sed: can't read modules.order: No such file or directory make: *** [Makefile:1483: ...
Devansh Jani's user avatar
0 votes
0 answers
172 views

LFS libstdc failed - make: *** No targets specified and no makefile found. Stop

I am on chapter 5 of LFS. I am trying to compile LibSTDC. After cd'ing into the build directory I created and running: ../libstdc++-v3/configure \ --host=$LFS_TGT \ --build=$(../config.guess) \ --...
lfsthrowaway's user avatar
1 vote
1 answer
202 views

building Debian package from Buster fails on Bookworm

I need to use older version of linphone on Debian 12. The version in bookworm is 4.4.10-3, and I actually need 3.12.0, which is available in Buster. On my bookworm build machine, I changed the sources,...
Martin Vegter's user avatar
0 votes
0 answers
40 views

Installing sile from source fails

I am trying to install sile. A Debian package is not provided yet so I decided to build from source. Manual Install Lua $ curl -R -O http://www.lua.org/ftp/lua-5.4.6.tar.gz $ tar -xf lua-5.4.6.tar....
gsv29820's user avatar
0 votes
2 answers
281 views

commands ran from Makefile are buffered, and don't print output imediately

when I run following command in shell, I see the rsync output real-time, as the files are being transfered: rsync --out-format="%n" --info=name1,del2 -rt /foo bar | sed '\@/mmc/@d' | grcat /...
Martin Vegter's user avatar
1 vote
1 answer
222 views

make menuconfig hangs when trying to compile linux kernel 6.1.44

I am trying to compile linux kernel 6.1 on Debian 12. I have installed the build environment: apt-get install build-essential bc libncurses-dev libssl-dev libelf-dev bison flex Now when I run make ...
Martin Vegter's user avatar
1 vote
1 answer
188 views

What tells make that a file is an intermediate file (and can be auto removed)?

I'm simply studying make. And I stumble upon the question on make's autoremoving intermediate file. I'd like to better predict how make would mark file intermediate (i.e. answer "Would auto ...
Koala Yeung's user avatar
0 votes
0 answers
279 views

Compile git for /lib/ld-linux-armhf.so.3 from vm that links with /lib/ld-linux-aarch64.so.1 by default

I'm building git from source from a debian 10 vm that has /lib/ld-linux-aarch64.so.1, which ends up linked in the git binary after a basic NO_TCLTK=true make prefix=$(pwd)/2.41.0/arm make all and ~ ...
bpstrngr's user avatar
  • 101
0 votes
1 answer
170 views

Installing PongoOS fork on Debian results in no makefile binaries

I am attempting to install this fork of PongoOS onto Debian 12.1 using these instructions and the last step I have taken was enter the following into the terminal: EMBEDDED_CC=clang EMBEDDED_LDFLAGS=-...
CSS_Lewis's user avatar
0 votes
0 answers
67 views

makefile error "error checking context: 'no permission to read from" when file is not readable

I'm running into an error of: make deploy_test error checking context: 'no permission to read from '.../ssh-priv-key''. make: *** [Makefile:24: build_deploy] Error 1 This ssh-priv-key file is ...
Chris Stryczynski's user avatar
1 vote
0 answers
40 views

Compiling mono-basic causes 'System.Xml.dll' could not be found

I am running on AlmaLinux9 (RedHat 9 clone) and have added mono-* from the EPEL repos. All worked well, but I also needed mono-vbnc so I downloaded the mono-basic project source from github. I ran ./...
TSG's user avatar
  • 1,698
0 votes
0 answers
247 views

When using CMake and g++, the compiler output does not have any coloring or formatting

I'm using Fedora 38 (KDE, wayland), g++ 13.1.1, CMake 3.26.4, and GNU Make 4.4. My problem is as follows: When running g++ directly, the output (e.g. errors, warnings, ...) is nicely formatted, using ...
RL-S's user avatar
  • 141
0 votes
0 answers
1k views

ERROR:make: *** [Makefile:7: all] Error 2

I attempted to use the "Linux-Kernel-Module-for-Listing-Tasks" from GitHub (https://github.com/TheRealYoussef/Linux-Kernel-Module-for-Listing-Tasks/blob/master/ListTasksLinear.c) on Ubuntu ...
Beginner_code's user avatar
0 votes
0 answers
349 views

RHEL/Rocky 8.8 - 100% CPU and Memory lockup on "make"

Our software product runs correctly on all RHEL 8 versions, until we updated to RHEL 8.8. While running a "make" on Version 8.8, it failed because the RHEL skb_recv_datagram() was updated ...
Izerman Uln'hyrr's user avatar
0 votes
0 answers
168 views

make[2]: *** [scripts/Makefile.build:267: arch/x86/kernel/paravirt.o] Error 255

I'm trying to compile linux kernel 5.7.0rc1. But while compiling I'm facing the following errors. I'm using this config file. Link: .config arch/x86/kernel/paravirt.o: warning: objtool: missing symbol ...
Zeshan Ahmed Nobin's user avatar
0 votes
0 answers
112 views

'unicode/ucnv.h' file not found when cross compiling PHP for Android

I'm trying to cross compile PHP to Android. After i ran ./configure --host=$TARGET --enable-static --without-iconv all went fine. But when i run make CFLAGS=-I/usr/include/unicode i get following ...
kpwn Apps's user avatar
0 votes
0 answers
36 views

miscutils error when compiling BusyBox for Android

I'm trying to compile Busybox for Android. Command used: make CC=$TOOLCHAIN/bin/$TARGET$API-clang \ AR=$TOOLCHAIN/bin/llvm-ar \ RANLIB=$TOOLCHAIN/bin/llvm-ranlib \ CFLAGS="-I/home/...
kpwn Apps's user avatar
0 votes
1 answer
215 views

colorizing commands vs arguments in output of shell

When working with make/cmake scripts you often have to use VERBOSE=1 and look at all the commands run. This is what I do a lot, and its utterly straining for someone just looking for the origin of ...
Kalen White's user avatar
1 vote
0 answers
2k views

Compiling CFLAGS in a Yocto Recipe File

Issue: I have 2 macros I added in a c file and I have 2 machines. Using Yocto recipe I wish to build the code with specific macros for specific machines. Breaking down the issue in sub parts - hello.c ...
Nathan's user avatar
  • 21
0 votes
1 answer
107 views

Unable to compile uvcvideo driver

I've been following the LFD103 course titled "A BEGINNER'S GUIDE TO LINUX KERNEL DEVELOPMENT". In the section "Writing Your First Kernel Patch", we make changes to the 'uvcvideo' ...
SHERLOCK's user avatar
  • 135
1 vote
1 answer
854 views

Don't print comment at end of line in makefile

I'd like to add comments at the end of lines in my makefiles. rule: echo 1 # Print 1 However, when running this makefile, the comment also gets printed in the command-line. $ make rule echo 1 # ...
nijoakim's user avatar
  • 281
0 votes
1 answer
37 views

Installing pwnat through makefile gives errors

I'm fairly new to Linux, still learning. I'm trying to install pwnat. git clone https://github.com/samyk/pwnat cd pwnat sudo make It prints: gcc -Wall -Wshadow -Wpointer-arith -Wwrite-strings -D ...
Le Gharo Tyffler's user avatar
0 votes
1 answer
139 views

Convention to install files to /etc/ as non-root?

This question possibly has relevance in both Unix & Linux and Stack Overflow; I'm posting at Unix & Linux first, because I think I'd like to understand the issue from the perspective of Unix/...
StoneThrow's user avatar
  • 1,717
-1 votes
2 answers
230 views

Does "make" have implicit recipe for building shared object?

The implicit rules in "make" are defined on https://www.gnu.org/software/make/manual/make.html#toc-Using-Implicit-Rules. I was unable to find the default recipe for shared objects in there. ...
BipedalJoe's user avatar
3 votes
1 answer
900 views

Make grep exit 1 if found, and exit 0 if not found

I'm creating a simple command to execute within GitHub Actions, which builds a Makefile and returns an error if found (matching Error 1) and success when not found... I seem to either get it to fail ...
Herbie Vine's user avatar

1
2 3 4 5
20