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 Rolf Eike Beer

Am 2018-06-22 14:11, schrieb 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" )


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

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 Brad King
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 Brad King
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 Brad King
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 Brad King
On 06/12/2018 03:38 AM, REIX, Tony wrote:
> 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.

The test suite passes and that is mostly made up of project-like tests.
It's also built using an existing CMake/CTest on the machine (3.11).

> Thanks for the idea with static C++ runtime library!

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

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

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)

> Did you build it by hand or with a script or a .spec file or anything that we 
> could look at?

It's build nightly by an existing CTest on the machine.  One of the
tests is the BootstrapTest which verifies that `./bootstrap` works.

> 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

-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 Brad King
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

Re: [cmake-developers] cmake on AIX

2018-06-11 Thread Brad King
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.org/mailman/listinfo/cmake-developers


[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


Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-10 Thread CHEVRIER, Marc

Hi,

I identify the root of the problem: if I specify version 3.4 in 
cmake_minimum_required, generated link command (stored in file link.txt) for an 
executable does not contains value specified in variable 
CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS. Specifying 3.3 fix the problem. So 
this is a regression introduced in 3.4.

Problem can be reproduced using this very simple CMakeLists.txt:
cmake_minimum_required (VERSION 3.4)

project (TEST LANGUAGES CXX)

file (WRITE test.cpp "// empty\n")

add_executable (test_exe test.cpp)

This problem occurs on all platforms (tested on AIX and Linux).

Marc




On 09/12/15 15:41, "cmake-developers on behalf of CHEVRIER, Marc" 
 wrote:

>
>Oops !
>You are right, on a simple example, all is OK. So the problem seems on my side.
>I will investigate this curious behaviour…
>
>Sorry for the noise.
>
>Marc
>
>
>
>
>On 09/12/15 15:15, "Brad King"  wrote:
>
>>On 12/09/2015 09:09 AM, CHEVRIER, Marc wrote:
>>> You are right. I missed this capability.
>>> My first idea was to apply to exec the same approach as for shared lib but 
>>> I didn’t found appropriate variable: something like 
>>> CMAKE_EXE_CREATE__FLAGS
>>> Or may be CMAKE_EXE_LINKER_FLAGS_INIT can be used but I am not sure of the 
>>> usage of the *_INIT variables.
>>
>>Actually the old code has it in two places:
>>
>>> - set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # 
>>> -shared
>>> - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS 
>>> "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
>>
>>The CREATE_ value is used when linking a shared library itself.
>>The LINK_ value is used to link executables.  Both should already
>>be getting the flag with no changes.
>>
>>-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:
>http://public.kitware.com/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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-10 Thread Brad King
On 12/10/2015 04:03 AM, CHEVRIER, Marc wrote:
> I identify the root of the problem: if I specify version 3.4 in
> cmake_minimum_required, generated link command (stored in file link.txt)
> for an executable does not contains value specified in variable
> CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS. Specifying 3.3 fix the problem.
> So this is a regression introduced in 3.4.

It is not technically a backward incompatibility because project code
that worked in 3.3 will still work the same way in 3.4.  Only after
modifying the code to require 3.4 does the behavior change, but the
new behavior is a regression.  This is policy CMP0065:

 https://cmake.org/cmake/help/v3.4/policy/CMP0065.html

introduced here:

 CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK__FLAGS
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9784af1b

The bug is that CMAKE_SHARED_LIBRARY_LINK__FLAGS is intended
to be equivalent to "-rdynamic" on Linux, but the AIX platform file
is using it for other flags too:

> set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall")

This should be just

 set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall")

and the `-Wl,-brtl,-bnoipath` flags should move elsewhere.  One could
add them directly to the CMAKE_${lang}_LINK_EXECUTABLE command line,
for example.

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:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-10 Thread CHEVRIER, Marc

Ok. I see the problem. Thanks for your investigation.
I will work on that and submit a patch to solve this problem.

Marc





On 10/12/15 14:42, "Brad King"  wrote:

>On 12/10/2015 04:03 AM, CHEVRIER, Marc wrote:
>> I identify the root of the problem: if I specify version 3.4 in
>> cmake_minimum_required, generated link command (stored in file link.txt)
>> for an executable does not contains value specified in variable
>> CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS. Specifying 3.3 fix the problem.
>> So this is a regression introduced in 3.4.
>
>It is not technically a backward incompatibility because project code
>that worked in 3.3 will still work the same way in 3.4.  Only after
>modifying the code to require 3.4 does the behavior change, but the
>new behavior is a regression.  This is policy CMP0065:
>
> https://cmake.org/cmake/help/v3.4/policy/CMP0065.html
>
>introduced here:
>
> CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK__FLAGS
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9784af1b
>
>The bug is that CMAKE_SHARED_LIBRARY_LINK__FLAGS is intended
>to be equivalent to "-rdynamic" on Linux, but the AIX platform file
>is using it for other flags too:
>
>> set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall")
>
>This should be just
>
> set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall")
>
>and the `-Wl,-brtl,-bnoipath` flags should move elsewhere.  One could
>add them directly to the CMAKE_${lang}_LINK_EXECUTABLE command line,
>for example.
>
>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:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-09 Thread Brad King
On 12/09/2015 09:09 AM, CHEVRIER, Marc wrote:
> You are right. I missed this capability.
> My first idea was to apply to exec the same approach as for shared lib but I 
> didn’t found appropriate variable: something like 
> CMAKE_EXE_CREATE__FLAGS
> Or may be CMAKE_EXE_LINKER_FLAGS_INIT can be used but I am not sure of the 
> usage of the *_INIT variables.

Actually the old code has it in two places:

> - set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared
> - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") 
> # +s, flag for exe link to use shared lib

The CREATE_ value is used when linking a shared library itself.
The LINK_ value is used to link executables.  Both should already
be getting the flag with no changes.

-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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-09 Thread Brad King
On 12/09/2015 08:02 AM, CHEVRIER, Marc wrote:
> Attached is a patch for AIX enabling correct generation of executables
> regarding runtime path handling (currently, build paths could be stored
> as part of installed executables): option -bnoipath is required for
> executables link command (currently, only shared libs link command
> get -bnoipath option).

Thanks.  I agree that -bnoipath should be used for all linking because
we never want the path to a library file to be encoded in its dependents.
However, the proposed patch moves the flag over to the flags used to
specify the RPATH.  These may not be used if CMAKE_SKIP_RPATH or similar
options are enabled.  We should find another place for the flag that
is always used for both shared libraries and executables.

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:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-09 Thread CHEVRIER, Marc

Oops !
You are right, on a simple example, all is OK. So the problem seems on my side.
I will investigate this curious behaviour…

Sorry for the noise.

Marc




On 09/12/15 15:15, "Brad King"  wrote:

>On 12/09/2015 09:09 AM, CHEVRIER, Marc wrote:
>> You are right. I missed this capability.
>> My first idea was to apply to exec the same approach as for shared lib but I 
>> didn’t found appropriate variable: something like 
>> CMAKE_EXE_CREATE__FLAGS
>> Or may be CMAKE_EXE_LINKER_FLAGS_INIT can be used but I am not sure of the 
>> usage of the *_INIT variables.
>
>Actually the old code has it in two places:
>
>> - set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared
>> - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS 
>> "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
>
>The CREATE_ value is used when linking a shared library itself.
>The LINK_ value is used to link executables.  Both should already
>be getting the flag with no changes.
>
>-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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake][PATCH] AIX RPATH handling

