adwm

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

adwm

#1 Post by musher0 »

Hello all.

Cont'd from a post by williams2, here, so as not to burden that thread.

@williams2:
This is the error I got at the end of the < make >:
libtool: [7m[31merror[0m: [1mcannot find the library 'adwm-adwm.la' or unhandled argument 'adwm-adwm.la'[0m
make[2]: *** [Makefile:808: adwm] Error 1
make[1]: *** [Makefile:618: all] Error 2
make: *** [Makefile:462: all-recursive] Error 1
Any ideas?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

ITSMERSH

#2 Post by ITSMERSH »

This should be in Compiling section.

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#3 Post by williams2 »

I had problems getting it to compile. It did not know what reallocarry was. reallocarray is a BSD extension to C. It is available as a GNU C (C++?) extension (on newer versions of gcc,) but the extensions are not enabled by default. This line is in configure.ac:

AC_USE_SYSTEM_EXTENSIONS

and it should enable the GNU extensions, but it wasn't. So I tried putting

CPPFLAGS="-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE"

in configure.sh. That seemed to work. I think. I'm not sure how I got it to compile. And now I can compile it without changing anything in the source. I don't know why. Confusing.

I can compile it in bionicpup64-7.9.7. I can not compile it in xenialpup64-7.5, maybe it is too old.

After compiling and installing I have:

adwm-adwm.la 946 bytes
adwm-adwm.so 154k (43k stripped)

in /usr/lib/adwm/modules/

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

Thanks, williams2.

I have edited configure.sh as you suggested, but no luck.
Maybe later, then.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#5 Post by williams2 »

Maybe if you set the preprocessor flag to a value, like:

CPPFLAGS="-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE=2"

I think CPPFLAGS was the only thing I changed to get it to compile.

I remember "cannot find the library 'adwm-adwm.la'", I think. I don't think it needs to be preinstalled. I'll attach it anyway.
Attachments
adwm-adwmlib.tar.gz
(14.11 KiB) Downloaded 289 times

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#6 Post by williams2 »

Ok, maybe I have this figured out.

I think you need the CPPFLAGS trick to get it to compile the first time. Or not.

After it compiles, the first time, make stops with an error message:

... make: *** [Makefile:462: all-recursive] Error 1

But if you look in hidden dir ./src/.lib (something like that) you can see the adwm executable and lib files. It did compile, and this should work:

make install

Then if you run make again, it completes with no error message.

I think that is what is happening.

I found adwm crashes sometimes, so I wrote a script to start it.

If you read the docs, there are statments that are not true. Particularly the key assignments. It's better to look at the keysrc file to see how the keys are setup.

I found it easier to read the man pages from the command line. I wrote my own man script. pman is supposed to work, but i wrote my own. My Puppy does not have col so I used sed to get rid of the BS characters. Like this:

Code: Select all

nroff -mandoc "$f" | sed 's/.\x08//g' | less

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Hi williams2.

Thanks a lot for this valuable info about compiling adwm. I will give it a try a little later.
Would you have a couple of screen captures of adwm, by any chance?

Precious one-liner you have there, to read the man pages! IMO, it deserves its own
thread. Users need something like this, I think. There is man2html, but the result is
not as direct.

Have a great day!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#8 Post by Keef »

I tried to compile this on Easy but it wouldn't work.
Did find a solution though, after a bit of searching. Seems like reallocarray won't work on older glibc. Someone made a workaround for some other project, so I nicked it and pasted it into adwm.c :

Code: Select all

/**
 * Allow libapparmor to build on older glibcs and other libcs that do
 * not support reallocarray.
 */
#ifndef HAVE_REALLOCARRY
void *reallocarray(void *ptr, size_t nmemb, size_t size)
{
	return realloc(ptr, nmemb * size);
}
#endif
Got it from here
Not tried the binary yet, but at least it exists.
[EDIT] It does run. Been a bit too lazy to read the manual yet, but found I needed to press the Alt key to get focus of a window with the mouse, and do other actions. A bit hit and miss at the moment.
Screenshot is not very interesting:
Attachments
adwm.jpg
(43.73 KiB) Downloaded 419 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#9 Post by musher0 »

Thanks, Keef.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#10 Post by williams2 »

one-liner you have there, to read the man pages
Actually, you don't need sed to read a man page, less can handle BS (backspace) characters. Sed is really for man 2 txt. So this is fine:

Code: Select all

nroff -mandoc "$f" | less
Attachments
adwm1.png
adwm with 8 windows automatically tiled.
(162.27 KiB) Downloaded 399 times

Post Reply