Closed winspool closed 1 year ago
Hi @winspool, thanks for reporting.
Why is -lmagic still required for linking?
If compiled with _NO_MAGIC
, -lmagic
can be dropped altogether:
gcc -D_NO_MAGIC -o clifm src/*.c -lreadline -lcap -lacl
Or, you can use the GNU Makefile:
make -f misc/GNU/Makefile _NO_MAGIC=1
More about this here.
I had to step back to the eighties
With an internet connection, there's no need to go back in time nor to guess anything: just consult the documentation.
However, you're right about autotools
. I'll take a look at it. Thanks for the advice. Feature request added to the TODO list.
cliFM BUG: When the include of "" can be disabled with "_NO_MAGIC",
why is -lmagic still required for linking?
To Reproduce Steps to reproduce the behavior:
I tried a local build of clifm with: PREFIX=$HOME/.local CC=gcc make Build failed:
Why does the project is not checking, if all dependencies are available? Without useful output, I had to step back to the eighties and try to guess the provider for the missing includes.
I installed "libcap-dev" and tried again. Next build failure:
git grep for "magic.h" made "#ifdef _NO_MAGIC" visible.
Next try: Building with: PREFIX=$HOME/.local CC=gcc CFALGS="-D_NO_MAGIC " make
Now compiling works, but linking failed (fault of cliFM):
cliFM BUG: When the include of "" can be disabled with "_NO_MAGIC",
why is -lmagic still required for linking?
Expected behavior
There is no "configure", but a "Makefile". I expect with a "Makefile", that I just can use "make"
"autotools" just work. When a project replaces "autotools", then the replacement has to work.
As an example for a helpful user information from an "autotools" project: (First build of Wine on this recently installed system)
I did know in advance, that some packages where missing, but the project produces so good informations, that i just used the configure output as an overview, which packages i have to install.
cliFM has no information about missing packages at all.
Desktop (please complete the following information):