[MDEV-20258] Build failure in pam_mariadb_mtr Created: 2019-08-05  Updated: 2019-09-02  Resolved: 2019-09-02

Status: Closed
Project: MariaDB Server
Component/s: Plugin - pam
Affects Version/s: 10.4.7
Fix Version/s: 10.4.8

Type: Bug Priority: Critical
Reporter: Bernard Spil Assignee: Alexey Botchkov
Resolution: Fixed Votes: 2
Labels: None
Environment:

FreeBSD 12.0
FreeBSD clang version 6.0.1
cmake version 3.14.3


Attachments: Text File pam_mariadb_mtr.c.patch    

 Description   

in plugin/auth_pam/testing

--- plugin/auth_pam/testing/CMakeFiles/pam_mariadb_mtr.dir/all ---
/usr/ports/databases/mariadb104-server/work/mariadb-10.4.7/plugin/auth_pam/testing/pam_mariadb_mtr.c:59:24: error: use of undeclared identifier 'uint'; did you mean 'int'?
    if (strlen(r1) == (uint)atoi(r2) % 100)
                       ^~~~
                       int
/usr/ports/databases/mariadb104-server/work/mariadb-10.4.7/plugin/auth_pam/testing/pam_mariadb_mtr.c:59:23: error: reference to overloaded function could not be resolved; did you mean to call it?
    if (strlen(r1) == (uint)atoi(r2) % 100)
                      ^~~~~~
2 errors generated.



 Comments   
Comment by Chingis [ 2019-08-06 ]

I see the same on Alpine. What's interesting is that this error didn't interrupt compilation but it failed at rocksdb:

[ 28%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/build_version.cc.o
[ 28%] Linking CXX static library librocksdblib.a
[ 28%] Built target rocksdblib
make: *** [Makefile:163: all] Error 2

I've deleted linux-pam-dev package and it helped but now it fails on startup:

+ mysql_install_db --datadir=/var/lib/mysql/ --rpm --auth-root-authentication-method=normal
Cannot change ownership of the '/auth_pam_tool_dir' directory
 to the 'mysql' user. Check that you have the necessary permissions and try again.
chown: /auth_pam_tool_dir: No such file or directory

Comment by Laszlo Soos [ 2019-08-16 ]

A possible proposed patch attached

Generated at Thu Feb 08 08:58:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.