← Back to team overview

maria-developers team mailing list archive

Re: MariaDB 10.3.7 and GSSAPI : Issue

 

Hi Tony,

First off, MariaDB has a bug tracker, under  https://jira.mariadb.org/ . I can reassure you that the bugs reported there are read attentively, and that you can attach full output there, and that people who are not interested in AIX won’t get spammed.

Would it be possible to state the actual problem that you ran into? I doubt that you wanted to run cmake . –trace –debug-trycompile and have 0 errors in system checks. Thus, I’m going to assume that auth_gssapi.so or auth_gssapi_client.so did not compile for you , and, with the help of CMake folks, you went on to debug that, and then CMake folks pointed to FindGSSAPI.cmake. Is this accurate description of what happened?
 
I should describe how FindGSSAPI.cmake came into existence.   FindGSSAPI.cmake is exact copy from KDE project https://github.com/KDE/kio/blob/master/cmake/FindGSSAPI.cmake   (CMAke itself lacks FIND_PACKAGE(GSSAPI), so I googled around if someone already has it, and KDE had) . And it happens to work, for KDE, and least sometimes, for us, on non-AIX platforms. Take a look at the output of  buildbot run on Debian artful for example https://buildbot.askmonty.org/buildbot/builders/kvm-deb-artful-amd64/builds/1335/steps/compile/logs/stdio . You’ll see krb5_free_unparsed_name is found, and gssapi plugin(s) are built alright.

However, CMake folks could have a point, that target_link_libraries should be CMake list, not space separated string.

Maybe you can try to add 
separate_arguments(GSSAPI_LIBS)

on the line 57 of FindGSSAPI.cmake, and see if that works better for you. 

Wlad

From: REIX, Tony
Sent: Monday, June 25, 2018 11:14 AM
To: maria-developers@xxxxxxxxxxxxxxxxxxx
Cc: APEKE, SENA (ext)
Subject: [Maria-developers] MariaDB 10.3.7 and GSSAPI : Issue

Hi,

We are porting MariaDB (10.3.7 now) on AIX.

On some machines we have the following error message when running:

+ cmake . --trace --debug-trycompile --check-system-vars -GUnix Makefiles -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DINSTALL_LAYOUT=RPM -DLOG_LOCATION=/opt/freeware/mariadb/mariadb.log -DPID_FILE_DIR=%{_rundir}/mariadb -DNICE_PROJECT_NAME=MariaDB -DCMAKE_INSTALL_PREFIX=/opt/freeware -DCMAKE_AR=/usr/bin/ar -DCMAKE_SYSTEM_NAME=AIX -DINSTALL_SYSCONFDIR=/opt/freeware/etc -DINSTALL_SYSCONF2DIR=/opt/freeware/etc/my.cnf.d -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_LIBDIR=/opt/freeware/lib64 -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_PLUGINDIR=/opt/freeware/lib64/mariadb/plugin -DINSTALL_MYSQLTESTDIR=share/mysql-test -DINSTALL_SBINDIR=libexec -DINSTALL_SCRIPTDIR=bin -DINSTALL_SQLBENCHDIR=share -DINSTALL_SUPPORTFILESDIR=share/mariadb -DMYSQL_DATADIR=/opt/freeware/var/lib/mysql -DMYSQL_UNIX_ADDR=/var/lib64/mysql/mysql.sock -DTMPDIR=/var/tmp -DENABLED_LOCAL_INFILE=ON -DSECURITY_HARDENED=ON -DENABLE_DTRACE=ON -DWITH_EMBEDDED_SERVER=ON -DWITH_MARIABACKUP=ON -DWITH_UNIT_TESTS=ON -DCONC_WITH_SSL=ON -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_JEMALLOC=no -DPLUGIN_MROONGA=DYNAMIC -DPLUGIN_OQGRAPH=DYNAMIC -DPLUGIN_CRACKLIB_PASSWORD_CHECK=DYNAMIC -DPLUGIN_ROCKSDB=DYNAMIC -DPLUGIN_SPHINX=DYNAMIC -DPLUGIN_TOKUDB=DYNAMIC -DPLUGIN_CONNECT=DYNAMIC -DCONNECT_WITH_MONGO=OFF -DCONNECT_WITH_JDBC=OFF -DCMAKE_CROSSCOMPILING=FALSE -DWITH_VALGRIND=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON
......
/opt/freeware/share/cmake/Modules/CheckSymbolExists.cmake(87):  try_compile(HAVE_KRB5_FREE_UNPARSED_NAME ${CMAKE_BINARY_DIR} /opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${CHECK_SYMBOL_EXISTS_LIBS} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} ${CMAKE_SYMBOL_EXISTS_INCLUDES} OUTPUT_VARIABLE OUTPUT )

CMake Error at /opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:14 (add_executable):
  Target "cmTC_3efe0" links to target "-L/opt/freeware/lib
  -blibpath:/opt/freeware/lib::/usr/lib:/lib -I/usr/include
  -I/opt/freeware/include -L/opt/freeware/lib
  -blibpath:/opt/freeware/lib:/usr/lib:/lib -bmaxdata:0x80000000 -brtl
  -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at /opt/freeware/share/cmake/Modules/CheckSymbolExists.cmake:87 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  /opt/freeware/share/cmake/Modules/CheckCXXSymbolExists.cmake:39 (__CHECK_SYMBOL_EXISTS_IMPL)
  plugin/auth_gssapi/CMakeLists.txt:24 (CHECK_CXX_SYMBOL_EXISTS)

In file:  mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt   , there is:
 cmake_minimum_required(VERSION 3.11.4.0)
 set(CMAKE_MODULE_PATH "/opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/cmake;/opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/plugin/auth_gssapi/cmake")
 project(CMAKE_TRY_COMPILE CXX)
 set(CMAKE_VERBOSE_MAKEFILE 1)
 set(CMAKE_CXX_FLAGS " -pie -fPIC -fPIC -fno-rtti")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_DEFINITIONS}")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXE_LINKER_FLAGS}")
 include_directories(${INCLUDE_DIRECTORIES})
 set(CMAKE_SUPPRESS_REGENERATION 1)
 link_directories(${LINK_DIRECTORIES})
 add_definitions(-DPACKAGE=test -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS)
 cmake_policy(SET CMP0065 OLD)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "/opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp")
 add_executable(cmTC_3efe0 "/opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx")
 target_link_libraries(cmTC_3efe0  "-L/opt/freeware/lib -blibpath:/opt/freeware/lib::/usr/lib:/lib -I/usr/include -I/opt/freeware/include -L/opt/freeware/lib -blibpath:/opt/freeware/lib:/usr/lib:/lib -bmaxdata:0x80000000 -brtl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" )
 
Talking with CMake guys, they said:

> I suspect mariadb's source is setting CMAKE_REQUIRED_LIBRARIES
> to a space-separated value instead of a ;-separated value.

> That's broken here: 
https://github.com/MariaDB/server/blob/ed0b84a0270bd99b001dd00654875d26e29b9432/plugin/auth_gssapi/cmake/FindGSSAPI.cmake#L56
Do you have an idea about what is broken and what should be changed? either on AIX or for all target?

Thanks/Regards,

Cordialement,

Tony Reix

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net


Follow ups

References