Compiler warnings in the PAM plugin on non-Linux systems

Bug #1008040 reported by Michael
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Triaged
Low
Unassigned
5.6
New
Low
Unassigned
5.7
New
Low
Unassigned

Bug Description

...
[ 90%] Building C object plugin/percona-pam-for-mysql/CMakeFiles/auth_pam.dir/src/auth_pam_common.c.o
In file included from /home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:22:
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.h:34:31: error: security/pam_misc.h: No such file or directory
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c: In function 'authenticate_user_with_pam_server':
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:118: warning: implicit declaration of function 'strcpy'
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:118: warning: incompatible implicit declaration of built-in function 'strcpy'
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:169: warning: implicit declaration of function 'strcmp'
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:171: warning: implicit declaration of function 'strncpy'
/home/testuser/Percona-Server-5.5.24-rel26.0/plugin/percona-pam-for-mysql/src/auth_pam_common.c:171: warning: incompatible implicit declaration of built-in function 'strncpy'
*** Error code 1

Stop in /var/home/testuser/Percona-Server-5.5.24-rel26.0.
*** Error code 1

Stop in /var/home/testuser/Percona-Server-5.5.24-rel26.0.
*** Error code 1

Stop in /var/home/testuser/Percona-Server-5.5.24-rel26.0.

See attach for full compilation log.

Tags: mac pam
Revision history for this message
Michael (l6-po4tmaste8-qh) wrote :
Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 1008040] [NEW] Compilation error

On Sun, 03 Jun 2012 07:26:39 -0000, Michael <email address hidden> wrote:
> auth_pam_common.h:34:31: error: security/pam_misc.h: No such file or
> directory

What OS are you building on? Also, do you have the PAM library headers installed?

--
Stewart Smith

Revision history for this message
Michael (l6-po4tmaste8-qh) wrote : Re: Compilation error

>uname -a
FreeBSD office.softsearch.ru 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 <email address hidden>:/usr/obj/usr/src/sys/GENERIC amd64

PAM library headers: /usr/include/security/openpam.h

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Unfortunately, FreeBSD is not one of our supported platforms currently. But we will consider any patches that either disable PAM for PS when the headers are not found, either add FreeBSD support for PAM.

summary: - Compilation error
+ Build fails on FreeBSD due to missing PAM support
Revision history for this message
Michael (l6-po4tmaste8-qh) wrote : Re: Build fails on FreeBSD due to missing PAM support

Ok.
Can you look at the percona.txt and fix all compilation warnings?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

What C and C++ flags do you use for builds? Can you check if these warnings are present if you build MySQL 5.5.24 with the same flags on the same system? For the Percona Server-specific warnings, please submit a new bug report. For the warnings shared with MySQL please submit a bug report to bugs.mysql.com (after checking if it's already been reported). Thank you.

Revision history for this message
Michael (l6-po4tmaste8-qh) wrote :

I use default C and C++ flags.
I checked warnings for MySQL 5.5.25 (i did no find MySQL 5.5.24? sorry). This is Percona Server-specific warnings:

/home/testuser/Percona-Server-5.5.24-rel26.0/sql/sql_select.cc:17561: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/testuser/Percona-Server-5.5.24-rel26.0/sql/sql_select.cc:17570: warning: dereferencing type-punned pointer will break strict-aliasing rules

Revision history for this message
Alexey Kopytov (akopytov) wrote :

I get the same "implicit declaration" warnings on OSX too. The reason I did not see them before is that the PAM plugin was not being built due to bug #1012498.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

The original report (build failure due to missing PAM support) is a duplicate of bug #1012488. Let's keep this bug as a report about warnings?

summary: - Build fails on FreeBSD due to missing PAM support
+ Compiler warnings in the PAM plugin on non-Linux systems
tags: added: pam
tags: added: mac
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1919

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.