Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on macOS on brew install: #6

Open
LakeIshikawa opened this issue Feb 24, 2024 · 13 comments
Open

Error on macOS on brew install: #6

LakeIshikawa opened this issue Feb 24, 2024 · 13 comments
Assignees

Comments

@LakeIshikawa
Copy link

LakeIshikawa commented Feb 24, 2024

Just following the instructions step by step gives me this on a Mac Studio (M2) after issuing brew install ngdevkit ngdevkit-gngeo:

==> Installing dependencies for dciabrin/ngdevkit/ngdevkit: dciabrin/ngdevkit/ngdevkit-toolchain, mpdecimal, [email protected], libyaml and pyyaml
==> Installing dciabrin/ngdevkit/ngdevkit dependency: dciabrin/ngdevkit/ngd
==> /opt/homebrew/opt/make/bin/gmake -- prefix=/opt/homebrew/Cellar/ngdevkit-too
Last 15 lines from /Users/lakeishikawa/Library/Logs/Homebrew/ngdevkit-toolchain/01.sources.redhat.com:
checking for endian.h... no
checking for sys/endian.h... no
checking for machine/endian.h... yes
checking for sys/isa_defs.h... no
checking for uchar.h... no
checking for treedec/combinations.hpp... no
configure: treedec library missing, falling back to Thorup.
checking for gala/graph.h... no
checking for boost/graph/adjacency_list.hpp... no
configure: error: boost library not found (boost/graph/adjacency_list.hpp).
gmake: *** [Makefile:304: build/ngsdcc] Error 1
gmake: *** Waiting for unfinished jobs....
   25 20.0M   25 5206k    0     0   239k      0  0:01:25  0:00:21  0:01:04  242k 18 31.3M   18 5926k    0     0   239k      0  0:02:14  0:00:24  0:01:50  243k24 :0474: 2440.  242k0M   47 9828k    0     0   241k      0  0:01:24  0:00:40  0:0 37 31.3M   37 11.7M    0     0   240k      0  0:02:13  0:00:49  0:01:24  243k0: 61  0     0   241k   20.0M   61   0 12.2M    0     0   241k      0:02:13  0:0   41 31.3M   41 12.9M    0     0   241k      0  0:02:13  0:00:54  0:01:19  246k40   65 20.0M   65 13.1M    0     0   241k      0  0:01:24  0:00:55  0:00:29  242k  042:0 31.3M   42 13.3M    0     0   241k      0  0:02:13  0:00:56  0:4:27  239 18 76.1M   18 14.2M    0       0   240k      0  0:05:23  0:01:00  0:04:23  242k 0:1901 7:26.4 1M 0  :0 11:9 0214  .70:M 00  :2 0     0   241k      0  0:05:23   0 76 20.0M   76 15.2M    0     0   241k      0  0:01:24  0:01:04  0:00:20  243k 77 20.0M   77 15.5M    0     0   241k      0  0:01:24  0:01:05  0:00:19  246k31 51 31.3M   51 16.2M    0     0   241k      8 0  0 0:02:12  0:01::0080:  0:01:04 57 31.3M   57 18.1M    0     0   241k      0  0:02:12  0:01:16  0:00:56  246k0 100 20.0M  100 20.0M    0     0   242k      0  0:01:24  0:01:24 --:--:--  244k
 26 76.0     0   241M   26 20.4M    0     0   241k      0 2k      0  0:02:12  0: 3 31 1.76.1M   31 24.0M    0     0   242k      0  0:05:22  0:01:41  0:03:41  242  0:01:49  0:00:23  243k 34 76.1M   34 25.9M    0     0   242k      0  0:05:21  37 76.1M   37 28.3M    0     0   242k      0  0:05:21  0:01:59  0:03:22  243M  100 31.3M  100 31.3M    0     0   242k      0  0:02:12  0:02:12 --:--:--  245k
100 76.1M  100 76.1M    0     0   243k      0  0:05:20  0:05:20 --:--:--  245k

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/dciabrin/homebrew-ngdevkit/issues
@dciabrin dciabrin self-assigned this Mar 1, 2024
@dciabrin
Copy link
Owner

dciabrin commented Mar 3, 2024

Just replicated locally, it seems that at least on Sonoma, sdcc 4.2 fails to build autoconf tests. sdcc 4.4 is known to work [1], so I'll bump this dependency in ngdevkit.
[1] https://formulae.brew.sh/formula/sdcc

dciabrin added a commit to dciabrin/ngdevkit-toolchain that referenced this issue Mar 3, 2024
SDCC 4.2 doesn't build anymore on arm macOS Sonora. Bump dependency
to a version that supports this OS combination.

Ref dciabrin/homebrew-ngdevkit#6
@jeromeEzDATASolutions
Copy link

jeromeEzDATASolutions commented Mar 11, 2024

