simonjwright / distributing-gcc

Binary releases of GCC (native and cross) on macOS; also, the scripts/Makefiles used for producing them.
BSD 3-Clause "New" or "Revised" License
40 stars 0 forks source link

Unable to install GNAT on Monterey 12.6 - error in install script. #18

Closed SoftImp closed 8 months ago

SoftImp commented 9 months ago

In association with installing "gnatstudio" (November 22 version) I downloaded the distributing-gcc-gcc-12.1.0-x86_64 asset. Read the relatively straightforward instructions and activated the doinstall script. It failed with the error recorded in install-log as shown below:

Please note that the reference to version 11.1.0 is that given within the asset - I can only presume it is correct.

rm -fr /opt/gcc-12.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/rts rm -fr /opt/gcc-12.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/adainclude /opt/gcc-12.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/adalib mkdir -p /opt/gcc-12.1.0 for f in /opt/gcc-12.1.0/bin/x86_64-apple-darwin15-gnat \ /opt/gcc-12.1.0/bin/x86_64-apple-darwin15-gcc; do \ case $f in \ x86_64-apple-darwin15-gnatemu) ;; \ ) rm -f "$f";; \ esac; \ done for d in bin lib libexec include share x86_64-apple-darwin15; do \ if [ -d $d ]; then \ tar cf - $d | (cd /opt/gcc-12.1.0; tar xf -); \ fi \ done rm -rf /opt/gcc-12.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/include-fixed mkdir -p /opt/gcc-12.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/include-fixed case x86_64-apple-darwin15 in \ -lynxos) ;; \ ) /opt/gcc-12.1.0/libexec/gcc/x86_64-apple-darwin15/11.1.0/install-tools/mkheaders -v -v /opt/gcc-12.1.0;; \ esac /bin/sh: /opt/gcc-12.1.0/libexec/gcc/x86_64-apple-darwin15/11.1.0/install-tools/mkheaders: No such file or directory make: *** [ins-basic] Error 127

BTW: I am using the default zsh

simonjwright commented 9 months ago

I’m not at all sure when you downloaded the 12.1.0 asset, because I deleted it a while ago on the grounds that GCC 12.1.0 on macOS could not compile C code on Ventura (see this patch). I also don’t have a local copy, sorry.

As far as I know, the doinstall script was installed by the build of gprbuild; I removed this in this commit which was during the build of 12.0.1, so I’m surprised that it ended up in a 12.1.0 build.

The current installation instructions (work in progress) are in the Wiki. If you follow those (i.e. don’t run doinstall) you should be OK.


I’d strongly recommend that you install the 13.1.0 release.

SoftImp commented 9 months ago

Simon,The (perhaps incorrect) reason to try and install GCC 12.1.0 was to overcome a problem I was having with gnatstudio (downloaded and installed as November 2022 version) - which (for a very simple hello world program) kept reporting that gprbuild did not exist - assuming/using default paths.  Thus, I (perhaps rather simple-mindedly) deduced from the gnatstudio readme instructions that I needed to install GNAT separately.  the link to GCC 12.1.0 was given in the readme file.I’ve been using gnatstudio on a Linux VM for some time, but have been hoping to come across a version of gnatstudio that worked on MacOS - my preferred O/S.If there’s any pointers you can provide to help me achieve this, then I’d be eternally grateful! 😇Regards.Clive.Dr Clive BoughtonSoftware ImprovementsBYWONG NSW

simonjwright commented 9 months ago

Clive,

I’m not quite sure how you managed to end up in this position. Try this:

  1. Delete the /opt/gcc-12.1.0 tree.
  2. Delete GNATStudio.app.
  3. Go here and download gcc-13.1.0-x86_64-apple-darwin21.pkg.
  4. Follow the notes on installing the package in the Wiki; it installs under /opt/gcc-13.1.0. DO NOT MESS WITH THE CONTENTS OF THAT DIRECTORY.
  5. If you want to use the compiler from the command line, follow the notes on setting the PATH.
  6. Reinstall GNATStudio. DO NOT OPEN IT YET.
  7. In /Applications/GNATStudio.app/Contents, edit Info.plist as in GNATStudio’s README: change both GS_GNAT_PATH and GS_GPR_PATH’s values to /opt/gcc-13.1.0/bin.

Now you should be good to go.

SoftImp commented 9 months ago

Simon,

Thank you somuch for this brief, exact set of instructions.

Very early in 2023, I searched for 'gnatstudio on MacOS'. Nothing much showed up except for ALIR stuff. Upon searching through that environment it appeared that gnatstudio did not exst for anything other than Windows and Linux. I wrote to the organiaers about the 'omission', but no-one pointed me to your site. Of course it is possible that they weren't aware of the existence of gnatstudio on MacOS. I played around with the ALIR environment for a while, but wasn't terribly taken with it. So I gave up on further searches until very recently.

My recent search threw up the sourceforge site containing gnatstudio (the Nov 2022 version). It is possible that I missed any references to recent updates. In any case, I downloaded the available version. From that point on any issues are probably down to my mis-interpretation(s) of how to set things up. Have briefly viewed some of the more recent updates you've created, it is clear that there are some substantial differences in the instructions.

I now anticipate no/few issues with the installation! 😉

Regards.

Clive.

Dr Clive Boughton

Software Improvements GPO Box 1928 Canberra ACT 2601 Australia

