1
14
Fork
You've already forked dwlmsg
4

[ Solved ] Help building required #1

Closed
opened 2024年07月25日 14:06:58 +02:00 by JustineSmithies · 10 comments

I'm trying to build this tool on Chimera Linux which uses musl but I am struggling.
I can build most other things but this one has me stumped.
What dependencies are required or what am I missing ?

I just git clone the repo then from inside try doas make install
But I keep getting the following error ?

client-header protocols/dwl-ipc-unstable-v2.xml dwl-ipc-unstable-v2-protocol.h
make: exec(client-header) failed (No such file or directory)
*** Error code 1
Stop.
make: stopped making "install" in /home/justine/Git/dwlmsg

Any help would be very much appreciated.

TIA
Justine

I'm trying to build this tool on Chimera Linux which uses musl but I am struggling. I can build most other things but this one has me stumped. What dependencies are required or what am I missing ? I just `git clone` the repo then from inside try `doas make install` But I keep getting the following error ? ``` client-header protocols/dwl-ipc-unstable-v2.xml dwl-ipc-unstable-v2-protocol.h make: exec(client-header) failed (No such file or directory) *** Error code 1 Stop. make: stopped making "install" in /home/justine/Git/dwlmsg ``` Any help would be very much appreciated. TIA Justine

The problem is that path for wayland-scanner was not outputted by pkg-config.

The problem is that path for wayland-scanner was not outputted by pkg-config.

That Assesment was wrong from me. The issue was bsd bmake not supporting $(shell syntax for executing shell commands and then also not supporting $^ for getting the sources.

That Assesment was wrong from me. The issue was bsd bmake not supporting $(shell syntax for executing shell commands and then also not supporting $^ for getting the sources.

Solved

As I'm on Chimera-Linux which uses bmake ( BSD ) instead of GNU make this caused issues.
With the help of @Rutherther I have finally got it to work using the following modified Makefile

Solved As I'm on Chimera-Linux which uses `bmake` ( BSD ) instead of GNU `make` this caused issues. With the help of @Rutherther I have finally got it to work using the following modified [`Makefile`](https://paste.sr.ht/~justinesmithies/8ce0e666133beaaf8180eb3158af4b352cc2edd5)
JustineSmithies changed title from (削除) Help building required (削除ここまで) to [ Solved ] Help building required 2024年07月25日 19:46:23 +02:00

thanks, I've integrated your modifications into the latest commit

thanks, I've integrated your modifications into the latest commit

Just noticed another issue with the Makefile . So far I have been only installing it locally as I was testing it's use first.
But just went to run doas make clean install and it fails on the install for me on Chimera Linux ( BSD userland tools ).
To fix it I replaced the line as follows:

BINS = dwlmsg
PREFIX ?= /usr/local
CFLAGS += -Wall -Wextra -Wno-unused-parameter
all: $(BINS)
clean:
	rm -f $(BINS) *.o *-protocol.*
install: all
	# install -D -t $(PREFIX)/bin $(BINS)
	cp -f $(BINS) $(PREFIX)/bin/
WAYLAND_PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols`
WAYLAND_SCANNER = `pkg-config --variable=wayland_scanner wayland-scanner`
dwlmsg: dwlmsg.o dwl-ipc-unstable-v2-protocol.o
	$(CC) dwlmsg.o dwl-ipc-unstable-v2-protocol.o -lwayland-client -o $@
dwlmsg.o: dwlmsg.c dwl-ipc-unstable-v2-protocol.h
dwl-ipc-unstable-v2-protocol.h:
	$(WAYLAND_SCANNER) client-header \
		protocols/dwl-ipc-unstable-v2.xml $@
dwl-ipc-unstable-v2-protocol.c:
	$(WAYLAND_SCANNER) private-code \
		protocols/dwl-ipc-unstable-v2.xml $@
Just noticed another issue with the `Makefile` . So far I have been only installing it locally as I was testing it's use first. But just went to run `doas make clean install` and it fails on the `install` for me on Chimera Linux ( BSD userland tools ). To fix it I replaced the line as follows: ``` BINS = dwlmsg PREFIX ?= /usr/local CFLAGS += -Wall -Wextra -Wno-unused-parameter all: $(BINS) clean: rm -f $(BINS) *.o *-protocol.* install: all # install -D -t $(PREFIX)/bin $(BINS) cp -f $(BINS) $(PREFIX)/bin/ WAYLAND_PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols` WAYLAND_SCANNER = `pkg-config --variable=wayland_scanner wayland-scanner` dwlmsg: dwlmsg.o dwl-ipc-unstable-v2-protocol.o $(CC) dwlmsg.o dwl-ipc-unstable-v2-protocol.o -lwayland-client -o $@ dwlmsg.o: dwlmsg.c dwl-ipc-unstable-v2-protocol.h dwl-ipc-unstable-v2-protocol.h: $(WAYLAND_SCANNER) client-header \ protocols/dwl-ipc-unstable-v2.xml $@ dwl-ipc-unstable-v2-protocol.c: $(WAYLAND_SCANNER) private-code \ protocols/dwl-ipc-unstable-v2.xml $@ ```

What is the error on install?

What is the error on `install`?

install: /usr/local/bin/: is not a regular file

Also the -t option doesn't exist on a BSD setup so took a look at other GNU / BSD Makefiles and figured cp -f was the best option.

`install: /usr/local/bin/: is not a regular file` Also the `-t` option doesn't exist on a BSD setup so took a look at other GNU / BSD Makefiles and figured `cp -f` was the best option.

does your version of cp support -t?

does your version of `cp` support `-t`?
https://man.freebsd.org/cgi/man.cgi?query=cp nope, nevermind

pushed the change, thanks again

pushed the change, thanks again
Sign in to join this conversation.
No Branch/Tag specified
main
gap
pid
dynarr
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
notchoc/dwlmsg#1
Reference in a new issue
notchoc/dwlmsg
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?