Hot answers tagged

4

The errors are in this line: $(CC) $LFLAGS$ (LDFLAGS) $(HW1_C_OBJS) -o $@ $LFLAGS is interpreted as $L followed by FLAGS; then $ (LDFLAGS) is interpreted as $ (the value of the variable whose name is a single space) followed by (LDFLAGS), which is why you get the FLAGS(LDFLAGS) output. To fix it, use $(CC) $(LDFLAGS) $(HW1_C_OBJS) -o $@


4

Assuming GNU make: Add the shell keyword before the nvidia-smi command and double the dollars in awk command. The similarities in make n shell syntax are a source of confusion. ver_cuda: CUDA = $(shell nvidia-smi | awk -F"CUDA Version:" 'NR==3{split($$2,a," ");print a[1]}') VER_CUDA ?= $(CUDA)


3

Part of the problem is that you're using $(nvidia-smi ...) instead of $(shell nvidia-smi ...). That's easily solved. You also have to use $$2 instead of just $2 to prevent make from expanding it (probably expanding to nothing, resulting in the awk expression being just {print } and printing the entire line). e.g. with a minimalist Makefile: all: CUDA=&...


2

You need to install the kernel header files for your specific kernel version. Run sudo apt install linux-headers-$(uname -r) and try to compile the module again.


1

Dependencies needed for compile dwm in void linux from scratch is: sudo xbps-install base-devel libX11-devel libXft-devel libXinerama-devel freetype-devel fontconfig-devel Dependencies needed for compile dwm in arch linux from scratch is: sudo pacman -S base-devel libx11 libxft libxinerama freetype2 fontconfig


1

The solution suggested by steeldriver actually worked. There is an error in the make.inc file. The make command should work once the file make.inc.gcc is linked to make.inc using the command ln -sf make.inc.gcc config/make.inc.


1

Those packages are built for Ubuntu 20.10 and won’t work on Debian 10. You’ll need to build Darling from source; the project provides detailed build instructions which include instructions for Debian 10. Unfortunately these instructions can’t work on Debian 10 because the build requires Clang 9 (Debian 10 has Clang 7) and kernel 5.0 or later (Debian 10 has 4....


1

Based on what I can read from the manual, it seems GNU make treats its variables a bit like the shell. When it starts, it imports variables from the environment to its internal set, and when running commands, exports to their environment the ones marked for export. Which implies it only has a single table for all variables, and no way to have environment ...


Only top voted, non community-wiki answers of a minimum length are eligible