An error occurred while compiling pam_mysql.so.

Source: Internet
Author: User
An error occurred while compiling pam_mysql.so -- Linux Enterprise Application-Linux server application information. For more information, see. When using vsftp to implement mysql-based virtual users, the following error occurs when compiling the mysql verification module:
[Root @ localhost pam_mysql] # make
Mkdir-p./dynamic
Gcc-O2-Dlinux-DLINUX_PAM-ansi-D_POSIX_SOURCE-Wall-Wwrite-strings-Wpointer-arith-Wcast-qual-Wcast-align-Wtraditional-Wstrict-prototypes-Wmissing-prototypes- wnested-externs-Winline-Wshadow-pedantic-fPIC-I/usr/local/mysql/include/mysql-DPAM_DYNAMIC-c pam_mysql.c-o dynamic/pam_mysql.o
Pam_mysql.c: 35: 25: Error: mysql/mysql. h: the file or directory does not exist.
Pam_mysql.c: 81: Error: expected '=', ';', 'asm 'or' _ attribute _ 'before' * 'token
Pam_mysql.c: 141: Error: expected ') 'before' *' token
Pam_mysql.c: 143: Error: expected ') 'before' *' token
Pam_mysql.c: 151: Error: expected ') 'before' *' token
Pam_mysql.c: In the 'breakargs 'function:
Pam_mysql.c: 157: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: In the 'parseargs 'function:
Pam_mysql.c: 233: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: At the top layer:
Pam_mysql.c: 391: Error: expected ') 'before' *' token
Pam_mysql.c: In the 'db _ close' function:
Pam_mysql.c: 420: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: 421: Error: 'mysql _ auth' is not declared (used for the first time in this function)
Pam_mysql.c: 421: Error: (even if it appears multiple times in a function, each undeclared identifier
Pam_mysql.c: 421: Error: only one report is reported in the function .)
Pam_mysql.c: 424: Warning: Implicit declaration function 'mysql _ close'
Pam_mysql.c: 424: Warning: External declaration of nesting 'mysql _ close'
Pam_mysql.c: At the top layer:
Pam_mysql.c: 428: Error: expected ') 'before' *' token
Pam_mysql.c: In the 'converse' function:
Pam_mysql.c: 613: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: 617: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: In the 'salance' function:
Pam_mysql.c: 636: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: At the top layer:
Pam_mysql.c: 673: Error: expected ') 'before' *' token
Pam_mysql.c: In the 'askforpassword' function:
Pam_mysql.c: 800: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: At the top layer:
Pam_mysql.c: 839: Error: expected ') 'before' *' token
Pam_mysql.c: In the 'pam _ sm_authenticate 'function:
Pam_mysql.c: 982: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: 989: Error: 'mysql' is not declared (used for the first time in this function)
Pam_mysql.c: 989: Error: expected '; 'before' auth _ SQL _server'
Pam_mysql.c: 1009: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1014: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1019: Warning: Implicit declaration function 'db _ connection'
Pam_mysql.c: 1019: Warning: External declaration of nested 'db _ connect'
Pam_mysql.c: 1019: Error: 'auth _ SQL _server 'is not declared (used for the first time in this function)
Pam_mysql.c: 1027: Warning: Implicit declaration function 'db _ checkpasswd'
Pam_mysql.c: 1027: Warning: External declaration of nested 'db _ checkpasswd'
Pam_mysql.c: In the 'pam _ sm_acct_mgmt 'function:
Pam_mysql.c: 1047: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: In the 'pam _ sm_setcred 'function:
Pam_mysql.c: 1057: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: In the 'pam _ sm_chauthtok 'function:
Pam_mysql.c: 1069: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: 1077: Error: 'mysql' is not declared (used for the first time in this function)
Pam_mysql.c: 1077: Error: expected '; 'before' auth _ SQL _server'
Pam_mysql.c: 1100: Error: 'auth _ SQL _server 'is not declared (used for the first time in this function)
Pam_mysql.c: 1113: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1120: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1147: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1158: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1173: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1180: Warning: leading type dual-off pointers will corrupt the strong overlap rules
Pam_mysql.c: 1187: Warning: Implicit declaration function 'updatepasswd'
Pam_mysql.c: 1187: Warning: External declaration of 'updatepasswd' nesting
Pam_mysql.c: In the 'pam _ sm_open_session 'function:
Pam_mysql.c: 1201: Warning: traditional C does not accept iso c-style function definitions.
Pam_mysql.c: In the 'pam _ sm_close_session 'function:
Pam_mysql.c: 1211: Warning: traditional C does not accept iso c-style function definitions.
Make: *** [dynamic/pam_mysql.o] Error 1

The following is part of the modified Makefile file (the red part is the path of the c header file to be modified and the path of the library file ):
# Convenient defaults for compiling independently of the full source
# Tree.
Ifndef FULL_LINUX_PAM_SOURCE_TREE
Export DYNAMIC =-DPAM_DYNAMIC
Export CC = gcc
Export CFLAGS =-O2-Dlinux-DLINUX_PAM \
-Ansi-D_POSIX_SOURCE-Wall-Wwrite-strings \
-Wpointer-arith-Wcast-qual-Wcast-align-Wtraditional \
-Wstrict-prototypes-Wmissing-prototypes-Wnested-externs-Winline \
-Wshadow-pedantic-fPIC-I/usr/local/mysql/include/mysql
Export MKDIR = mkdir-p
Export LD_D = gcc-shared-Xlinker-x-L/usr/local/mysql/lib/mysql-lz
Endif

I installed mysql in the source code. The above C header file path and library file path are confirmed to be correct. However, Errors still occur during compilation and are depressing. Please help me.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.