File tree Expand file tree Collapse file tree
tests/test-recipes/metadata/cdt_linking Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33set -x
44
55# Simple test that CDT packages can be linked
6- # Compile a minimal program that links against X11 from CDT packages
7- echo -e " #include <X11/Xlib.h>\nint main() { Display *d = XOpenDisplay(NULL); if (d) XCloseDisplay(d); return 0; }" > x11_test.c
8- ${CC} -o ${PREFIX} /bin/links-to-x11-cdt -x c -I${PREFIX} /include -L${PREFIX} /lib -lX11 -lxcb -Wl,-rpath-link,${PREFIX} /lib x11_test.c
9- find ${PREFIX} -name " libX11*"
6+ # Compile a minimal program that links against PAM and libselinux from CDT packages
7+ cat > cdt_test.c << 'EOF '
8+ #include <stddef.h>
9+ #include <security/pam_appl.h>
10+ #include <selinux/selinux.h>
11+
12+ int main() {
13+ // Test PAM - just check that the header is available
14+ const char *pam_strerror_result = pam_strerror(NULL, 0);
15+ (void)pam_strerror_result; // Suppress unused variable warning
16+
17+ // Test libselinux - check if SELinux is enabled
18+ int selinux_enabled = is_selinux_enabled();
19+ (void)selinux_enabled; // Suppress unused variable warning
20+
21+ return 0;
22+ }
23+ EOF
24+
25+ ${CC} -o ${PREFIX} /bin/links-to-cdt -I${PREFIX} /include -L${PREFIX} /lib \
26+ -lpam -lselinux -Wl,-rpath-link,${PREFIX} /lib cdt_test.c
27+
28+ # Verify the libraries are present
29+ find ${PREFIX} -name " libpam*"
30+ find ${PREFIX} -name " libselinux*"
1031find ${PREFIX} -name " libc.so*"
Original file line number Diff line number Diff line change 1- channel_sources :
2- - conda-forge
3- channel_targets :
4- - conda-forge main
5-
61cdt_name : # [linux]
7- - conda # [linux]
2+ - el8 # [linux]
Original file line number Diff line number Diff line change @@ -10,17 +10,5 @@ build:
1010requirements :
1111 build :
1212 - {{ compiler('c') }}
13- - pkg-config
14- - {{ cdt('libxcb') }}
13+ - {{ cdt('pam-devel') }}
1514 - {{ cdt('libselinux-devel') }}
16- - {{ cdt('libxi-devel') }}
17- - {{ cdt('libx11-devel') }}
18- - {{ cdt('libxau-devel') }}
19- - {{ cdt('libxext-devel') }}
20- - {{ cdt('libxfixes-devel') }}
21- - {{ cdt('mesa-libgl-devel') }}
22- - {{ cdt('xorg-x11-proto-devel') }}
23- - {{ cdt('mesa-dri-drivers') }}
24- - {{ cdt('libxdamage-devel') }}
25- - {{ cdt('libxxf86vm') }}
26- - expat
You can’t perform that action at this time.
0 commit comments