Street address: 97 Bankers Road, NSW 2621 Australia

Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195

On 11 Jan 2024, at 7:54 am, Simon Wright @.***> wrote:

Clive,

I’m not quite sure how you managed to end up in this position. Try this:

Delete the /opt/gcc-12.1.0 tree. Delete GNATStudio.app. Go here https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-13.1.0-x86_64 and download gcc-13.1.0-x86_64-apple-darwin21.pkg. Follow the notes on installing the package https://github.com/simonjwright/distributing-gcc/wiki/InstallingThePackage in the Wiki https://github.com/simonjwright/distributing-gcc/wiki; it installs under /opt/gcc-13.1.0. DO NOT MESS WITH THE CONTENTS OF THAT DIRECTORY. If you want to use the compiler from the command line, follow the notes on setting the PATH https://github.com/simonjwright/distributing-gcc/wiki/SettingThePath. Reinstall GNATStudio. DO NOT OPEN IT YET. In /Applications/GNATStudio.app/Contents, edit Info.plist as in GNATStudio’s README: change both GS_GNAT_PATH and GS_GPR_PATH’s values to /opt/gcc-13.1.0/bin. Now you should be good to go.

— Reply to this email directly, view it on GitHub https://github.com/simonjwright/distributing-gcc/issues/18#issuecomment-1885715439, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFW2YQKLFAQGRITSYA4U6DYN35YZAVCNFSM6AAAAABBSRTOY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBVG4YTKNBTHE. You are receiving this because you authored the thread.

SoftImp commented 8 months ago

Simon,

Once again, thank you for your help in my efforts to install GNATStudio on Monterey 12.6. It was all quite straight forward and I have it functioning well.

I'm now contacting you before going down too many rabbit holes in my quest to 'activate' various GNATCOLL components - especially th DB ones for Postgres and SQL. I'm assuming (with trepidation) that all I need to do is undertake the build instruction thatcome with each (or at least most) of the GNATCOLL components. However, as I was reading some of the build instructions there were a few notes of 'incompatibility' that led me to hesitate.

I realise that you may not be able to be able to advise me on this matter, but I thought I'd better start with you because there seems to be 'bugger-all' stuff relating to MacOS and GNAT-anything!

Although I can (and have) setup either Linux or Windows environments in order to be more compatible with AdaCore, I do prefer MacOS.

Regards.

Clive.

Dr Clive Boughton

Software Improvements GPO Box 1928 Canberra ACT 2601 Australia

Street address: 97 Bankers Road, NSW 2621 Australia

Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195

SoftImp commented 8 months ago

Simon,

Finally found the github site 'building_gcc_macos_native'. I obviously wasn't using the right keywords in my earlier searches.

Obviously, I can move forward now with/without your advice! 😉

Regards.

Clive.

Dr Clive Boughton

Software Improvements GPO Box 1928 Canberra ACT 2601 Australia

Street address: 97 Bankers Road, NSW 2621 Australia

Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195

On 2 Feb 2024, at 4:20 pm, Clive Boughton @.***> wrote:

Simon,

Once again, thank you for your help in my efforts to install GNATStudio on Monterey 12.6. It was all quite straight forward and I have it functioning well.

I'm now contacting you before going down too many rabbit holes in my quest to 'activate' various GNATCOLL components - especially th DB ones for Postgres and SQL. I'm assuming (with trepidation) that all I need to do is undertake the build instruction thatcome with each (or at least most) of the GNATCOLL components. However, as I was reading some of the build instructions there were a few notes of 'incompatibility' that led me to hesitate.

I realise that you may not be able to be able to advise me on this matter, but I thought I'd better start with you because there seems to be 'bugger-all' stuff relating to MacOS and GNAT-anything!

Although I can (and have) setup either Linux or Windows environments in order to be more compatible with AdaCore, I do prefer MacOS.

Regards.

Clive.

Dr Clive Boughton

Software Improvements GPO Box 1928 Canberra ACT 2601 Australia

Street address: 97 Bankers Road, NSW 2621 Australia

Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195

SoftImp commented 8 months ago

Simon,

As you may remember I have installed GNATStudio based on the macOS GCC 13.1.0 (x86_64).

Within the instructions you provided to me, I needed to delete the existing GNATStudio download and install GCC 13.1.0 before I then downloaded and installed the GNATStudio.

I'm now in the process of installing the GNATCOLL libraries, but noticed that the default for doing so is GCC 13.2.0.

Do I need to re-install GNATStudio based on GCC 13.2.0, or do I edit the version number for the make invocation to install the GNATColl stuff, or do I ignore the differences and proceed to install the GNATColl libraries using GCC 13.2.0 anyway? I'm inclined to assume the latter option, but there may be some idiosyncrasy that's going to cause problems.

As I am not building on Apple Silicon, I'm presuming I can ignore the business about invoking an x86_64 shell?

Hopefully, a quick answer is all that's necessary here!

Regards.

Clive.

Dr Clive Boughton

Software Improvements GPO Box 1928 Canberra ACT 2601 Australia

Street address: 97 Bankers Road, NSW 2621 Australia

Mobile Phone: +61 (0)410 632 055 Telephone: +61 (0)2 6230 3195

simonjwright commented 8 months ago

Clive, you made a new issue repeating your last comment here, so I think this one is done.