|
Post by 85nesplayer on Mar 13, 2024 6:23:25 GMT
Hey everyone! So, just like the title says, I'd like to get HuC up and running on my Mac (Monterey). I ran the Makefile, and everything compiled until it got to the examples folder. When it tries to compile any example programs, it gives an "invalid expression" error and aborts after a few of those. I have added the "include" folder to the usr/local/ folder, but is there anything else I have to do?
|
|
|
Post by elmer on Mar 13, 2024 22:31:45 GMT
Hey everyone! So, just like the title says, I'd like to get HuC up and running on my Mac (Monterey). I ran the Makefile, and everything compiled until it got to the examples folder. When it tries to compile any example programs, it gives an "invalid expression" error and aborts after a few of those. I have added the "include" folder to the usr/local/ folder, but is there anything else I have to do? Build with what tools? XCode or Brew? What is the exact error message (inlcuding what is printed out close to the error)? Where did you get that HuC source from? Is there a particular reason that you're not using the pre-build version for the Mac? I'm not a Mac user personally, but someone who is may be along later, and the more information that you give, the more likely folks are to be able to help.
|
|
|
Post by 85nesplayer on Mar 13, 2024 23:41:01 GMT
Certainly! I built it through Visual Studio Code with the Makefiles Tools extension. I downloaded both the HuC source and the Darwin pre-release from the pce-devel GitHub page.
Here is the terminal output when it ran into the error:
-----> make all in examples /Library/Developer/CommandLineTools/usr/bin/make --directory=examples all -----> make all in huc /Library/Developer/CommandLineTools/usr/bin/make --directory=huc all -----> make all in acd /Library/Developer/CommandLineTools/usr/bin/make --directory=acd all ../../../bin/huc -v -acd -over -sgx -fno-recursive -msmall ac_test.c HuC (, ) ;error: ac_test.c(37) ; vpc_win_size( , 0x01ff); ; ^ ;****** invalid expression ****** ;error: ac_test.c(37) ; vpc_win_size( , 0x01ff); ; ^ ;****** missing bracket ****** ;error: ac_test.c(37) ; vpc_win_size( , 0x01ff); ; ^ ;****** missing semicolon ****** ;error: ac_test.c(37) ; vpc_win_size( , 0x01ff); ; ^ ;****** missing semicolon ****** ;error: ac_test.c(37) ; vpc_win_size( , 0x01ff); ; ^ ;****** too many errors, aborting ****** make[6]: *** [ac_test.ovl] Error 1 make[5]: *** [acd] Error 2 make[4]: *** [all] Error 2 make[3]: *** [huc] Error 2 make[2]: *** [all] Error 2 make[1]: *** [examples] Error 2 make: *** [all] Error 2
It used to say it couldn't find the huc.c file from the include folder, but I manually added it to my usr/local folder. Regardless, the errors were the same.
|
|
mrzonk
What's a PC Engine?
Posts: 3
|
Post by mrzonk on Mar 14, 2024 3:19:44 GMT
Hi, I'm afraid that I'm not too familiar with the Visual Studio Code path you mention on macOS.
On my side here having built HuC on Ventura, Monterey, Sonoma et al, I install Xcode, then I install the command line tools (just in case there is something missing as Xcode keeps getting slimmer, and slimmer) and then follow that up with a suitable build-env homebrew recipe such as:
brew install pkg-config cmake autoconf automake clang-format
Then I run make ( no -j, just a single thread to compile everything) and it all comes together.
Here's my equivalent output to your sample:
-----> make all in examples /Applications/Xcode.app/Contents/Developer/usr/bin/make --directory=examples all -----> make all in huc /Applications/Xcode.app/Contents/Developer/usr/bin/make --directory=huc all -----> make all in acd /Applications/Xcode.app/Contents/Developer/usr/bin/make --directory=acd all ../../../bin/huc -v -acd -over -sgx -fno-recursive -msmall ac_test.c HuC (v4.00.70.g4ae16e2, 2024-03-12)
No errors PC Engine Assembler (v4.00.70.g4ae16e2, 2024-03-12)
Hope the above helps. (P.S. I realize not everyone is up for/open to installing home-brew on their Mac to manage all of the various items needed for general OSS development but it's what begrudgingly works for me).
|
|
|
Post by elmer on Mar 14, 2024 3:34:06 GMT
Hi, I'm afraid that I'm not too familiar with the Visual Studio Code path you mention on macOS. Yeah sorry ... none of the core developers use Visual Studio Code AFAIK. There *may* be a reason to change that position in the future, but right now there are enough things-to-do and difficulties that it's not been a focus. brew install pkg-config cmake autoconf automake clang-format I suspect that some of those packages aren't needed for HuC itself, but they will be needed to build other useful stuff like "mednafenPceDev". I believe that there's something in the HuC makefiles that needs a more-modern version of GNU make than Apple ships, which is another reason to install homebrew. Even if we can get HuC itself to compile without homebrew, I'm pretty sure that mednafenPceDev will never compile on tne Mac without it.
|
|
|
Post by 85nesplayer on Mar 14, 2024 5:32:08 GMT
So I followed mrzonk's procedure and installed Xcode and Command Line tools, ran the homebrew recipe, executed the make command and the same error still occurred. Anything else that I should have done?
|
|
|
Post by elmer on Mar 15, 2024 2:44:54 GMT
Are you still trying to build from within Visual Studio Code?
I just ...
1) powered up the-Mac-that-I-hardly-ever-use (running Sonoma) 2) got the current XCode and command line tools (without getting homebrew) 3) opened up a terminal window and entered ... 3a) git clone https://github.com/pce-devel/huc.git 3b) cd huc 3c) make
It all worked fine!
There are a bunch of warnings from clang that we need to fix, primarily because the libpng and zlib source that we use needs to be updated, but everything built, and both "make check" and "make test" passed.
|
|
|
Post by 85nesplayer on Mar 15, 2024 20:36:56 GMT
I installed Xcode 14.2 (the latest version of Xcode that will work with Monterey) and its corresponding command-line tools. I followed your instructions, but I still got the same errors as before. I gave up trying it with Monterey, so I updated the computer to Sonoma, installed the latest Xcode (15.3) and its corresponding command-line tools, followed your instructions, and this time it FINALLY compiled without errors! Thank you, elmer and mrzonk, for taking the time to help me!
|
|