Menu

Newer gnat for Cygwin?

Gurce
2016-06-25
2016-06-28
  • Gurce

    Gurce - 2016-06-25

    Hi guys,

    I was interested in learning how to go about building a newer version of gnat for Cygwin? (the last available version on sourceforge is "gnat-gcc-4.1.1-r6.cygwin.i386.rpm").

    Just wondering, is it an easy thing to do? Just drop in the newer gnat source and run rpmbuild again? Or is there more to it than that (lots of perils/pitfalls/gotchyas)? My gut says the latter, but who knows, maybe I'll get lucky :D

    I don't mind putting in a bit of elbow-grease to try make it happen, as gnat was needed for a project I'm interested in (the mega65 project), and I was keen to see if I could keep working on the project in a windows environment rather than switching completly to linux (well, ok, I admit, using Cygwin is kinda going halfway into the linux-world already ;)).

    Anyway, was pondering where to start. I saw on sourceforge, there was the "gnat-rpm-8.0.1-r8.src.rpm". I've exploded that and having a sniff around the spec file there. I tried running rpmbuild within cygwin, but no luck there.

    How should I go about this? Should I be avoiding cygwin for doing rpmbuild? Maybe do rpmbuild inside linux (and get it to build the cygwin rpm?). No idea really, I'm still sniffing around, but if you've got any pointers, thoughts or suggestions, I'm happy to hear it, even if the suggestion is to give this idea a miss due to it being a world of pain and just stick with linux :)

    Gurce

     
    • Martin Krischik

      Martin Krischik - 2016-06-27

      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Hello

      Gurce schrieb:

      Hi guys,

      I was interested in learning how to go about building a newer version
      of gnat for Cygwin? (the last available version on sourceforge is
      "gnat-gcc-4.1.1-r6.cygwin.i386.rpm").

      Just wondering, is it an easy thing to do?

      Very difficult indeed. That is why it has not been done for a long time.
      But cygwin should have an up to date version which can be used as
      starting point.

      Just drop in the newer gnat source and run rpmbuild again? Or is
      there more to it than that (lots of perils/pitfalls/gotchyas)? My gut
      says the latter, but who knows, maybe I'll get lucky :D

      No such thing as getting lucky with GNAT.

      Anyway, was pondering where to start. I saw on sourceforge, there
      was the "gnat-rpm-8.0.1-r8.src.rpm". I've exploded that and having a
      sniff around the spec file there. I tried running rpmbuild within
      cygwin, but no luck there.

      Cygwin is not realy and RPM Distribution. You can add RPM but it will
      always be and add on.

      But more importantly: for Windows mingw is the better option as it
      allows stand alone exe. It it also the version AdaCore uses.

      How should I go about this? Should I be avoiding cygwin for doing
      rpmbuild? Maybe do rpmbuild inside linux (and get it to build the
      cygwin rpm?). No idea really, I'm still sniffing around, but if
      you've got any pointers, thoughts or suggestions, I'm happy to hear
      it, even if the suggestion is to give this idea a miss due to it
      being a world of pain and just stick with linux :)

      You should download
      https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/ ? with
      Subversion and have a look into mingw/SCRIPTS and rpm/SCRIPTS ? that is
      were the actual projects is stored.

      You would need to update the scripts. I can add you to the project if
      you like.

      Regards

      Martin


      Martin Krischik
      mailto://krischik@users.sourceforge.net
      https://sourceforge.net/users/krischik

      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1
      Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

      iD8DBQFXcYfbijwKaHyem9cRAukzAJ9+37DqSDEtNvI85hm7vUU9SY0JSwCgsTS6
      XeJ1+m8o3ecHmlD1zSUhSA0=
      =B+Z6
      -----END PGP SIGNATURE-----

       
      • Gurce

        Gurce - 2016-06-28

        Thanks for all the points you raised Martin. I'll look into them and see how I fare.

        If I eventually manage to figure out a way to get the newer gnat building as an rpm for cygwin, I'll ping you again regarding your suggestion to get those efforts added to the project.

        Cheers,
        Gurce

         
  • Simon Wright

    Simon Wright - 2016-06-26

    If you just want Ada, the recommendation at GetAdaNow.com is for TDM-GCC (latest version 5.1).

     
  • Gurce

    Gurce - 2016-06-27

    Thanks Simon.

    I've given that a try. I used the gcc from the TDM-GCC install. The build progressed further, all the ada stuff seemed to compile fine, but then the c-code started to have problems, due to the project making use of function calls within glibc (functions belonging to "signal.h", such as sigemptyset()).

    I read online that mingw's gcc does not make use of glibc, but microsoft's equivalent, so looks like I'm out of luck on that point.

    Aah, now I see why you specified if I just want Ada. So it's looking like that's not the case for this project, it's going to need a newer ada, plus the ability to build c-code that makes use of glibc.

    Any thoughts on if there are any other directions I can push?

    I was thinking of perhaps just trying to build a newer gnat source inside cygwin and try make use of that (perhaps not even try bundling it into an rpm, just to save a bit of elbow-grease).

     

Log in to post a comment.