Conversation
|
I don't know gitlab that well, but I could not find the mentioned targets. I hope we could get some update on this. |
|
I was able to build it for my Linux x86_64 and Android using your the configs you created in the gitlab yml. It does fix nesbox#2504 (sprites) and nesbox#2319 (javascript games). I made a small Makefile (with the help of ChatGPT) to build it. It can be found with instructions at: https://gist.github.com/imsys/2981c9de54a07abf7a24df139b3237a2 In case anyone wants to just use my binaries, I will host it at my Gdrive until we have an official build. I also tried compiling to Linux aarch64, so I could run it on my TRIMUI handheld. It would just build fine, but the core would just fail to load over there. I will probably check in their community what I may be missing to get it working correctly there. |
|
Thanks for testing. I think what was remaining here was making sure that all build targets passed in libretro buildbot. While most passed, not all did. I'm unclear on the status of that today. Either way, this attempt could do with another update to the latest TIC80 😉 |
|
I was able to compile for the TrimUI, notes are at: https://gist.github.com/imsys/0c67f1b27ff386abb075b67c6fa1766a |
|
Edge case: Bokdown https://tic80.com/play?cart=1411 |
|
Sorry, my bad. The problem is in the TIC-80 main (latest 4c1b009). |
Disable BUILD_WITH_ALL and enable multiple language options in CI configuration.
add this line somewhere before the cmake install: so: .upgrade-cmake:
before_script:
- |
mkdir -p "$CI_PROJECT_DIR/cmake"
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh -o cmake-install.sh
chmod +x cmake-install.sh
./cmake-install.sh --skip-license --prefix=$CI_PROJECT_DIR/cmake
export PATH="$CI_PROJECT_DIR/cmake/bin:$PATH"
cmake --version |
|
For the Switch, while we don't get nesbox#2891, we can use this: libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-cmake-retroarch-master
- .core-defs
before_script:
- export NUMPROC=$(($(nproc)/5))
- sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake"I think the EXTRA_PATH has to be changed to ChatGPT also says the |
|
I'm expecting the variables to be: So the full path to the file that I target the by the way, the command is basically to comment lines from 13 to 31. |
Gemini explains this error at: https://gemini.google.com/share/65d2736e50b0 So, basically applying all the previous fixes: |
|
So, I was debugging the Vita compilation, you can see my discussion with Gemini: https://gemini.google.com/share/0913b6014411 But to make a summary, Gitlab CI/CD doesn't accept: So i had to set it as a before_script + export var. But as it doesn't accept multiples before_script, it would overwrite the upgrade_cmake,.. so I had to combine the upgrade_cmake + the core vars, like: .core-some-32bits-system:
before_script:
- export NUMPROC=$(($(nproc)/5))
- export CORE_ARGS="${CORE_ARGS} ${CORE_32BITS_ARGS}"
- |
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh -o cmake-install.sh
chmod +x cmake-install.sh
mkdir -p "$CI_PROJECT_DIR/cmake"
./cmake-install.sh --skip-license --prefix="$CI_PROJECT_DIR/cmake"
export PATH="$CI_PROJECT_DIR/cmake/bin:$PATH"
cmake --versionI just did not know what to label it all, as some 32bits system works with this, and others doesnt need this,.. so that how I labeled it, haha. I updated the gist to reflect those changes. https://gist.github.com/imsys/f9a4b31a368ff89764c8e636ccf2201b So, the only system left that I need to look into is the emscripten. |
Added support for building with JS and Janet in the CI configuration. Updated various build configurations to include 32-bit system arguments.
|
Like the idea of pushing some of the cmake stuff upstream. Good call 👍 |
This is really quite tricky, maybe this could work? .core-some-32bits-system:
variables:
CORE_32BITS_ARGS: >
-DCMAKE_C_FLAGS_RELEASE="-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB"
-DCMAKE_CXX_FLAGS_RELEASE="-DLUA_32BITS" |
Disable JANET build option in CI configuration.
|
The Switch version is basically fixed, we just need to set Actually, we have to add Speaking of which, they all compile fine, but the lib will be incomplete if we don't do the changes at nesbox#2905 So I thought that for now we could just do: before_script:
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1a27f7a0dcfaf6149cd2c56e9d173c538526648a/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"At least just to check if it works. Or you could add the file to this project and do a Now the biggest problem is still the C/CXX_FLAGS. The next suggestion Gemini gave is to we try this: - |
echo 'set(CMAKE_C_FLAGS_RELEASE "-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"If this doesn't work, probably some variation of it will. So I updated my gist with all those changes. |
|
I thought it would take only a few iterations, but it's taking way more.. libretro-build-ctr (3DS) ✅ fixed Switch build got an error that I was able to reproduce, and I fixed by more updates to libretro.cmake. It needs to be updated in the 3 occurrences in the before_script. The WiiU and Vita seems to be missing some os-time related lib, and I'm looking into it. |
|
NGC and Wii are failing because they require devkit to be added to path, so I added: WiiU is failing because of some python issue with UTC_TIME,.. so I just set python off only for it. I have also set JS of for dingux. All updated in the gist. |
Updated the URL for fetching libretro.cmake to a newer commit.
oh,.. that line required to be between quotes: before_script:
- export NUMPROC=$(($(nproc)/5))
- '[ -n "${DEVKITPPC:-}" ] && export PATH="$PATH:$DEVKITPPC/bin"' |
|
Drumrolls 😄 @@ -107,6 +107,13 @@
- build-shared
- build-static
+.js-patch:
+ before_script:
+ - export NUMPROC=$(($(nproc)/5))
+ - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
+ - export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
+ - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"
+
.core-some-32bits-system:
variables:
EXTRA_PATH: lib
@@ -117,6 +124,7 @@
echo 'set(CMAKE_C_FLAGS_RELEASE "-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
+ - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
- |
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh -o cmake-install.sh
@@ Dingux @@
libretro-build-dingux-odbeta-mips32:
extends:
- .libretro-dingux-odbeta-cmake-mips32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# RetroFW
libretro-build-retrofw-mips32:
extends:
- .libretro-retrofw-odbeta-cmake-mips32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# MIYOO
libretro-build-miyoo-arm32:
extends:
- .libretro-miyoo-cmake-arm32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# VITA
libretro-build-vita:
@@ -262,11 +267,11 @@
- .core-defs
variables:
EXTRA_PATH: lib
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
before_script:
- export NUMPROC=$(($(nproc)/5))
- - export CORE_ARGS="${CORE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF"
+ - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
+ - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
+ - export CORE_ARGS="${CORE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -C ${CI_PROJECT_DIR}/build_flags.cmake"
# Libnx
libretro-build-libnx-aarch64:
@@ -279,6 +284,7 @@
- export NUMPROC=$(($(nproc)/5))
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
- sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake"
+ - sed -i 's/set(PREFER_SYSTEM_LIBRARIES ON)/set(PREFER_SYSTEM_LIBRARIES OFF)/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/CMakeLists.txt" |
Added .js-patch to various build configurations and adjusted CORE_ARGS.
| - Squirrel | ||
| - WASM | ||
| - Fennel | ||
| - JavaScript |
There was a problem hiding this comment.
| - Squirrel | |
| - WASM | |
| - Fennel | |
| - JavaScript |
|
Yay! It worked! :) It builds fine, I just do not know if it actually runs. I do not have any of the Nintendo devices to test on them. By the way, I think we could also add Another note on the |
| echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake | ||
| - export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake" | ||
| - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c" | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
There was a problem hiding this comment.
Before this gets in, I'd prefer if the upstream PR gets in first: nesbox#2905
Selectively building off of forks can become a mess in some cases 😅
| before_script: | ||
| - export NUMPROC=$(($(nproc)/5)) | ||
| - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
| EXTRA_PATH: lib | ||
| before_script: | ||
| - export NUMPROC=$(($(nproc)/5)) | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
| variables: | ||
| EXTRA_PATH: lib | ||
| before_script: | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
https://git.libretro.com/libretro/tic80/-/tree/revert-27-revert-26-update-tic80?ref_type=heads