2015-12-09 Thread CHEVRIER, Marc
You are right. I missed this capability.
My first idea was to apply to exec the same approach as for shared lib but I 
didn’t found appropriate variable: something like CMAKE_EXE_CREATE__FLAGS
Or may be CMAKE_EXE_LINKER_FLAGS_INIT can be used but I am not sure of the 
usage of the *_INIT variables.

Marc




On 09/12/15 15:00, "Brad King"  wrote:

>On 12/09/2015 08:02 AM, CHEVRIER, Marc wrote:
>> Attached is a patch for AIX enabling correct generation of executables
>> regarding runtime path handling (currently, build paths could be stored
>> as part of installed executables): option -bnoipath is required for
>> executables link command (currently, only shared libs link command
>> get -bnoipath option).
>
>Thanks.  I agree that -bnoipath should be used for all linking because
>we never want the path to a library file to be encoded in its dependents.
>However, the proposed patch moves the flag over to the flags used to
>specify the RPATH.  These may not be used if CMAKE_SKIP_RPATH or similar
>options are enabled.  We should find another place for the flag that
>is always used for both shared libraries and executables.
>
>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:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] [CMake 0013331]: AIX linker chokes on spaces in rpath

2012-06-20 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=13331 
== 
Reported By:Daniel R. Gomez
Assigned To:
== 
Project:CMake
Issue ID:   13331
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2012-06-20 15:14 EDT
Last Modified:  2012-06-20 15:14 EDT
== 
Summary:AIX linker chokes on spaces in rpath
Description: 
I was looking into why so many tests were failing on my AIX 5.3 dashboard:

http://open.cdash.org/viewTest.php?onlyfailedbuildid=2378283

It seems to come down to the linker's -blibpath option. Compare the below two
invocations---the only difference is My Tests in the first one, and My_Tests
in the second:

host:~/Dashboards/My Tests/CMake-build/Tests/COnly env OBJECT_MODE=32
/usr/bin/gcc  -mminimal-toc -O0 CMakeFiles/COnly.dir/conly.c.o
CMakeFiles/COnly.dir/foo.c.o  -o COnly  libtestc1.a libtestc2.so
-Wl,-blibpath:/home/cport/Dashboards/My
Tests/CMake-build/Tests/COnly:/usr/lib:/lib
ld: 0706-014 The -b Tests/CMake-build/Tests/COnly option is not recognized.
collect2: ld returned 255 exit status

host:~/Dashboards/My Tests/CMake-build/Tests/COnly env OBJECT_MODE=32
/usr/bin/gcc -mminimal-toc -O0 CMakeFiles/COnly.dir/conly.c.o
CMakeFiles/COnly.dir/foo.c.o -o COnly libtestc1.a libtestc2.so
-Wl,-blibpath:/home/cport/Dashboards/My_Tests/CMake-build/Tests/COnly:/usr/lib:/lib
(no error)

This should probably be checked when CMake first looks at the compiler/linker,
as a fail-fast behavior would be helpful here.

(I checked that this isn't a problem with gcc or even collect2 mishandling the
option; I get the same error even if I pass -blibpath:... directly to ld.)
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2012-06-20 15:14 Daniel R. GomezNew Issue
==

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers