I am using cmake (3.22.1) to compile tigervnc (1.13.0) from source on Ubuntu (22.04LTS). I have met all dependencies but one.
My build fails with the error: "Could not find PAM development files". I installed the package libpam0g-dev, and I know for a fact that the PAM development files in question are located here: /usr/include/security/pam_appl.h.
How can I get CMake to find the files? Any help will be greatly appreciated. Thanks!
Determining if files security/pam_appl.h exist failed with the following output:
Change Dir: /usr/local/src/tigervnc/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_da0c0/fast && /usr/bin/gmake -f CMakeFiles/cmTC_da0c0.dir/build.make CMakeFiles/cmTC_da0c0.dir/build
gmake[1]: Entering directory '/usr/local/src/tigervnc/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_da0c0.dir/HAVE_PAM_H.c.o
/usr/bin/cc -std=gnu99 -Wall -Wextra -Wformat=2 -Wvla -o CMakeFiles/cmTC_da0c0.dir/HAVE_PAM_H.c.o -c /usr/local/src/tigervnc/CMakeFiles/CheckIncludeFiles/HAVE_PAM_H.c
/usr/local/src/tigervnc/CMakeFiles/CheckIncludeFiles/HAVE_PAM_H.c:2:10: fatal error: security/pam_appl.h: No such file or directory
2 | #include <security/pam_appl.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTC_da0c0.dir/build.make:78: CMakeFiles/cmTC_da0c0.dir/HAVE_PAM_H.c.o] Error 1
gmake[1]: Leaving directory '/usr/local/src/tigervnc/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_da0c0/fast] Error 2
Source:
/* */
#include <security/pam_appl.h>
int main(void){return 0;}
Determining if the function pam_start exists failed with the following output:
Change Dir: /usr/local/src/tigervnc/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_4a751/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4a751.dir/build.make CMakeFiles/cmTC_4a751.dir/build
gmake[1]: Entering directory '/usr/local/src/tigervnc/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4a751.dir/CheckFunctionExists.c.o
/usr/bin/cc -std=gnu99 -Wall -Wextra -Wformat=2 -Wvla -DCHECK_FUNCTION_EXISTS=pam_start -o CMakeFiles/cmTC_4a751.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c
Linking C executable cmTC_4a751
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4a751.dir/link.txt --verbose=1
/usr/bin/cc -std=gnu99 -Wall -Wextra -Wformat=2 -Wvla -DCHECK_FUNCTION_EXISTS=pam_start CMakeFiles/cmTC_4a751.dir/CheckFunctionExists.c.o -o cmTC_4a751 -lpam
/usr/bin/ld: cannot find -lpam: No such file or directory
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_4a751.dir/build.make:99: cmTC_4a751] Error 1
gmake[1]: Leaving directory '/usr/local/src/tigervnc/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_4a751/fast] Error 2