Re: [cmake-developers] Shared libraries

2018-08-21 Thread REIX, Tony
Hi Chuck,


Thanks for the information.


We launch cmake on MariaDB code with:

   -DBUILD_SHARED_LIBS=true


Moreover, here are the few places in MariaDB code where BUILD_SHARED_LIBS 
appears:

# grep -R BUILD_SHARED_LIBS *
CMakeCache.txt:BUILD_SHARED_LIBS:UNINITIALIZED=true
pcre/CMakeLists.txt:# IF(NOT BUILD_SHARED_LIBS)
pcre/CMakeLists.txt:# ENDIF(NOT BUILD_SHARED_LIBS)
pcre/CMakeLists.txt:#  MESSAGE(STATUS "  Build shared libs ... : 
${BUILD_SHARED_LIBS}")
plugin/aws_key_management/CMakeLists.txt:-DBUILD_SHARED_LIBS=OFF


What does the first line means ?


Thx/Regards,



Cordialement,

Tony Reix

tony.r...@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
www.atos.net<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>



De : Chuck Atkins 
Envoyé : mardi 21 août 2018 18:02
À : REIX, Tony
Cc : CMake Developers
Objet : Re: [cmake-developers] Shared libraries

Hi Tony,

I expect what your seeing is likely the result of how MaraiaDBhas specifically 
implemented their CMake build.  The only builtin CMake variable to control this 
is BUILD_SHARED_LIBS, which when set to "ON" changes the behavior of 
add_library(foo) to be add_library(foo SHARED), instead of the default 
add_library(foo STATIC).  The other BUILD_STATIC_LIBS and DISABLE_SHARED are 
variables are not builtin to CMake and are part of however they have chosen to 
implement their build.

CMake builds are typically designed to produce a single configuration, i.e. 
shared release or static debug, etc.  Often, however, because to have the 
flexibility to do otherwise. projects will try to instead implement a build 
that produces several configurations in a single pass.  It seems this is what 
MariaDB has done and as such the variables to control it will be unique and 
specific to that project and how they've decided to implement it.

--
Chuck Atkins
Staff R Engineer, Scientific Computing
Kitware, Inc.


On Thu, Aug 9, 2018 at 12:23 PM REIX, Tony 
mailto:tony.r...@atos.net>> wrote:

Hi,


On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files and 
lib*.a files which contain .o files.

On AIX, we should get libraries lib*.a containing the lib*.so file.

I've tried to use:

-DBUILD_SHARED_LIBS=ON  \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_CREATE_SHARED_LIBRARY=ON  \
-DCMAKE_CXX_CREATE_SHARED_LIBRARY=ON
and I see that, for MariaDB, someone has tried with:

-DDISABLE_SHARED=OFF


None seems to work.


Which CMake variable should I use for asking CMAKE to generate shared libraries 
rather than static ones: lib*.a file containing .so files rather than .o files.


Thanks


Cordialement,

Tony Reix

tony.r...@atos.net<mailto:tony.r...@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
www.atos.net<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>
--

Powered by www.kitware.com<http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] Shared libraries

2018-08-09 Thread REIX, Tony
Hi,


On AIX, when building MongoC 1.11, cmake 3.11.4 generates lib*.so files and 
lib*.a files which contain .o files.

On AIX, we should get libraries lib*.a containing the lib*.so file.

I've tried to use:

-DBUILD_SHARED_LIBS=ON  \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_CREATE_SHARED_LIBRARY=ON  \
-DCMAKE_CXX_CREATE_SHARED_LIBRARY=ON
and I see that, for MariaDB, someone has tried with:

-DDISABLE_SHARED=OFF


None seems to work.


Which CMake variable should I use for asking CMAKE to generate shared libraries 
rather than static ones: lib*.a file containing .so files rather than .o files.


Thanks


Cordialement,

Tony Reix

tony.r...@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
www.atos.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-25 Thread REIX, Tony
Hi Rolf,


Thanks for your help! I have warned the MariaDB project on 
maria-develop...@lists.launchpad.net about his issue.


Séna and I are CMake and MariaDB beginners. They are new and very complex for 
us. Learning.


Thanks again !

Regards,


Tony



Date: Fri, 22 Jun 2018 14:20:48 +0200
From: Rolf Eike Beer 
To: cmake-developers@cmake.org
Subject: Re: [cmake-developers] cmake on AIX
Message-ID: 
Content-Type: text/plain; charset=US-ASCII; format=flowed

Am 2018-06-22 14:11, schrieb REIX, Tony:
> Hi Brad,
>
>
> Still investigating why MariaDB does not build.
>
>
> We have the following trace:
> ...

As Brad already said:

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

