Skip to main content

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
0 answers
5 views

Specify compiled OpenSSL directory to wpa_supplicant

I am trying to compile wpa_supplicant, which requires OpenSSL, which I have compiled and installed to a custom directory, build such that the file ssl.h is in build/include/openssl/ssl.h Now, when I ...
Noob YT's user avatar
0 votes
0 answers
24 views

Evaluate command inside comparison in makefile [duplicate]

I would like to check if Linux system is ubuntu inside Makefile. What I do is: copy_files: if [ "$(head -n 1 /etc/lsb-release | cut -d '=' -f2)" = "Ubuntu" ]; then \ ...
ellat's user avatar
  • 37
2 votes
2 answers
840 views

What does '\($*\)' mean in sed regular expression in a makefile?

I encounter the following sed command in make's manual. sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' And it has the following effect (this is an example in the manual): main.o : main.c defs.h # is turned into:...
liginity's user avatar
  • 143
1 vote
1 answer
18 views

How to install autoconf as alternative in the system?

I am using a fairly dated Ubuntu 18/RHEL6 system with old build tools, I'm trying to update it but don't want to crush the existing tools installation. I created the following script which installed ...
codenamezero's user avatar
0 votes
1 answer
67 views

Building GCC 12.2.0 from source for aarch64 target

I've been trying to cross compile the source code to build GCC 12.2.0 for my RaspberryPi 4 B running Ubuntu 22.04. SO far I've tried doing this while configuring the project: ../gcc-12.2.0/configure --...
MetalAllegiance's user avatar
1 vote
1 answer
60 views

How to join strings without implicit space?

I'm trying to organize a Makefile with complex commands into something more readable. I'm trying to break down a long list of parameters, but even single parameters are too bad, hence I wanted to ...
gcb's user avatar
  • 420
0 votes
0 answers
210 views

Install TP-Link Archer T2U V3 driver in Linux without Internet

I'm using an Archer T2U v3 on my Ubuntu 14.04 and 16.04 system and on a Linux Mint system based on these Ubuntu versions. It works flawlessly with the driver directly provided by TP-Link from their ...
A. Bhowmick's user avatar
0 votes
0 answers
20 views

Quering the instalation prefix of a c library with pkg-config

I am writing Makefile that installs a c shared library to the system, including the .pc file for pkg-config. I would like to add an uninstall target, but the location of it will depend on the PREFIX ...
00M's user avatar
  • 11
3 votes
1 answer
542 views

fatal error: bsd/string.h: No such file or directory

According to the answer I need to include -lbsd to the gcc command. But I have no idea where I am supposed to insert it here. I'm using Ubuntu 24.04, Linux vivobook16-m1605xa-mb089 6.8.0-31-generic #...
chipichippichappachapppa's user avatar
0 votes
2 answers
26 views

Specifying a toplevel installation directory

I am building the lean prover system git clone https://github.com/leanprover/lean4 --recurse-submodules cd lean4 mkdir -p build/release cd build/release cmake ../.. make But rather than using a ...
Vera's user avatar
  • 1
0 votes
0 answers
27 views

How to correct this script to detect OS type? [duplicate]

I'm trying to modify a Makefile so I can easily run my app by make run run: OUTPUT=${uname -a | awk '{ print tolower($1)}'} bin/${OUTPUT}_${ARCH}/${APP_NAME} Running uname -a | awk '{ print ...
anta40's user avatar
  • 421
3 votes
1 answer
374 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
  • 37
0 votes
0 answers
26 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
  • 143
3 votes
1 answer
198 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
32 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
127 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
114 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
89 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
17 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
  • 443
0 votes
1 answer
107 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
292 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
  • 269
1 vote
1 answer
271 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
89 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
96 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
94 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
  • 420
0 votes
1 answer
96 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,828
0 votes
0 answers
61 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
321 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
152 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
53 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
2k 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
303 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
266 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
94 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,828
0 votes
0 answers
373 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,371
0 votes
0 answers
609 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
202 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
215 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
47 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
336 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
246 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
254 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
323 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
226 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
68 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
54 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,768
0 votes
0 answers
262 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
2k 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
1 answer
260 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
2 3 4 5
21