Description of problem: From the document released by Redhat “Red Hat Enterprise Linux 8 Considerations in adopting RHEL 8” "GCC no longer builds Ada, Go, and Objective C/C++ code Capability for building code in the Ada (GNAT), GCC Go, and Objective C/C++ languages has been removed from the GCC compiler. To build Go code, use the Go Toolset instead" What is the way forward for Objective C applications in RHEL8.1 ? Why has the support been discontinued for objective C compilation in gcc ? Thank you for your time. Regards. Version-Release number of selected component (if applicable):RHEL8.1 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
As part of the RHEL 8 process we evaluated all the packages we were shipping and tried to eliminate packages that had limited customer need and which were not really supportable. Objective C was one of those packages. Can you explain what your needs are WRT Objective C? We may be able to recommend workarounds, alternate repositories, custom builds, etc that might satisfy your requirements. Thanks, Jeff
Our application is written in objective-c , and we have been using gcc so far to compile it. So during the move to RHEL8 we have been impacted by this non support of objective in gcc as well as the absence of runtime objc.
My recommendation here would be to use the forward compatability that exists between RHEL 7 and RHEL 8 to run the RHEL 7 application on RHEL 8. That should in turn give your organization time to port the application to a fully supported language. The other short term option would be to build your own GCC from our source RPMs and enable Objective-C. That should be a one line change (search for "build_objc" in the .spec file). Just to reiterate, these are both stop-gap measures to get you running in the immediate term. The longer term solution is almost certainly going to require porting the application to a supported language such as C/C++, Rust, Java or even something like python..
We have started using the clang compiler to build the objective C code, and also building the run time libraries from the libobjc2 ( https://github.com/gnustep/libobjc2 ) . The clang compiler seems to be available as part of the redhat packages, only the objective C runtime requires to be built and packaged. Using RHEL7 apps on RHEL8, a bit doubtful about the library versions the application would link to and their availability on RHEL8. Hence did not choose that path. Let us know your views on CLANG. If gcc were to be built with the build_objc in the spec, will it also build the run time libraries of objective C. Can you share the version of gcc that we may have to use in such case, along with the spec file ? Thank you. Regards.
(In reply to tharthi from comment #4) > If gcc were to be built with the build_objc in the spec, will it also build > the run time libraries of objective C. Can you share the version of gcc that > we may have to use in such case, along with the spec file ? You'd just rpm -ivh ..../gcc-8.3.1-5.el8.src.rpm # or whatever src.rpm matches your installed gcc sed -i -e 's/^\(%global build_objc\) 0/\1 1/' ~/rpmbuild/SPECS/gcc.spec dnf builddep ~/rpmbuild/SPECS/gcc.spec rpmbuild -ba -v ~/rpmbuild/SPECS/gcc.spec and ~/rpmbuild/RPMS/*/{gcc-objc{,++},libobjc}-8*.rpm would be the packages you want to install then for ObjC and ObjC++ support.
Thank you, on my side had also had a question on CLANG and libobjc2 , it has not been answered. Can you comment ?
Note that while our Clang/LLVM toolkits currently include Objective-C, that's an accident. It's almost certain Objective-C will be removed from them at some point in the near future. The key point to remember here is that Objective-C is not a language Red Hat supports and migrating away from it to a supported language would be strongly encouraged.
Given Red Hat is obviously not interested in shipping gcc-objc and libobjc with RHEL 8, bug #1983416 is my package review request for gcc-objc and libobjc for EPEL 8. The goal of the gcc-epel package is to stay on the same version like the gcc package in RHEL 8 (if technically possible); active co-maintainers are welcome.