← Back to team overview

maria-developers team mailing list archive

Re: MariaDB v10 on AIX

 

Hi, REIX,!

On Aug 30, REIX, Tony wrote:
> 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.

This should've been done automatically. See config.h.cmake, it has

  /* Define to `__inline__' or `__inline' if that's what the C compiler calls
   it, or to nothing if 'inline' is not supported under any name.  */
  #cmakedefine C_HAS_inline 1
  #if !(C_HAS_inline)
  #ifndef __cplusplus
  # define inline @C_INLINE@
  #endif
  #endif

and @C_INLINE@ should've been __inline in your case

> 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).

because the variable AIX is not defined in our cmakefiles.
If you grep for AIX, you'll see the following test:

  IF(CMAKE_SYSTEM_NAME STREQUAL "AIX")

I hope it'll work for you.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


References