That broken here:
https://github.com/MariaDB/server/blob/ed0b84a0270bd99b001dd00654875d26e29b9432/plugin/auth_gssapi/cmake/FindGSSAPI.cmake#L56

Report to MariaDB to fix their things.

Eike

--
<https://cmake.org/mailman/listinfo/cmake-developers>


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<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-22 Thread REIX, Tony
Hi Brad,


Still investigating why MariaDB does not build.


We have the following trace:


CMake Error at 
/opt/freeware/src/packages/BUILD/mariadb-10.3.7/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:14

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:0x8000 -brtl 
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" )



With the error message:


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:0x8000 -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)



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<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>

De : Brad King 
Envoyé : mardi 19 juin 2018 19:27:17
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/19/2018 12:17 PM, REIX, Tony wrote:
> So, it looks like cmake gets data for the CMAKE_REQUIRED_LIBRARIES
> from these 2 aboves places, but it does not transform the " " blank 
> separators by ";" ?!!

It's MariaDB's CMake code that is doing that, not CMake itself.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-19 Thread REIX, Tony
Hi Brad,


Thanks for the information!


About MariaDB current issue, the only trace I see dealing with the string 
breaking cmake is:


/opt/freeware/src/packages/BUILD/mariadb-10.3.1/64bit/libmariadb/cmake/FindGSSAPI.cmake(94):
  message(STATUS Found GSSAPI: ${GSSAPI_LIBS} )
-- Found GSSAPI: -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:0x8000 -brtl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads


It contains a part of this:

# grep bmaxdata mariadb-10.3.1-1.spec
export LDFLAGS="-L/opt/freeware/lib 
-Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x8000 -lintl"

And the rest of the string probably comes from KRB5 configuration files:
# rpm -ql krb5-devel-1.9.4-2 | xargs grep lkrb5
/opt/freeware/bin/krb5-config:  lib_flags="$lib_flags -lkrb5 -lk5crypto 
-lcom_err $GEN_LIB $LIBS $DL_LIB"
/opt/freeware/bin/krb5-config_64:   lib_flags="$lib_flags -lkrb5 -lk5crypto 
-lcom_err $GEN_LIB $LIBS $DL_LIB"


So, it looks like cmake gets data for the CMAKE_REQUIRED_LIBRARIES from these 2 
aboves places, but it does not transform the " " blank separators by ";" ?!!

Any idea where this is done ?


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<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>
____
De : Brad King 
Envoyé : mardi 19 juin 2018 17:57:54
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/19/2018 11:48 AM, REIX, Tony wrote:
> However, we've found yet no information about how to:
>
>a) run one test,
>
>b) get more traces,

ctest -R $regex_matching_tests_to_run -V

>c) know where are the logs.

