Configuration issues on AIX

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Configuration issues on AIX

Jakob Reschke
Hello,

In search for a new build tool for an existing project, I wanted to
give CMake 3.6.3 a try on AIX 5.3 with gcc 4.0.0, but quickly hit
obstacles with the GCC compiler identification and the file(STRINGS)
command. What I am looking for is guidance on how to solve the issues,
and for info whether I might miss some prerequisites, or whether there
are any workarounds I could temporarily put in place to get a first
build going.

Given this simple CMakeLists.txt:

    cmake_minimum_required(VERSION 3.6)
    project(foo LANGUAGES C)
    add_executable(hello main.c)
    # where main.c is just a printf hello world program

It does not recognize the compiler identification:

<<<<<<<<<<<<<
$ (mkdir -p build && cd build && cmake ..)
-- The C compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
CMake Error at /opt/freeware/share/cmake/Modules/CMakeTestCCompiler.cmake:47
(try_compile):
  Unknown extension ".c" for file

    /home/.../build/CMakeFiles/CMakeTmp/testCCompiler.c

  try_compile() works only for enabled languages.  Currently these are:

    C

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /opt/freeware/share/cmake/Modules/CMakeTestCCompiler.cmake:61
(message):
  The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/home/.../build/CMakeFiles/CMakeOutput.log".
See also "/home/.../build/CMakeFiles/CMakeError.log".
>>>>>>>>>>>>>



I got hold of the try_compile output and it contains the following info:

    $ strings -a a.out | grep INFO
    INFO:compiler[GNU]
    INFO:platform[AIX]
    INFO:arch[]
    INFO:dialect_default[90]
    INFO:compiler_version[00000004.00000000.00000000]

Yet, the CMakeError.log states: The C compiler identification could
not be found in "/home/.../build/CMakeFiles/3.6.3/CompilerIdC/a.out"

I followed this up to the file(STRING ...) command in
CMakeDetermineCompilerId.cmake and noticed that the command seems
unable to grep any strings out of any file:

    file(STRINGS CMakeLists.txt strs)
    message("strs: ${strs}")
    file(STRINGS a.out strs) # copied the CompilerIdC/a.out file to
the source tree
    message("strs: ${strs}")

Output is
strs:
strs:

So not even the CMakeLists.txt contained any strings according to
this. Reading the file with file(READ CMakeLists.txt strs) worked,
however. On my windows machine with CMake 3.6.2 it works as expected
with the same input files (copied from the AIX machine).

Meanwhile I tried to specify the compiler identification manually with
cmake -DCMAKE_C_COMPILER_ID=GNU, but the output is about the same,
including the "Unknown extension .c for file testCCompiler.c" message.
The CMakeError.log now only contains "Determining if the C compiler
works failed with the following output: [nothing]".

Any hints? Tell if you need any specific additional information, please.

Kind regards,
Jakob

--

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
Reply | Threaded
Open this post in threaded view
|

Re: Configuration issues on AIX

Brad King
On 02/27/2018 11:30 AM, Jakob Reschke wrote:
> I followed this up to the file(STRING ...) command ... seems
> unable to grep any strings out of any file:

Strange.  That will need to be solved before anything can be
expected to work.  Where did you get the CMake binary?

FYI we've had nightly testing on AIX with both XL and GNU compilers
for years so CMake should work.

-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
Reply | Threaded
Open this post in threaded view
|

Re: Configuration issues on AIX

Jakob Reschke
2018-02-28 13:22 GMT+01:00 Brad King <[hidden email]>:
> On 02/27/2018 11:30 AM, Jakob Reschke wrote:
>> I followed this up to the file(STRING ...) command ... seems
>> unable to grep any strings out of any file:
>
> Strange.  That will need to be solved before anything can be
> expected to work.  Where did you get the CMake binary?

Someone else had to install it for me and I pointed them to this
location, so I assume it comes from there:
http://www.perzl.org/aix/index.php?n=Main.Cmake
I will ask them again to confirm, and will amend otherwise.

> FYI we've had nightly testing on AIX with both XL and GNU compilers
> for years so CMake should work.

Yes, I have seen the builds mentioned somewhere, which gives me hope
that it could be fixed on our machines.
--

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
Reply | Threaded
Open this post in threaded view
|

Re: Configuration issues on AIX

Brad King
On 02/28/2018 12:59 PM, Jakob Reschke wrote:
> Yes, I have seen the builds mentioned somewhere, which gives me hope
> that it could be fixed on our machines.

You could also try bootstrapping CMake from source.  Doing so with
GNU on AIX is supported.

-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
Reply | Threaded
Open this post in threaded view
|

Re: Configuration issues on AIX

Jakob Reschke
2018-02-28 19:04 GMT+01:00 Brad King <[hidden email]>:
> On 02/28/2018 12:59 PM, Jakob Reschke wrote:
>> Yes, I have seen the builds mentioned somewhere, which gives me hope
>> that it could be fixed on our machines.
>
> You could also try bootstrapping CMake from source.  Doing so with
> GNU on AIX is supported.

There is no C++ compiler on the machine yet (only C), but I could ask
whether they can install the compiler for me as well. It might take
some time until it happens, though. If there is anything else I could
try in the meantime, please let me know.
--

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