Menu

New mingw(32|64)-(i386|amd64) architectures in the CMakeLists.txt but not supported by the control file

wpkg
2015-03-12
2015-03-14
  • Mathieu SCHROETER

    Hello,

    These changes in the CMakeLists.txt file are a bit annoying with source packages:

    elseif( MSVC )
        set( WPKG_OS mswindows )
        ...
    elseif( MINGW32 OR MSYS )
        ...
        set( WPKG_OS mingw32 )
        ...
    elseif( MINGW )
        ...
        set( WPKG_OS mingw64 )
        ...
    else()
        message( FATAL_ERROR "Platform not supported!" )
    endif()
    set( WPKG_ARCHITECTURE "${WPKG_OS}-${WPKG_PROCESSOR}" )
    

    Because when we use

    Architecture: ${architecture()}
    

    In the control.info file of a source package, it sets the value to mingw64-amd64 (for example) and WPKG doesn't support this architecture.

    wpkg:error: 2015/03/12 16:24:13: [package:test] "\"mingw64-amd64\" is an invalid architecture." (field)
    

    Thanks
    Regards

     
    • R. Douglas Barbieri

      We need to change this in wpkg itself. I agree that it should use
      "mswindows" instead of "mingw64."

       
      • Alexis Wilke

        Alexis Wilke - 2015-03-12

        Doug, note that the WPKG_ARCHIVE variable set by cmake is the one used to determine the OS and processor to be used by default (and thus in ${architecture()}). So Mathieu is correct. The CMakeLists.txt file needs to be fixed in that regard. And also indeed it should use "mswindows". So testing with WPKG_OS set to "mswindows" should work as is. What we use in the code is the MO_WINDOWS and MO_MING64 anyway, so it should have other side effects.

         
        • R. Douglas Barbieri

          Ah hah! I get what you're saying. All I have to do is realize that wpkg
          is built using CMake. :) Even though I pretty much wrote the cmake
          scripts, right? :)

           
          • Alexis Wilke

            Alexis Wilke - 2015-03-12

            He! He! Well... I think I am the one who added those variables to the cmake script. You can do a grep, but I don't think we use the WPKG_OS variable for anything more than that WPKG_ARCHIVE variable in cmake, so we can set it to pretty much anything and it won't affect the compile results other than the default archive.

             

            Last edit: Alexis Wilke 2015-03-12
            • Mathieu SCHROETER

              Here the trivial patch...

              Regards

               
              • Alexis Wilke

                Alexis Wilke - 2015-03-13

                Okay, I pushed this one too along the VERBOSE and CD /D patches.

                 
  • Mathieu SCHROETER

    Thank you Alexis

     

Log in to post a comment.