Discussion:
[cmake-developers] cmake on AIX
REIX, Tony
2018-06-08 15:56:50 UTC
Permalink
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<http://www.atos.net/>
Brad King
2018-06-11 14:06:30 UTC
Permalink
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
REIX, Tony
2018-06-11 15:16:27 UTC
Permalink
This post might be inappropriate. Click to display it.
Brad King
2018-06-11 17:25:49 UTC
Permalink
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
REIX, Tony
2018-06-12 07:38:45 UTC
Permalink
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&date=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 [***@kitware.com]
Envoyé : lundi 11 juin 2018 19:25
À : REIX, Tony; cmake-***@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
Brad King
2018-06-12 12:54:08 UTC
Permalink
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&date=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&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=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
REIX, Tony
2018-06-12 13:36:16 UTC
Permalink
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&date=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&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=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
Brad King
2018-06-12 13:44:46 UTC
Permalink
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
REIX, Tony
2018-06-13 09:41:30 UTC
Permalink
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 [***@kitware.com]
Envoyé : mardi 12 juin 2018 15:44
À : REIX, Tony; cmake-***@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
REIX, Tony
2018-06-19 15:48:29 UTC
Permalink
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:0x80000000 -brtl
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

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

# grep -R maxdata:0x8000000 $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:0x80000000 -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.&URL=http%3a%2f%2fwww.atos.net%2f>
________________________________
De : REIX, Tony
Envoyé : mercredi 13 juin 2018 11:41:30
À : Brad King; cmake-***@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 [***@kitware.com]
Envoyé : mardi 12 juin 2018 15:44
À : REIX, Tony; cmake-***@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
Brad King
2018-06-19 15:57:54 UTC
Permalink
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:0x80000000 -brtl
>   -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" but the target was
>   not found.  Perhaps a find_package() call is missing for an IMPORTED
>   target, or an ALIAS target is missing?
>
> CMake Error at /opt/freeware/share/cmake/Modules/CheckSymbolExists.cmake:87 (try_compile):
>   Failed to generate test project build system.
> Call Stack (most recent call first):
>   /opt/freeware/share/cmake/Modules/CheckCXXSymbolExists.cmake:39 (__CHECK_SYMBOL_EXISTS_IMPL)
>   plugin/auth_gssapi/CMakeLists.txt:24 (CHECK_CXX_SYMBOL_EXISTS)

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
REIX, Tony
2018-06-19 16:17:34 UTC
Permalink
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:0x80000000 -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:0x80000000 -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.&URL=http%3a%2f%2fwww.atos.net%2f>
________________________________
De : Brad King <***@kitware.com>
Envoyé : mardi 19 juin 2018 17:57:54
À : REIX, Tony; cmake-***@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:0x80000000 -brtl
> -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" but the target was
> not found. Perhaps a find_package() call is missing for an IMPORTED
> target, or an ALIAS target is missing?
>
> CMake Error at /opt/freeware/share/cmake/Modules/CheckSymbolExists.cmake:87 (try_compile):
> Failed to generate test project build system.
> Call Stack (most recent call first):
> /opt/freeware/share/cmake/Modules/CheckCXXSymbolExists.cmake:39 (__CHECK_SYMBOL_EXISTS_IMPL)
> plugin/auth_gssapi/CMakeLists.txt:24 (CHECK_CXX_SYMBOL_EXISTS)

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
Brad King
2018-06-19 17:27:17 UTC
Permalink
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
REIX, Tony
2018-06-22 12:11:04 UTC
Permalink
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:0x80000000 -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:0x80000000 -brtl
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpthreads" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?


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



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.&URL=http%3a%2f%2fwww.atos.net%2f>
________________________________
De : Brad King <***@kitware.com>
Envoyé : mardi 19 juin 2018 19:27:17
À : REIX, Tony; cmake-***@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
Rolf Eike Beer
2018-06-22 12:20:48 UTC
Permalink
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:0x80000000 -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
REIX, Tony
2018-06-25 09:43:34 UTC
Permalink
Hi Rolf,


Thanks for your help! I have warned the MariaDB project on maria-***@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 <***@sf-mail.de>
To: cmake-***@cmake.org
Subject: Re: [cmake-developers] cmake on AIX
Message-ID: <***@sf-mail.de>
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.&URL=http%3a%2f%2fwww.atos.net%2f>
Loading...