mcdope/pam_usb

Compiling from source fails | Fedora

Ricky-Tigg opened this issue · 3 comments

Which version of pam_usb are you running?

none yet

Which distribution are you using?

Fedora desktop, edition 39

Which login manager and desktop environment are you using?

GDM and Gnome, both v.45.0.1

What happened?

Hello. Thank you for keeping alive the original project. My installation command here is up-to-date; thus are taken in account preinstalled components that come with a default Fedora Desktop installation disk image; you might be willing to update the related command at https://github.com/mcdope/pam_usb/wiki/Install#requirements-for-compiling-from-source-fedora-based.

$ sudo dnf -y install make {glib2,libudisks2,libxml2,pam}-devel
$ dnf rq --installed --qf '%{name} v.%{version}' make {glib2,libudisks2,libxml2,pam}-devel
glib2-devel v.2.78.0
libudisks2-devel v.2.10.1
libxml2-devel v.2.10.4
make v.4.4.1
pam-devel v.1.5.3

I suppose that it is the repository of the last stable release version that is being cloned as result of the execution of the next command. I concluded it by noting the nightly release is not mentioned in the ChangeLog file.

$ git clone https://github.com/mcdope/pam_usb.git && cd pam_usb/

Time to make.

$ make
gzip -kf ./doc/*.1
gcc -c -Wall -fPIC `pkg-config --cflags libxml-2.0` `pkg-config --cflags udisks2` src/conf.c -o src/conf.o
/bin/sh: line 1: gcc: command not found
make: *** [Makefile:98: src/conf.o] Error 127

On Fedora, the name of the component that holds a GCC shared support library is libgcc not gcc.

$ dnf rq --installed --qf '%{name} v.%{version} | %{summary}' *gcc
libgcc v.13.2.1 | GCC version 13 shared support library
$ rpm -ql libgcc | grep ^/lib64
/lib64/libgcc_s-13-20230918.so.1
/lib64/libgcc_s.so.1

Output of "pamusb-check --debug whoami"

_not relevant yet_

Output of "w"

_not relevant yet_

Output of "loginctl"

_not relevant yet_
mcdope commented

I'm not sure what exactly you're reporting here. Please add more details and description.

The gcc call is correct as it is, as you can see at https://github.com/mcdope/pam_usb/actions/runs/6582156709/job/17883246669 - Fedora builds work just fine. Also no clue why you mention libgcc, as it has no relation at all to this.

No surprise as stated in this output that we won't get this program compiled.

$ rpm -qi gcc | tail -1
You'll need this package in order to compile C code.

Then as cause of the failure was nothing but a partial instruction. I should have thought of that. So, needed mentions were the make and gcc packages. Only after that can the installation be successful and the application operational.

$ pamusb-conf -h | head -1
Version 0.8.3
mcdope commented