See the Testing/* directory.  When not running in dashboard
client mode there isn't much logged though.

> CMake Error at 
> /opt/freeware/src/packages/BUILD/mariadb-10.3.1/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:14
>  (add_executable):
>   Target "cmTC_d6385" 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:0x8000 -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)

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

See the code here:

  
https://github.com/MariaDB/server/blob/ed0b84a027/plugin/auth_gssapi/CMakeLists.txt#L22-L24

It assumes GSSAPI_LIBS is ;-separated, but the cache entry you
quoted is a command-lien string with spaces.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-19 Thread REIX, Tony
Hi,


We moved to AIX 7.1 . With cmake 3.11.4 .

In this environment, we were able to build cmake. However, there are 7 cmake 
tests which fails.


When using this cmake for building MariaDB, it fails with an unclear error 
message (see below). Any idea ?


We'd like to investigate and fix these 7 failing tests (at least those that 
look important).

However, we've found yet no information about how to:

   a) run one test,

   b) get more traces,

   c) know where are the logs.

Any information or pointer to some test doc would help.



CMake error message while building MariaDB :


CMake Error at 
/opt/freeware/src/packages/BUILD/mariadb-10.3.1/64bit/CMakeFiles/CMakeTmp/CMakeLists.txt:14
 (add_executable):
  Target "cmTC_d6385" 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:0x8000 -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)

# grep -R maxdata:0x800 $BUILD/mariadb-10.3.1/64bit/*
/opt/freeware/src/packages/BUILD/mariadb-10.3.1/64bit/CMakeCache.txt:GSSAPI_LIBS:STRING=-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:0x8000 -brtl 
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads


Any idea ?


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<https://mail.ad.bull.net/owa/redir.aspx?C=PvphmPvCZkGrAgHVnWGsdMcDKgzl_dEIsM6rX0g4u4v8V81YffzBGkWrtQeAXNovd3ttkJL8JIc.=http%3a%2f%2fwww.atos.net%2f>
____
De : REIX, Tony
Envoyé : mercredi 13 juin 2018 11:41:30
À : Brad King; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : RE:[cmake-developers] cmake on AIX

Hi Brad,

With cmake 3.2.3 , Séna is able to build MariaDB.
However, with version 3.11.1 , we have issues (core or hang of cmake, and other 
issues). Investigating.
We'll move to 3.11.3 asap in order to see if we face the same issues.

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<http://www.atos.net>


De : Brad King [brad.k...@kitware.com]
Envoyé : mardi 12 juin 2018 15:44
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/12/2018 09:36 AM, REIX, Tony wrote:
> I never saw any package built on AIX using pthread or ppc64/pthread
> We have to understand why cmake is different.

We use C++11 std::thread.  It requires GCC's -pthread flag on AIX,
and that flag changes the standard library that is used.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-13 Thread REIX, Tony
Hi Brad,

With cmake 3.2.3 , Séna is able to build MariaDB.
However, with version 3.11.1 , we have issues (core or hang of cmake, and other 
issues). Investigating.
We'll move to 3.11.3 asap in order to see if we face the same issues.

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


De : Brad King [brad.k...@kitware.com]
Envoyé : mardi 12 juin 2018 15:44
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/12/2018 09:36 AM, REIX, Tony wrote:
> I never saw any package built on AIX using pthread or ppc64/pthread
> We have to understand why cmake is different.

We use C++11 std::thread.  It requires GCC's -pthread flag on AIX,
and that flag changes the standard library that is used.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread REIX, Tony
Hi Brad,

You said:

> I think that should solve any problems with running CMake in environments 
> different than it was built.

Yes. Tests may be OK though cmake does not work with complex package to build.


> The LIBPATH is
>  
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0:/opt/freeware/lib:/usr/lib:/lib
> 
> ldd shows for the C++ and C runtime libraries:
> 
>  
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libstdc++.so.6)
>  /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libgcc_s.a(shr.o)

OK. Interesting. That looks the same we have here:  pthread/libstdc++.a  .
GCC on AIX is built in 4 flavors (default is 32bit, pthread, ppc64, and 
ppc64/pthread). However, I never saw any package built on AIX using pthread or 
ppc64/pthread ...
And that is an issue since we use /opt/freeware/lib or /opt/freeware/lib64 and 
NEVER pthread...
We have to understand why cmake is different.


>> Looking at your build farm: 
>> https://open.cdash.org/index.php?project=CMake=2018-06-12 , I see no 
>> AIX machine.
>
> That view is paged.  One can use filters to see just the AIX builds:
>  
> https://open.cdash.org/index.php?project=CMake=1=1=buildname=63=AIX

Thanks !  I saw it is paged, but I missed the AIX cases.
I've had a look at: https://open.cdash.org/buildSummary.php?buildid=5415006 . 
However, the traces are only high-level information. On our side, we are adding 
traces in order to see the details for figuring out what is really done.

We have to investigate more. Both cmake build and how/why cmake fails with 
mariadb.

Thanks!

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread REIX, Tony
Hi Brad,

GCC : 6.1 and 7.2 on your side, and 6.3.0 on our side. That should be ok.
Did you build GCC on AIX by yourself or did you take it on some repository, 
like BullFreeware?

Did you use cmake built on AIX for building a project with it? cmake tests are 
98% OK here though that does not work with mariaDB.

Thanks for the idea with static C++ runtime library ! We'll experiment with it 
asap.

Would you mind run the commands:
   dump -Hv cmake
   ldd cmake
on the cmake command that you build, so that we can see which LIBPATH is set 
into the executable.

Or, is there a way to get the traces of the build of cmake?
Did you build it by hand or with a script or a .spec file or anything that we 
could look at?

Looking at your build farm: 
https://open.cdash.org/index.php?project=CMake=2018-06-12 , I see no AIX 
machine.

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


De : Brad King [brad.k...@kitware.com]
Envoyé : lundi 11 juin 2018 19:25
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/11/2018 11:16 AM, REIX, Tony wrote:
> We are building cmake now only with GCC (6.3.0 for now) on AIX 6.1 .
> Which GCC compiler version are you using on AIX ?

GCC 7.2.  We previously tested with 6.1 and that worked too.

> It appears that the cmake executable has been built so that it looks for:
> libstdc++.a(libstdc++.so.6) in
>   
> /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread:/opt/freeware/lib/pthread/
> first, before the base /opt/freeware/lib. However, when we use it for building
> mariadb, we have to set the LIBPATH to: /opt/freeware/lib64:/usr/lib

Try switching to a static C++ runtime library:

  ./bootstrap -- -DCMAKE_EXE_LINKER_FLAGS='-static-libstdc++ -static-libgcc 
-Wl,-bbigtoc'

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-11 Thread REIX, Tony
Hi Brad,

Good news ! Thanks for the information.

We are building cmake now only with GCC (6.3.0 for now) on AIX 6.1 .
Which GCC compiler version are you using on AIX ?

We have been able to build the RPMs files of cmake 3.11.1 once by means of our 
RPM cmakespec file.
Now, when we try to rebuild it, we face either a core or a hang in the 
bootstrap phase.
We build cmake in 32bit.
And, when building cmake RPMs succeeded, we had:  98% tests passed, 8 tests 
failed out of 462 .

About the _ZTINSt6thread6_StateE issue, we have figured out what's happening.
It appears that the cmake executable has been built so that it looks for: 
libstdc++.a(libstdc++.so.6) in 
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread:/opt/freeware/lib/pthread/
 first, before the base /opt/freeware/lib. However, when we use it for building 
mariadb, we have to set the LIBPATH to: /opt/freeware/lib64:/usr/lib and since 
the symbol _ZTINSt6thread6_StateE belongs to the pthread version of libstdc++.a 
and not to the standard 32bit version of libstdc++.a , that fails .

# nm /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/libstdc++.a | grep 
_ZTINSt6thread6_StateE
# 
# nm /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread/libstdc++.a | 
grep _ZTINSt6thread6_StateE
_ZTINSt6thread6_StateE D   536897504
_ZTINSt6thread6_StateE d   536897504   8

# dump -Hv /tmp/opt/freeware/bin/cmake
INDEX  PATH  BASEMEMBER 
0  
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0:/opt/freeware/lib:/usr/lib:/lib

1libperfstat.a   shr.o  
2libstdc++.a libstdc++.so.6 


Moreover, though we try to build mariadb in 64bit, we see that library paths 
and other options used for building mariadbare set to 32bit. And some options 
to be used only in 32bit (-bmaxdata) appears in 64bit. And some dangerous 
options (-brtl and -bexpall) are used.

We have found some   Modules/Platform/AIX-*.cmake  files that seem to control 
how cmake is configured on AIX.
We are cmake beginners and need to learn about how cmake is built and used.

So, either our mariadb .spec file contains mistakes, or the port of cmake we've 
done, though tests are 98% OK, is not yet usable/perfect on AIX.
Have you used cmake on AIX for building any package?
Do you have traces of the build of cmake in your AIX environment?

About adding one of our machines for building cmake to your buildfarm, we'll 
have look later.

Thanks !

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


De : Brad King [brad.k...@kitware.com]
Envoyé : lundi 11 juin 2018 16:06
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/08/2018 11:56 AM, REIX, Tony wrote:
> We'd like to know if cmake has already been ported on AIX.

Yes, it has long worked on AIX.  We have nightly testing
on AIX 7.2 with both GCC 7.2 and XL 13.1.  A couple of tests
are disabled for those builds but it works in general.

Since CMake 3.10 we require C++11 language and standard
library features so we've only gotten it compiling on AIX
using GCC.  The above-mentioned nightly builds still run
the test suite against XL too though.

If you're interested in running nightly testing too, more
machines/versions would be helpful.  See here:

  https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst

You'd need to start with a GCC build.  Then I can help you
configure it to run the test suite with XL too.

> Version 3.11.1 :
>  # /opt/freeware/bin/cmake
> Could not load program /opt/freeware/bin/cmake:
> rtld: 0712-001 Symbol _ZTINSt6thread6_StateE was referenced
>   from module cmake(), but a runtime definition
> of the symbol was not found.

How did you build or install it?

That symbol demangles to "typeinfo for std::thread::_State",
which is part of the C++ standard library.

Make sure the `libstdc++` library used at runtime is at
least as new as the one used when it was compiled.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https

[cmake-developers] cmake on AIX

2018-06-08 Thread REIX, Tony
Hi,

We'd like to know if cmake has already been ported on AIX.

We have tried to port it on AIX, and tests are neary OK:
  3.11.1 : 98% tests passed, 8 tests failed out of 462
  3.9.1 : 96% tests passed, 19 tests failed out of 441

However, when using it for building MariaDB 10.3.1 on AIX, we have hangs or: -- 
Configuring incomplete, errors occurred! or an error talking about rtld.

And, if we use older cmake 3.2.3, we have other issues... and MariaDB requires 
cmake >= 3.7 .

Version 3.11.1 :
 # /opt/freeware/bin/cmake
Could not load program /opt/freeware/bin/cmake:
rtld: 0712-001 Symbol _ZTINSt6thread6_StateE was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt6thread4joinEv was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt18condition_variableD1Ev was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt18condition_variableC1Ev was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE 
was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt18condition_variable10notify_oneEv was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt18condition_variable10notify_allEv was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt6thread6_StateD2Ev was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol 
_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE
 was referenced
  from module cmake(), but a runtime definition
of the symbol was not found.


Thx/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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers