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

Feature request: TR2X on macOS #2226

Open
Checkm8ra1n opened this issue Jan 6, 2025 · 2 comments · May be fixed by #2247
Open

Feature request: TR2X on macOS #2226

Checkm8ra1n opened this issue Jan 6, 2025 · 2 comments · May be fixed by #2247
Assignees
Labels
Feature New functionality TR2

Comments

@Checkm8ra1n
Copy link

Checkm8ra1n commented Jan 6, 2025

So TR2X for linux is finally in pre-release
Tried to build TR2X on macOS, I used just and docker, worked the build process, but when I try to open the unix exec the terminal says: zsh: exec format error: /Users/checkm8/Downloads/TRX/build/tr2/linux/TR2X
Tried also with Linux compiled build on releases but same error
I know that is a pre-release so this could be normal but I want to say you that on macOS for now doesn't work

@walkawayy
Copy link
Collaborator

walkawayy commented Jan 6, 2025

The Windows and Linux build processes works fine for me on MacOS 15. It's just not fully buildable for me right now due to C23 syntax.

$ just tr2-build-linux 

Docker image rrdash/tr2x-linux not found, trying to download from DockerHub
Using default tag: latest
latest: Pulling from rrdash/tr2x-linux
a7c6c5244b1d: Download complete 
ad1349454cc6: Download complete 
dae7b0afcd80: Download complete 
4f4fb700ef54: Already exists 
b2667935023a: Download complete 
de44b265507a: Download complete 
7fde70f1be42: Download complete 
4fde8e272ad8: Download complete 
7e80273a2d4d: Download complete 
2ba688d9b83e: Download complete 
fc582edb2cb8: Download complete 
Digest: sha256:1173c55fcf069094d51cb5e66fc7eb12b076f8695a93022111a1ef21e3668451
Status: Downloaded newer image for rrdash/tr2x-linux:latest
docker.io/rrdash/tr2x-linux:latest
Docker image rrdash/tr2x-linux downloaded from DockerHub
Running docker image: -e TARGET=debug rrdash/tr2x-linux
docker run --rm --user 501:20 -v /Users/walkawayy/software/TRX:/app/ -e TARGET=debug rrdash/tr2x-linux
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
The Meson build system
Version: 1.6.1

...

[269/309] Compiling C object TR2X.p/game_output.c.o
FAILED: TR2X.p/game_output.c.o 
cc -ITR2X.p -I. -I../../../src/tr2 -I/ext/include -I/ext/include/SDL2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c2x -O0 -g -Wno-unused -Wno-address-of-packed-member -DMESON_BUILD -fms-extensions -fno-omit-frame-pointer -ffile-prefix-map=../../../src/tr2/= -DTR_VERSION=2 -D_REENTRANT -isystem../../../src/tr2/subprojects/libtrx/include -MD -MQ TR2X.p/game_output.c.o -MF TR2X.p/game_output.c.o.d -o TR2X.p/game_output.c.o -c ../../../src/tr2/game/output.c
../../../src/tr2/game/output.c: In function ‘Output_GetObjectBounds’:
../../../src/tr2/game/output.c:871:35: error: variable-sized object may not be initialized except with an empty initializer
  871 |     const XYZ_32 vtx[vtx_count] = {
      |                                   ^

...

error: Recipe `_docker_run` failed on line 39 with exit code 1

I am currently working on creating Mac builds for TR2X as well.

@aredfan aredfan added the TR2 label Jan 6, 2025
@rr-
Copy link
Collaborator

rr- commented Jan 7, 2025

@walkawayy you can make a PR and I can help you out with c23 features.

@rr- rr- changed the title TR2X Build error on macOS Feature request: TR2X on macOS Jan 7, 2025
@rr- rr- added the Feature New functionality label Jan 7, 2025
@rr- rr- moved this to Ready in TRX Dev tracker Jan 7, 2025
@rr- rr- moved this from Ready to In progress in TRX Dev tracker Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality TR2
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

4 participants