ive the same problem on my new mac with proc M3

@jeromeEzDATASolutions
Copy link

how i fix it this problem please ?

@dciabrin
Copy link
Owner

Hmmm, there was a failed run in the azure CI, and dciabrin/ngdevkit-toolchain@24799d9 doesn't seem to have landed as expected in homebrew-ngdevkit.
I'm looking into it and will let you know

@jeromeEzDATASolutions
Copy link

i work on the dev of ghost goblins with your framework :
https://www.facebook.com/15kbesancon/videos/979982286879466/

@dciabrin
Copy link
Owner

OK I relaunched the previously failing CI run, and a new homebrew version for ngdevkit-toolchain has just been pushed.

Same limitation as before, there is no bottle for M1*, but when installing it locally on a Mac M1, the build done by brew is now passing:

==> Summary
🍺  /opt/homebrew/Cellar/ngdevkit-toolchain/0.1+202403032129-1: 987 files, 225.9MB, built in 17 minutes 2 seconds

@jeromeEzDATASolutions can you maybe check on your env and confirm that the latest version now builds correctly?

@jeromeEzDATASolutions
Copy link

I test

@jeromeEzDATASolutions
Copy link

capture

@dciabrin
Copy link
Owner

Thanks @jeromeEzDATASolutions
OK that is a new error, at least the original error reported by @LakeIshikawa seems to be fixed.
I realized that I was building with Xcode 15.0, which was probably why it was passing.
I upgraded to the latest Xcode 15.2, and now I can see that the latest clang complains when building gdb.

/private/tmp/ngdevkit-toolchain-20240313-91525-mindov/ngdevkit-toolchain-nightly-202403032129/toolchain/gdb-9.2/gdb/gdbsupport/enum-flags.h:85:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
    integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type

I'll do another round of fixes and update the issue shortly...

@dciabrin
Copy link
Owner

It turns out the compilation of gdb and gcc is also broken with Xcode 15.2. I have prepared a patch for both so it should be ready soon.
While testing the patch I realized that upgrasding to SDC 4.4 might have impacted the example ROMs as well, so I'll look into it right after.

dciabrin added a commit to dciabrin/ngdevkit-toolchain that referenced this issue Mar 13, 2024
Fix GDB compilation issue with Xcode 15.2
Fix GCC compilation issue with Xcide 15.2
Fix GCC compilation issue on Linux with gcc 14
Tweak SDCC 4.4 compilation to disable the new unwanted backends

Ref dciabrin/homebrew-ngdevkit#6
@dcssrc
Copy link

dcssrc commented Jan 11, 2025

Has there been any more progress on this? I've attempted to compile on my Intel iMac running Mac OS 15.2 and get the following result:

brew install ngdevkit             
==> Fetching dependencies for dciabrin/ngdevkit/ngdevkit: dciabrin/ngdevkit/ngdevkit-toolchain
==> Fetching dciabrin/ngdevkit/ngdevkit-toolchain
==> Downloading https://github.com/dciabrin/ngdevkit-toolchain/archive/refs/tags/nightly-202501031114.tar.gz
Already downloaded: /Users/macuser/Library/Caches/Homebrew/downloads/afd255a1e2260c0ba6a50f629c7baf53d05d78d2285e78d4a341bb586dea5348--ngdevkit-toolchain-nightly-202501031114.tar.gz
==> Fetching dciabrin/ngdevkit/ngdevkit
==> Downloading https://github.com/dciabrin/ngdevkit/archive/refs/tags/nightly-202412282113.tar.gz
Already downloaded: /Users/macuser/Library/Caches/Homebrew/downloads/79fbf5d4fcfb52c84eb23ca07a572eb099462238c729935d4ad268e2efe8a32e--ngdevkit-nightly-202412282113.tar.gz
==> Installing ngdevkit from dciabrin/ngdevkit
==> Installing dependencies for dciabrin/ngdevkit/ngdevkit: dciabrin/ngdevkit/ngdevkit-toolchain
==> Installing dciabrin/ngdevkit/ngdevkit dependency: dciabrin/ngdevkit/ngdevkit-toolchain
==> /usr/local/opt/make/bin/gmake -- prefix=/usr/local/Cellar/ngdevkit-toolchain/0.1+202501031114-1 GNU_MIRROR=https://mi
Last 15 lines from /Users/macuser/Library/Logs/Homebrew/ngdevkit-toolchain/01.sources.redhat.com:
1 7.7M    10   4 176.1M    4 03903:k6230k0:02     0:02:00  318k  0     0   728k      0  0:00:24  0 :00:02  0:00:22  728k   5     0  21239k      0  0:01:02  0:00:02  0:01:00 1239k0.0M    5 1096k    0     0   474k      0  0:00:43  0:00:02  0:00100 19.1M  100 19.1M    0     0  3076k      0  0:00:06  0:00:06 --:--:-- 4422k
tar -C toolchain -xmf toolchain/sdcc-src-4.4.0.tar.bz2 && \
        cd toolchain/sdcc-4.4.0 && for i in `find ../../patches -type f -name 'sdcc-*.patch' | sort`; do patch -p1 < $i; done
    0   63 :0010:08 7 0::.7M 0  630 :11.02M    0     0 0 15107k      0  0:0 0:12 1 0:00:07  0:070:050 76k19:24  0:00:07   63 31.3M   63 20.0M    0     0  2121k      0  0:00:15  0:00:09  0:00:06 1796k  0:00:08  0:00:55 1203kk
