Comments (5)
I got it to build. Here is what I did:
-
install zlib using homebrew
-
modified the build toolchain script - I tried a few things to manually specify zlib from homebrew instead of mac os clang. You can make a diff if you want to see the details.
-
explicitly defined my library path for homebrew packages (specifically including zlib) :
export LIBRARY_PATH="/opt/homebrew/lib"
from libdragon.
I'd like to request that someone review my changes and test them on their own system to confirm. Then maybe we can do a pull request?
from libdragon.
On my Mac OS M1 with Ventura, I do have zlib installed on Homebrew, but I don't think it's using that one (as the build script, as you noted, doesn't make an effort to use it). I think it's using a "system" one. I think the system one that I have is installed with XCode command line tools.
What happens if you run xcode-select -p
on your system? It should either show a path or print an error. Can you check if the process returns a non-zero exit code when the tools are not installed? In that case, xcode-select --install
should install them.
Alternatively we can try to use zlib from homebrew, but we need a solution that doesn't involve changing LIBRARY_PATH
as that can bring too much stuff into the build, and I can see it causing hard to diagnose problems.
from libdragon.
Thanks for looking into this.
(base) MacBook-Air-2:~ alex$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
(base) MacBook-Air-2:~ alex$ /usr/bin/xcodebuild -version
Xcode 14.3.1
Build version 14E300c
I think the main change that fixed the compilation issues was to remove the --with-system-zlib
argument from the mips gcc compilation, but I haven't tried messing with multiple changes to figure out the one true thing that fixed the issue. Just removing --with-system-zlib
and not anything else lead to a bunch of missing c standard library errors:
#../"gcc-$GCC_V"/configure "${GCC_CONFIGURE_ARGS[@]}" \
LDFLAGS="-L/opt/homebrew/lib" CPPFLAGS="-I/opt/homebrew/include" ../"gcc-$GCC_V"/configure "${GCC_CONFIGURE_ARGS[@]}" \
--prefix="$CROSS_PREFIX" \
--target="$N64_TARGET" \
--with-arch=vr4300 \
--with-tune=vr4300 \
--enable-languages=c,c++ \
--without-headers \
--disable-libssp \
--enable-multilib \
--disable-shared \
--with-gcc \
--with-newlib \
--disable-threads \
--disable-win32-registry \
--disable-nls \
--disable-werror
#--with-system-zlib
from libdragon.
Fixed on both stable and unstable by #483
from libdragon.
Related Issues (20)
- Pre computed display lists HOT 7
- backtrace.c doesn't handle correctly 64-bit addresses
- Hello world HOT 1
- Can't draw sprite with rdp unless drawing in software first HOT 2
- ARM platforms not supported in the Dockerfiles on GHCR HOT 3
- [preview] RSP crash (?) with an extremely simple rom using rdpq
- [preview] rdpq validator validates tile for tex0 even if the combiner does not use it HOT 1
- [preview] new joypad library does not work on iQue HOT 1
- [preview] emit an assert when using Opus on a mixer channel not ready for 48 Khz HOT 1
- Add an assertion when using old-school sprite loading with compressed sprites HOT 1
- [preview] regression in mixer causes audio playback issues with XM64 HOT 1
- stat() doesn't work on directories HOT 1
- argument 1 value ‘18446744073709551611’ exceeds maximum object size 9223372036854775807 HOT 1
- Reading directory contents from sdcard on flash cartdrige HOT 4
- identify_accessory() identifies controller pak as rumble pak HOT 6
- Random Crashes / corruptions when using simple ucode
- Backtrace broken in case exception is triggered in tail call
- Missing examples (good first issue!) HOT 2
- rdpq_sprite_blit crop doesn't work with flipping
- PAL50 resolutions are letterboxed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libdragon.