Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  CMake compilation of AIX 7.1

    Posted Fri April 21, 2023 10:11 AM

    I am compiling a project on AIX 7.1 with cmake 3.16 and I get the following error:
    collect2: fatal error libxxxx not a COFF file
    I am using gcc 8.3.
    Can anyone please give me a hint ?



    ------------------------------
    Cristian Cucu
    ------------------------------

    #AIXOpenSource


  • 2.  RE: CMake compilation of AIX 7.1

    Posted Fri April 21, 2023 10:18 AM

    Generally you get an error like this if collect2 gets a file other than a XCOFF file , probably an archive file or libtool file ?
    Does the project use libtool internally ?



    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: CMake compilation of AIX 7.1

    Posted Fri April 21, 2023 11:46 AM

    Indeed the type of the .a file is archive (Big Format). The C++/C project is compiled entirely with cmake. I am not sure whether cmake uses libtools or not.



    ------------------------------
    Cristian Cucu
    ------------------------------



  • 4.  RE: CMake compilation of AIX 7.1

    Posted Mon April 24, 2023 05:55 AM

    I found the solution to this. The CMakeLists.txt file of the library was false. The c++ files and .h files were saved under the same CMake variable name.



    ------------------------------
    Cristian Cucu
    ------------------------------