Coder Social home page Coder Social logo

rhel_centos_8_ada_compiler_rpm's Introduction

rhel_centos_8_ada_compiler_rpm

"ada compiler rhel8" "rhel8 ada" "centos8 gnat rpm" "rhel8 gnat 32 bit rpm"

ada is no longer provided by redhat in rpm format.

rhel 8 is a 64 bit OS, but it can run 32 bit code. The gcc toolset will still make 32 bit object.

This ada compiler will also make 32 bit code. But support in the spec file is kind of "rusted".

These rpms are provided for situations where you want to keep the gcc version the same as original. So, it "sneaks right in" at the expense of the file names being the same. I haven't done it, but I assume you will need to delete the rpms prior to 'dnf update' actually updating the base gcc.

Why do you have to replace the base gcc package? It is needed because invoking gcc with a .adb file works.

OS version gcc version
CentOS-8.1.1911 gcc-8.3.1.4
CentOS-8.2.2004 gcc-8.3.1.5
CentOS-8.3.2011 gcc-8.3.1.5
CentOS-Stream-8 "who knows!"

At the time this is written, there are no source rpms available for "stream", and if they were, what is current? You can get them from a centos git repository, but at this point I don't need it.

The version you have installed is important.

$ rpm --query gcc

To install:

  1. install "GUI Server"

  2. install yum utils

           `yum install yum-utils`
    
  3. enable this rep

           `vi /etc/yum.repos.d/CentOS-PowerTools.repo 
    
  4. update the system

           `yum update`
    
  5. Install headers (to include 32 bit) (need to figure out the correct version..., one of these will work)

            `dnf install glibc-devel-2.28-127.el8.i686`
            `yum install glibc-devel-2.28-101.el8.i686 glibc-common glibc-headers`
    
  6. Install the redhat compilers

            `yum groupinstall "Development Tools"`
    
  7. The ada packages have exactly the same names as the rest of the gcc package. So, we need to make sure the versions match exactly.

            `rpm --query gcc`
    

Keep the results availible. They must match.

  1. Install the ada rpms. The below example shows selecting the correct versions with a wildcard.

           `cd <where the rpms are>`
           `yum localinstall *8.3.1-5*`
            or
           `rpm --reinstall *8.3.1-5*`
    
  2. Test Program (cut and paste into a.adb)

 with text_io;
 
  procedure a is
 
  begin
 
     text_io.put_line("hello");
 
  end;

#10. Try it

gnatmake -m32 a.adb

file ./a

./a

or

gnatmake a.adb

file ./a

./a

#11. The changes to the spec file is in the file "pfile". Not proud of it, but it is what it is.

Note: The above ada compiler was built without running the testsuite (because I didn't change any functional source) and it was not 'bootstrapped'. It should work fine, but it is a little different than one would expect.

So, do you trust some random rpm from the internet? Probably not the smartest thing to do. You may want to build this for yourself; the problem is that building gcc-gnat requires having an ada compiler. And that has to come from somewhere.

No matter what, you have to trust something.

My suggestion is to install the binary rpms for the version you need, and then follow the below suggestions. They are not verified, but they should get you close to being able to compile these from source.

 `cd SRPMS`
 `rpm --install gcc-8.3.1-5.el8.0.3.src.rpm`  
 `cd`
 `cd rpmbuild`
 `cd SPECS`
 `yum install zlib-devel`
 `yum install dblatex`
 `yum install dejagnu doxygen elfutils-devel elfutils-libelf-devel glibc-static  gmp-devel isl-devel libmpc-devel mpfr-devel python3-devel`
 `yum install python3-sphinx sharutils systemtap`
 `yum install systemtap-sdt-devel texinfo-tex`
 `rpmbuild -ba gcc.spec`

rhel_centos_8_ada_compiler_rpm's People

Contributors

buddavis avatar

Watchers

 avatar

rhel_centos_8_ada_compiler_rpm's Issues

gcc-gnat in EPEL 8

With FEDORA-EPEL-2021-5848dcbea8, gcc-gnat landed recently in Fedora EPEL 8. Yes, it covers 64 bit only. However there are flags in the spec file to enable local 32 bit builds with or without bootstrapping (requires local mock). Maybe it saves some future work for you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.