Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: error: undefined symbol: #1

Closed
ericbsd opened this issue Jan 7, 2022 · 1 comment
Closed

ld: error: undefined symbol: #1

ericbsd opened this issue Jan 7, 2022 · 1 comment

Comments

@ericbsd
Copy link

ericbsd commented Jan 7, 2022

I fix the error below, but it still failed.

echo pam_helper.full: /usr/lib/libc.a /usr/lib/libpam.a >> .depend
Warning: Object directory not changed from original /usr/home/ericbsd/Desktop/bsd-pam-helper-1.2
cc  -O2 -pipe   -g -MD  -MF.depend.pam_helper.o -MTpam_helper.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/12.0.1/include -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable  -Qunused-arguments    -c pam_helper.c -o pam_helper.o
pam_helper.c:93:18: error: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
                        if (num_write != msg_len) {
                            ~~~~~~~~~ ^  ~~~~~~~
pam_helper.c:116:17: error: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
                        if (num_read == msg_len)
                            ~~~~~~~~ ^  ~~~~~~~
2 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/ericbsd/Desktop/bsd-pam-helper-1.2 

Something is wrong with pam_start, pam_authenticate, pam_acct_mgmt, pam_setcred and pam_end

rm -f .depend
echo pam_helper.full: /usr/lib/libc.a /usr/lib/libpam.a >> .depend
Warning: Object directory not changed from original /usr/home/ericbsd/Desktop/bsd-pam-helper-1.2
cc  -O2 -pipe   -g -MD  -MF.depend.pam_helper.o -MTpam_helper.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/12.0.1/include -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable  -Qunused-arguments    -c pam_helper.c -o pam_helper.o
cc -O2 -pipe -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/12.0.1/include -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments    -o pam_helper.full pam_helper.o   
ld: error: undefined symbol: pam_start
>>> referenced by pam_helper.c:141
>>>               pam_helper.o:(main)

ld: error: undefined symbol: pam_authenticate
>>> referenced by pam_helper.c:149
>>>               pam_helper.o:(main)

ld: error: undefined symbol: pam_acct_mgmt
>>> referenced by pam_helper.c:153
>>>               pam_helper.o:(main)

ld: error: undefined symbol: pam_setcred
>>> referenced by pam_helper.c:154
>>>               pam_helper.o:(main)

ld: error: undefined symbol: pam_end
>>> referenced by pam_helper.c:164
>>>               pam_helper.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped in /usr/home/ericbsd/Desktop/bsd-pam-helper-1.2

I looked at the manual for it and it should be working unless there is something missing.
Here is the pam_start manual https://www.freebsd.org/cgi/man.cgi?query=pam_start&sektion=3&apropos=0&manpath=FreeBSD+13.0-RELEASE+and+Ports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant