[CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Graham Russell
Hello

I installed cmake 2.8.12.2 on AIX 6.1 with the intention of building MySQL.  
The build fails so I tried to cmake the simplest test program, and I get the 
same failure.

The error is  "ld: target noipath not found"
It seems to me that "noipath" is a directive to the linker, so the linker 
should not be looking for a target called noipath.

Can anyone help with this?
Thanks
Graham Russell



Details:
I installed the cmake-2.8.12.2-AIX-powerpc.tar.gz file.
The AIX version is AIX 6100-03-03-0943.

I created a folder CMake/Tests/Tutorial containing the first step in 
http://www.cmake.org/cmake/help/cmake_tutorial.html:
CMakeLists.txt
tutorial.cxx

Then ran cmake as below:

pvm-vangogh-94:grussell [602] bin/cmake .
-- The C compiler identification is GNU 4.4.4
-- The CXX compiler identification is GNU 4.4.4
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- broken
CMake Error at 
/mnt/research/grussell/cmake-2.8.12.2-AIX-powerpc/share/cmake-2.8/Modules/CMakeTestCCompiler.cm
ake:61 (message):
  The C compiler "/usr/local/bin/gcc" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp



  Run Build Command:/bin/gmake "cmTryCompileExec680887608/fast"

  /bin/gmake -f CMakeFiles/cmTryCompileExec680887608.dir/build.make
  CMakeFiles/cmTryCompileExec680887608.dir/build

  gmake[1]: Entering directory
  `/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp'

  /mnt/research/grussell/cmake-2.8.12.2-AIX-powerpc/bin/cmake -E
  cmake_progress_report
  /mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building C object
  CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o

  /usr/local/bin/gcc -o
  CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o -c
  
/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp/testCCompiler.c

Log files:
pvm-vangogh-94:grussell [607] cat CMakeOutput.log
The system is: AIX - 1 - powerpc
Compiling the C compiler identification source file "CMakeCCompilerId.c" 
succeeded.
Compiler: /usr/local/bin/gcc
Build flags:
Id flags:

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" 
produced "a.out"

The C compiler identification is GNU, found in 
"/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/2.8.12.
2/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" 
succeeded.
Compiler: /usr/local/bin/c++
Build flags:
Id flags:

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" 
produced "a.out"

The CXX compiler identification is GNU, found in 
"/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/2.8.1
2.2/CompilerIdCXX/a.out"


pvm-vangogh-94:grussell [608] cat CMakeError.log
Determining if the C compiler works failed with the following output:
Change Dir: /mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp

Run Build Command:/bin/gmake "cmTryCompileExec680887608/fast"
/bin/gmake -f CMakeFiles/cmTryCompileExec680887608.dir/build.make 
CMakeFiles/cmTryCompileExec680887608.dir/bui
ld
gmake[1]: Entering directory 
`/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp'
/mnt/research/grussell/cmake-2.8.12.2-AIX-powerpc/bin/cmake -E 
cmake_progress_report /mnt/research/grussell/CM
ake/Tests/Tutorial/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o
/usr/local/bin/gcc-o 
CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o   -c 
/mnt/research/grussel
l/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec680887608
/mnt/research/grussell/cmake-2.8.12.2-AIX-powerpc/bin/cmake -E 
cmake_link_script CMakeFiles/cmTryCompileExec68
0887608.dir/link.txt --verbose=1
/usr/local/bin/gcc   
CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o  -o 
cmTryCompileExec680887
608 -Wl,-brtl,-bnoipath,-bexpall -Wl,-blibpath:/usr/lib:/lib
/usr/local/lib/gcc/powerpc-ibm-aix6.1.0.0/4.4.4/../../../../powerpc-ibm-aix6.1.0.0/bin/ld:
 target noipath not
found
collect2: ld returned 1 exit status
gmake[1]: Leaving directory 
`/mnt/research/grussell/CMake/Tests/Tutorial/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec680887608] Error 1
gmake: *** [cmTryCompileExec680887608/fast] Error 2

-- 

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 thi

[CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Graham Russell
Thanks for the response, Bill.

I confirmed that the compiler install works fine:
pvm-vangogh-94:grussell [625] /usr/local/bin/gcc  hello.c -o hello 
pvm-vangogh-94:grussell [626] ./hello Hello World!

I also tested it with your simple program and it also compiles OK and runs.

I think the problem lies in the options that CMake uses to test the AIX compile 
environment.

Thanks
Graham Russell


-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Bill Hoffman
Sent: Thursday, May 01, 2014 10:17 AM
To: cmake@cmake.org
Subject: Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath 
not found"

On 5/1/2014 12:30 PM, Graham Russell wrote:
> Hello
>
> I installed cmake 2.8.12.2 on AIX 6.1 with the intention of building 
> MySQL.  The build fails so I tried to cmake the simplest test program, 
> and I get the same failure.
>
> The error is  "ld: target noipath not found"
>
> It seems to me that "noipath" is a directive to the linker, so the 
> linker should not be looking for a target called noipath.
>
> Can anyone help with this?
>
> Thanks
>
> Graham Russell
>
This is not a CMake problem.  Your compiler install is bad.

CMake is testing the compile of a very simple .c file and it is not work.

I suspect that a simple program like this:

int main() { return 0;}

will not compile and link with the /usr/local/bin/gcc on your system.

Create the above file and try to compile it without cmake and just gcc. 
  It should get the same error.  I would suggest that you reinstall gcc on the 
machine.



-Bill
-- 

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://www.cmake.org/mailman/listinfo/cmake
-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Bill Hoffman

On 5/1/2014 12:30 PM, Graham Russell wrote:

Hello

I installed cmake 2.8.12.2 on AIX 6.1 with the intention of building
MySQL.  The build fails so I tried to cmake the simplest test program,
and I get the same failure.

The error is  “ld: target noipath not found”

It seems to me that “noipath” is a directive to the linker, so the
linker should not be looking for a target called noipath.

Can anyone help with this?

Thanks

Graham Russell


This is not a CMake problem.  Your compiler install is bad.

CMake is testing the compile of a very simple .c file and it is not work.

I suspect that a simple program like this:

int main() { return 0;}

will not compile and link with the /usr/local/bin/gcc on your system.

Create the above file and try to compile it without cmake and just gcc. 
 It should get the same error.  I would suggest that you reinstall gcc 
on the machine.




-Bill
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Bill Hoffman

On 5/1/2014 4:04 PM, Graham Russell wrote:

Thanks for the response, Bill.

I confirmed that the compiler install works fine:
pvm-vangogh-94:grussell [625] /usr/local/bin/gcc  hello.c -o hello 
pvm-vangogh-94:grussell [626] ./hello Hello World!

I also tested it with your simple program and it also compiles OK and runs.

I think the problem lies in the options that CMake uses to test the AIX compile 
environment.

Thanks
Graham Russell



OK, from the log you sent, we can see that CMake is passing some stuff 
to the linker:


/usr/local/bin/gcc 
CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o  -o 
cmTryCompileExec680887608 -Wl,-brtl,-bnoipath,-bexpall 
-Wl,-blibpath:/usr/lib:/lib




I think the problem is that you are using the GNU linker, and CMake 
seems to be expecting the AIX linker to be used even with gcc.


You can see this is the linker used:
/usr/local/lib/gcc/powerpc-ibm-aix6.1.0.0/4.4.4/../../../../powerpc-ibm-aix6.1.0.0/bin/ld:

Which is the GNU linker and not the AIX linker which supports and needs 
that flag.



You should be able to change this in Modules/AIX-GNU.cmake

which has this:
  set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS 
"-Wl,-brtl,-bnoipath,-bexpall")  # +s, flag for exe link to use shared lib




That should get you going.  I will think about a solution that can be 
incorporated into CMake.  Would you be willing to run a nightly 
dashboard with this configuration so we can test it over time?


Thanks.

-Bill

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Graham Russell
Seems like there are 2 choices for a solution:
  1. Change CMake so it uses the IBM linker instead of the GNU linker.  What 
settings would I need to change in the cmake files to try this?
  2. Change the linker options so they will work for the GNU linker.

I tried option #2 by removing "-bnoipath" from the Modules/AIX-GNU.cmake file.  
This enabled cmake to run successfully on test files and on the MySQL package.

However, my ultimate aim being to build MySQL, the make did run into errors 
subsequently, so I would like to try option #1 also.  I am interested if you 
have an opinion as to whether option #1 or option #2 would give me a better 
shot at building MySQL.

Further to your question "Would you be willing to run a nightly 
dashboard with this configuration so we can test it over time?"
I would be willing, but need to know how to do this and what it involves.

Thanks
Graham Russell

-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Bill Hoffman
Sent: Thursday, May 01, 2014 1:33 PM
To: cmake@cmake.org
Subject: Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath 
not found"

On 5/1/2014 4:04 PM, Graham Russell wrote:
> Thanks for the response, Bill.
>
> I confirmed that the compiler install works fine:
> pvm-vangogh-94:grussell [625] /usr/local/bin/gcc  hello.c -o hello 
> pvm-vangogh-94:grussell [626] ./hello Hello World!
>
> I also tested it with your simple program and it also compiles OK and runs.
>
> I think the problem lies in the options that CMake uses to test the AIX 
> compile environment.
>
> Thanks
> Graham Russell


OK, from the log you sent, we can see that CMake is passing some stuff to the 
linker:

/usr/local/bin/gcc
CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o  -o
cmTryCompileExec680887608 -Wl,-brtl,-bnoipath,-bexpall 
-Wl,-blibpath:/usr/lib:/lib



I think the problem is that you are using the GNU linker, and CMake seems to be 
expecting the AIX linker to be used even with gcc.

You can see this is the linker used:
/usr/local/lib/gcc/powerpc-ibm-aix6.1.0.0/4.4.4/../../../../powerpc-ibm-aix6.1.0.0/bin/ld:

Which is the GNU linker and not the AIX linker which supports and needs that 
flag.


You should be able to change this in Modules/AIX-GNU.cmake

which has this:
   set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS 
"-Wl,-brtl,-bnoipath,-bexpall")  # +s, flag for exe link to use shared lib



That should get you going.  I will think about a solution that can be 
incorporated into CMake.  Would you be willing to run a nightly 
dashboard with this configuration so we can test it over time?

Thanks.

-Bill

-- 

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://www.cmake.org/mailman/listinfo/cmake
-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target noipath not found"

2014-05-01 Thread Bill Hoffman
On Thu, May 1, 2014 at 6:35 PM, Graham Russell  wrote:

> Seems like there are 2 choices for a solution:
>   1. Change CMake so it uses the IBM linker instead of the GNU linker.
>  What settings would I need to change in the cmake files to try this?
>

This is not really an option.  CMake can not choose the linker for the
compiler.  You would have to rebuild gcc with the option to use the native
linker.

>   2. Change the linker options so they will work for the GNU linker.
>
> I tried option #2 by removing "-bnoipath" from the Modules/AIX-GNU.cmake
> file.  This enabled cmake to run successfully on test files and on the
> MySQL package.
>
> Yes, that would be the way to do it.  However, we have to somehow tell the
difference between a gcc configured to use the native linker and one
configured to use the GNU linker and pick the flags accordingly.


> However, my ultimate aim being to build MySQL, the make did run into
> errors subsequently, so I would like to try option #1 also.  I am
> interested if you have an opinion as to whether option #1 or option #2
> would give me a better shot at building MySQL.
>

I think you have to deal with those errors or rebuild gcc with the native
linker, or use the native compilers.

>
> Further to your question "Would you be willing to run a nightly
> dashboard with this configuration so we can test it over time?"
> I would be willing, but need to know how to do this and what it involves.
>

It involves setting up a cronjob on your machine that runs once a day and
pulls from the cmake repository, builds cmake, and runs the tests, then
sends the results to CDash.   If we get to that point I can send pretty
simple instructions.

Thanks.

-Bill


>
> Thanks
> Graham Russell
>
> -Original Message-
> From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Bill Hoffman
> Sent: Thursday, May 01, 2014 1:33 PM
> To: cmake@cmake.org
> Subject: Re: [CMake] cmake 2.8.12.2 fails on AIX 6.1 with "ld: target
> noipath not found"
>
> On 5/1/2014 4:04 PM, Graham Russell wrote:
> > Thanks for the response, Bill.
> >
> > I confirmed that the compiler install works fine:
> > pvm-vangogh-94:grussell [625] /usr/local/bin/gcc  hello.c -o hello
> pvm-vangogh-94:grussell [626] ./hello Hello World!
> >
> > I also tested it with your simple program and it also compiles OK and
> runs.
> >
> > I think the problem lies in the options that CMake uses to test the AIX
> compile environment.
> >
> > Thanks
> > Graham Russell
>
>
> OK, from the log you sent, we can see that CMake is passing some stuff to
> the linker:
>
> /usr/local/bin/gcc
> CMakeFiles/cmTryCompileExec680887608.dir/testCCompiler.c.o  -o
> cmTryCompileExec680887608 -Wl,-brtl,-bnoipath,-bexpall
> -Wl,-blibpath:/usr/lib:/lib
>
>
>
> I think the problem is that you are using the GNU linker, and CMake seems
> to be expecting the AIX linker to be used even with gcc.
>
> You can see this is the linker used:
>
> /usr/local/lib/gcc/powerpc-ibm-aix6.1.0.0/4.4.4/../../../../powerpc-ibm-aix6.1.0.0/bin/ld:
>
> Which is the GNU linker and not the AIX linker which supports and needs
> that flag.
>
>
> You should be able to change this in Modules/AIX-GNU.cmake
>
> which has this:
>set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS
> "-Wl,-brtl,-bnoipath,-bexpall")  # +s, flag for exe link to use shared lib
>
>
>
> That should get you going.  I will think about a solution that can be
> incorporated into CMake.  Would you be willing to run a nightly
> dashboard with this configuration so we can test it over time?
>
> Thanks.
>
> -Bill
>
> --
>
> 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://www.cmake.org/mailman/listinfo/cmake
> --
>
> 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/hel