curl: (18) Transferred a partial file
gmake: *** [Makefile:149: toolchain/binutils-2.35.2.tar.bz2] Error 18
gmake: *** Waiting for unfinished jobs....
100 17.7M  100 17.7M    0     0  1960k      0  0:00:09  0:00:09 --:--:-- 2978k
 49 20.0M   49 10.0M    0     0  1117k      0  0:00:18  0:00:09  0:00:09 1598k
curl: (18) Transferred a partial file
gmake: *** [Makefile:158: toolchain/gdb-9.2.tar.xz] Error 18
 19 76.1M   19 15.0M    0     0  1472k      0  0:00:52  0:00:10  0:00:42 1935k
curl: (18) Transferred a partial file
gmake: *** [Makefile:152: toolchain/gcc-11.4.0.tar.xz] Error 18
patching file 'support/cpp/gcc/Makefile.in'

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/dciabrin/homebrew-ngdevkit/issues

@dciabrin
Copy link
Owner

@dcssrc (and @jeromeEzDATASolutions for context) so it turns out that I added support for prebuilt brew bottles for M1 machines just a couple a weeks ago [1], the doc is not yet up-to-date.

@dcssrc this has a side effect for you. In order to support M1, I had to switch the CI provider from azure pipeline to github actions. However, if I read [2] correctly, github actions does not plan to provide hosted runner for recent macOS version for intel. And keeping azure and github actions is too much of hassle. So I'm afraid you won't be able to consume prebuilt bottles for intel anymore.

@dcssrc In your case though, the error you're reporting seems to be that curl did not finish downloaded the sdcc source code before it could build the toolchain. Is it something that you can consistently reproduce?

[1] edd050b
[2] actions/runner-images#9741

@dcssrc
Copy link

dcssrc commented Jan 11, 2025

@dciabrin I tried re-running the brew command and ended up with the same results. However, since you mentioned that it looked like curl didn't download all of sdcc I installed it via brew with the following results:

brew install sdcc
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sdcc/manifests/4.4.0-1
######################################################################### 100.0%
==> Fetching dependencies for sdcc: gputils
==> Downloading https://ghcr.io/v2/homebrew/core/gputils/manifests/1.5.2
######################################################################### 100.0%
==> Fetching gputils
==> Downloading https://ghcr.io/v2/homebrew/core/gputils/blobs/sha256:b45ab055ab
######################################################################### 100.0%
==> Fetching sdcc
==> Downloading https://ghcr.io/v2/homebrew/core/sdcc/blobs/sha256:b260a444278d1
######################################################################### 100.0%
==> Installing dependencies for sdcc: gputils
==> Installing sdcc dependency: gputils
==> Downloading https://ghcr.io/v2/homebrew/core/gputils/manifests/1.5.2
Already downloaded: /Users/macuser/Library/Caches/Homebrew/downloads/b2bf1d4134dfdba4d6e4505e9b1e03eea9cb592574bdd453086d555b7ebe7672--gputils-1.5.2.bottle_manifest.json
==> Pouring gputils--1.5.2.sonoma.bottle.tar.gz
🍺  /usr/local/Cellar/gputils/1.5.2: 5,597 files, 137.6MB
==> Installing sdcc
==> Pouring sdcc--4.4.0.sonoma.bottle.1.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/sdcc
==> Summary
🍺  /usr/local/Cellar/sdcc/4.4.0: 2,034 files, 149.7MB
==> Running `brew cleanup sdcc`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> sdcc
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/sdcc

After ensuring that it was installed I re-ran brew install ngdevkit and ended up with this output:

brew install ngdevkit
==> Fetching dependencies for dciabrin/ngdevkit/ngdevkit: dciabrin/ngdevkit/ngdevkit-toolchain
==> Fetching dciabrin/ngdevkit/ngdevkit-toolchain
==> Downloading https://github.com/dciabrin/ngdevkit-toolchain/archive/refs/tags/nightly-202501031114.tar.gz
Already downloaded: /Users/macuser/Library/Caches/Homebrew/downloads/afd255a1e2260c0ba6a50f629c7baf53d05d78d2285e78d4a341bb586dea5348--ngdevkit-toolchain-nightly-202501031114.tar.gz
==> Fetching dciabrin/ngdevkit/ngdevkit
==> Downloading https://github.com/dciabrin/ngdevkit/archive/refs/tags/nightly-202412282113.tar.gz
Already downloaded: /Users/macuser/Library/Caches/Homebrew/downloads/79fbf5d4fcfb52c84eb23ca07a572eb099462238c729935d4ad268e2efe8a32e--ngdevkit-nightly-202412282113.tar.gz
==> Installing ngdevkit from dciabrin/ngdevkit
==> Installing dependencies for dciabrin/ngdevkit/ngdevkit: dciabrin/ngdevkit/ngdevkit-toolchain
==> Installing dciabrin/ngdevkit/ngdevkit dependency: dciabrin/ngdevkit/ngdevkit-toolchain
==> /usr/local/opt/make/bin/gmake -- prefix=/usr/local/Cellar/ngdevkit-toolchain/0.1+202501031114-1 GNU_MIRROR=https://mirr
Last 15 lines from /Users/macuser/Library/Logs/Homebrew/ngdevkit-toolchain/01.sources.redhat.com:
In file included from /private/tmp/ngdevkit-toolchain-20250111-3431-hjht7f/ngdevkit-toolchain-nightly-202501031114/toolchain/sdcc-4.4.0/src/z80/ralloc2.cc:24:
/private/tmp/ngdevkit-toolchain-20250111-3431-hjht7f/ngdevkit-toolchain-nightly-202501031114/toolchain/sdcc-4.4.0/src/SDCCralloc.hpp:752:65: warning: unused typedef 'adjacency_iter_t' [-Wunused-local-typedef]
  752 |   typedef typename boost::graph_traits<I_t>::adjacency_iterator adjacency_iter_t;
      |                                                                 ^
4 warnings generated.
rm -f port.a
ar rc port.a gen.o main.o peep.o ralloc.o support.o ralloc2.o
ranlib port.a
gmake[3]: Leaving directory '/private/tmp/ngdevkit-toolchain-20250111-3431-hjht7f/ngdevkit-toolchain-nightly-202501031114/build/ngsdcc/src/z80'
clang++ -std=gnu++11 -pipe -ggdb -I/usr/local/include -I/usr/local/include -Wall -Wno-parentheses -pipe -ggdb -I/usr/local/include -I/usr/local/include -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -o sdcc NewAlloc.o dbuf.o dbuf_string.o findme.o SDCCy.o SDCChasht.o SDCCmain.o SDCCattr.o SDCCsymt.o SDCCopt.o SDCCast.o SDCCmem.o SDCCval.o SDCCicode.o SDCCbitv.o SDCCset.o SDCClabel.o SDCCBBlock.o SDCCloop.o SDCCcse.o SDCCcflow.o SDCCdflow.o SDCClrange.o SDCCptropt.o SDCCpeeph.o SDCCglue.o SDCCasm.o SDCCmacro.o SDCCutil.o SDCCdebug.o cdbFile.o SDCCdwarf2.o SDCCerr.o SDCCsystem.o SDCCgen.o SDCClex.o SDCCbtree.o SDCCgenconstprop.o SDCClospre.o SDCCnaddr.o z80/port.a  -lm 
ld: warning: duplicate -rpath '/usr/local/lib' ignored
ld: warning: duplicate -rpath '/usr/local/lib' ignored
ld: warning: duplicate -rpath '/usr/local/lib' ignored
gmake[2]: Leaving directory '/private/tmp/ngdevkit-toolchain-20250111-3431-hjht7f/ngdevkit-toolchain-nightly-202501031114/build/ngsdcc/src'
gmake[1]: Leaving directory '/private/tmp/ngdevkit-toolchain-20250111-3431-hjht7f/ngdevkit-toolchain-nightly-202501031114/build/ngsdcc'

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/dciabrin/homebrew-ngdevkit/issues

While I didn't see any errors list in the output above I went looking at the referenced 01.redhadsources.com log and discovered three Errors all related to curl partially downloading binutils-2.35.2, gcc-11.4.0, and gdb-9.2. I've attached the log file (I did rename it to a txt file so GitHub would let me upload it.)

01.sources.redhat.txt

The binutils error starts on line 87 and the other two follow pretty closely. However, their line numbers are 97 and 105.

It's rather odd that the downloads are the issue. Since I usually don't have any problems downloading anything.

Out of curiosity I decided to see if I just could compile the devkit from the cloned GitHub repo. Following the included README-macos.md file allowed me to compile everything and it does let me compile and run some of the examples. So I assume it's an issue with how brew is attempting to download using curl and/or an issue related to the fact that I'm still on Intel vs the new M-series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants