bugGforth - Bugs: bug #64436, Building from git on macOS Montery...

 
 

bug #64436: Building from git on macOS Montery fails because install-deps.sh exports CC=gcc-11

Submitter:  None
Submitted:  Mon 17 Jul 2023 05:45:54 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  paysan
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Jul 2023 11:59:43 PM UTC, comment #1: 

I added this code with the modification to use \ls instead of ls so that aliased versions of ls don't impact the result.

Bernd Paysan <paysan>
Group administrator
Mon 17 Jul 2023 05:45:54 PM UTC, original submission:  

The current version of GCC in brew for macOS is gcc-13, but install-deps.sh explicitly exports CC=gcc-11 in install_osx(), which is not found and causes the swig configure to fail.

Unfortunately, I think you need to list all the versions of gcc that brew has installed and pick the latest one.

Here's a diff of the change that worked for me:


diff --git a/install-deps.sh b/install-deps.sh
index 6aa6d480..e17262ec 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -81,7 +81,8 @@ install_osx() {
   brew install --cask xquartz mactex
   export PATH="/Library/TeX/texbin:$PATH"
   brew link --overwrite gcc
-  export CC=gcc-11
+  INSTALLED_GCC=$(basename $(ls /usr/local/bin/gcc-* | /usr/bin/grep -E 'gcc-[0-9]+$' | /usr/bin/sort --version-sort | /usr/bin/tail -1))
+  CC=$INSTALLED_GCC
 #  (cd /usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin17.7.0/8.2.0/include-fixed && mv stdio.h stdio.h.botched)
 }


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by paysan (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-19 paysan StatusNone Fixed
        Assigned toNone paysan

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code