Hi,

We are porting MariaDB v10(.3.7/9) on AIX now.

First, I'd like to know if there are people porting (or who has ported) MariaDB on AIX in this mailing list.

Second, we have found some issue dealing with: AIX, -O0, and inline, which leads to a symbol missing at link time: my_ulonglong2double .
It deals with the code below.

Since we are beginners with MariaDB, I'd like to have some comments and/or recommendations about how it should be fixed.

By using "static __inline" instead of "inline" below, and adding it too to the  ma_global.h  definition of  my_ulonglong2double() , we are able to fix it.

However, probably that using:
    #define my_ulonglong2double(nr) ((double) nr)
would be enough.
Or adding my_port.c to the MYSYS_SOURCES variable in mysys/CMakeLists.txt would help:
 
   IF (AIX)
     SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_port.c)
   ENDIF()
however, that does not work, and I do not see my_port.c being added to the list of files to be added to mysys.

Any idea why "IF (AIX)" does not work? (I'm also a CMake beginner).


Thanks/Regards,


Tony Reix


mysys/my_port.c:
  #include "mysys_priv.h"
   #ifdef _AIX
   double my_ulonglong2double(unsigned long long nr) { return (double) nr; }
mysys/mysys_priv.h:
   #include <my_global.h>
mysys/CMakeLists.txt :
   SET(MYSYS_SOURCES  ........  No my_port.c !!
include/my_global.h:
  #ifdef _AIX                     /* By soren@t.dk */
  #define ulonglong2double(A) my_ulonglong2double(A)
  C_MODE_START
  inline double my_ulonglong2double(unsigned long long A) { return (double)A; }
  C_MODE_END

libmariadb/include/ma_global.h:
  #ifdef _AIX                     /* By soren@t.dk */
  #define ulonglong2double(A) my_ulonglong2double(A)
  #ifdef  __cplusplus
  extern "C" {
  #endif
  double my_ulonglong2double(unsigned long long A);    déclaration externe
  #ifdef  __cplusplus


Cordialement,

Tony Reix

tony.reix@atos.net

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