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

Failed to build on Manjaro #1477

Closed
coreybruce opened this issue Jun 18, 2022 · 43 comments
Closed

Failed to build on Manjaro #1477

coreybruce opened this issue Jun 18, 2022 · 43 comments

Comments

@coreybruce
Copy link

coreybruce commented Jun 18, 2022

Hi I just wanted to get some help compiling this on Manjaro also you were missing the dependency doxygen in the Arch dependencies mentioned.

Here is my log also

cmake -B build && cmake --build build -j 8
-- GCC detected! Adding compile flags
Code Coverage build is disabled!
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.3") found components: doxygen missing components: dot
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.3") found components: doxygen 
-- Including X11 support
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
CMake Error at game/CMakeLists.txt:4 (enable_language):
  No CMAKE_ASM_NASM_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the
  full path to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/mnt/Storage/projects/jak-project/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/Storage/projects/jak-project/build/CMakeFiles/CMakeError.log".

Is there anything else missing?

@Masamune3210
Copy link

you need nasm, or a assembler compatible with its output

@coreybruce
Copy link
Author

coreybruce commented Jun 18, 2022

I already have nasm installed, it was on the list of dependencies tho doxygen was missing so whats the problem then?

@Masamune3210
Copy link

Masamune3210 commented Jun 18, 2022

Its either not correctly set up or not on your path or something else that is keeping cmake from being able to call it, its hard to tell and you would probably know the best how your system works since its gentoo so its kinda hard to give advice much

Edit: don't know why I thought you were running gentoo, don't issue when you just woke up lol, but googling around for issues relating to this is still probably your best bet

@coreybruce
Copy link
Author

Haha have your coffee first :P

@coreybruce
Copy link
Author

coreybruce commented Jun 18, 2022

I will double check but I am pretty sure I installed nasm but I am not sure if I know how to resolve this myself, tho you guys should be able to help. I just want to help report the issue.

I compiled it on Arm64 Manjaro but got a different error

compress/zstd_decompress.c.o
[  7%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/decompress/zstd_decompress_block.c.o
[  7%] Linking CXX shared library libfmt.so
[  7%] Built target fmt
[  7%] Linking C static library liblibzstd_static.a
[  7%] Built target libzstd_static
make: *** [Makefile:146: all] Error 2
[corey@corey-pi4 jak-project]$ 

@Ziemas
Copy link
Contributor

Ziemas commented Jun 18, 2022

Only x86 is supported, so building on ARM wont work. (unless you're cross compiling for x86 I guess)

@coreybruce
Copy link
Author

Yeah that's fair enough, I just wanted to test but will it support Arm64 later on?

Only x86 is supported, so building on ARM wont work. (unless you're cross compiling for x86 I guess)

Back to the issue tho do you have any idea what's happening with the No CMAKE_ASM_NASM_COMPILER could be found. error? I cant seem to find anything that can help me

@water111
Copy link
Collaborator

Probably nasm is not installed. If you run which nasm, does it find anything?

@Ziemas
Copy link
Contributor

Ziemas commented Jun 18, 2022

Yeah that's fair enough, I just wanted to test but will it support Arm64 later on?

Requires that someone writes an ARM backend for the goal compiler.

@coreybruce
Copy link
Author

Probably nasm is not installed. If you run which nasm, does it find anything?

image

which nasm                                                      
/usr/bin/nasm

@water111
Copy link
Collaborator

Tell CMake where to find the compiler by setting either the environment
  variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the
  full path to the compiler, or to the compiler name if it is in the PATH.

you could set ASM_NASM to point to /usr/bin/nasm

@coreybruce
Copy link
Author

coreybruce commented Jun 19, 2022

Oh ok how do I do that?

In cmakecache I do see

//NASM compiler
CMAKE_ASM_NASM_COMPILER:FILEPATH=/usr/bin/nasm

@coreybruce
Copy link
Author

did a cmake clean and tried again and got this error instead

[ 22%] Building C object third-party/zydis/CMakeFiles/Zydis.dir/src/FormatterBase.c.o
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-implicit-int-float-conversion’ may have been intended to silence earlier diagnostics
[ 22%] Linking CXX static library libcubeb.a
[ 22%] Built target cubeb
[ 23%] Building C object third-party/zydis/CMakeFiles/Zydis.dir/src/FormatterIntel.c.o
[ 23%] Linking C shared library libZydis.so
[ 23%] Built target Zydis
[ 23%] Linking CXX shared library libimgui.so
[ 23%] Built target imgui
make: *** [Makefile:146: all] Error 2

@water111
Copy link
Collaborator

the error happened earlier - the note is just a warning and can be ignored. Can you run make again and post the output?

@coreybruce
Copy link
Author

Sure

cmake -B build && cmake --build build -j 8
-- GCC detected! Adding compile flags
Code Coverage build is disabled!
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.3") found components: doxygen missing components: dot
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.3") found components: doxygen 
-- Including X11 support
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/Storage/projects/jak-project/build
Consolidate compiler generated dependencies of target fmt
Consolidate compiler generated dependencies of target Zycore
Consolidate compiler generated dependencies of target replxx
Consolidate compiler generated dependencies of target libzstd_static
Consolidate compiler generated dependencies of target lzokay
Consolidate compiler generated dependencies of target gtest
Consolidate compiler generated dependencies of target speex
Consolidate compiler generated dependencies of target glfw
[  0%] Building CXX object third-party/lzokay/CMakeFiles/lzokay.dir/lzokay.cpp.o
[  1%] Built target fmt
[  2%] Built target gtest
[  3%] Built target Zycore
[  8%] Built target libzstd_static
[  8%] Built target speex
[ 10%] Built target replxx
[ 15%] Built target glfw
Consolidate compiler generated dependencies of target Zydis
Consolidate compiler generated dependencies of target cubeb
Consolidate compiler generated dependencies of target imgui
[ 16%] Generating API documentation with Doxygen
[ 16%] Built target docs
[ 19%] Built target cubeb
[ 22%] Built target Zydis
[ 23%] Built target imgui
/mnt/Storage/projects/jak-project/third-party/cubeb/cubeb/include/cubeb/cubeb.h:188: warning: Member cubeb_channel_layout (typedef) of file cubeb.h is not documented.
/mnt/Storage/projects/jak-project/third-party/cubeb/cubeb/include/cubeb/cubeb.h:166: warning: Member cubeb_channel (enumeration) of file cubeb.h is not documented.
/mnt/Storage/projects/jak-project/third-party/cubeb/cubeb/include/cubeb/cubeb.h:436: warning: argument 'user' of command @param is not found in the argument list of cubeb_device_changed_callback(void *user_ptr)
/mnt/Storage/projects/jak-project/third-party/cubeb/cubeb/include/cubeb/cubeb.h:436: warning: The following parameter of cubeb_device_changed_callback(void *user_ptr) is not documented:
  parameter 'user_ptr'
[ 23%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/player.cpp.o
[ 23%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/midi_handler.cpp.o
[ 23%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/ame_handler.cpp.o
[ 25%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/blocksound_handler.cpp.o
[ 25%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/musicbank.cpp.o
[ 25%] Built target doc
[ 25%] Built target clangformat
[ 25%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/sfxblock.cpp.o
[ 25%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/loader.cpp.o
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::Match3Impl::init()’:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:342:27: error: no matching function for call to ‘begin(uint16_t [16384])’
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                 ~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/12.1.0/bits/algorithmfwd.h:39,
                 from /usr/include/c++/12.1.0/bits/stl_algo.h:59,
                 from /usr/include/c++/12.1.0/algorithm:61,
                 from /mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:3:
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:342:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                 ~~~~~~~~~~^~~~~~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:342:47: error: no matching function for call to ‘end(uint16_t [16384])’
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                                       ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:342:47: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                                       ~~~~~~~~^~~~~~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::Match2Impl::init()’:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:373:27: error: no matching function for call to ‘begin(uint16_t [65536])’
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                 ~~~~~~~~~~^~~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:373:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                 ~~~~~~~~~~^~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:373:43: error: no matching function for call to ‘end(uint16_t [65536])’
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                                   ~~~~~~~~^~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:373:43: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                                   ~~~~~~~~^~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::advance(lzokay::State&, uint32_t&, uint32_t&, uint32_t*, bool)’:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:486:35: error: no matching function for call to ‘begin(uint32_t [34])’
  486 |       for (auto posit = std::begin(best_pos) + 2, offit = best_off + 2;
      |                         ~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:486:35: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint32_t*’ {aka ‘unsigned int*’}
  486 |       for (auto posit = std::begin(best_pos) + 2, offit = best_off + 2;
      |                         ~~~~~~~~~~^~~~~~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:487:29: error: no matching function for call to ‘end(uint32_t [34])’
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                     ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:487:29: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint32_t*’ {aka ‘unsigned int*’}
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                     ~~~~~~~~^~~~~~~~~~
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:487:52: error: ‘offit’ was not declared in this scope; did you mean ‘off_t’?
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                                                    ^~~~~
      |                                                    off_t
/mnt/Storage/projects/jak-project/third-party/lzokay/lzokay.cpp:436:25: warning: unused parameter ‘best_off’ [-Wunused-parameter]
  436 |                uint32_t best_off[MaxMatchByLengthLen], bool skip) {
      |                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [third-party/lzokay/CMakeFiles/lzokay.dir/build.make:76: third-party/lzokay/CMakeFiles/lzokay.dir/lzokay.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2197: third-party/lzokay/CMakeFiles/lzokay.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 25%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/vagvoice.cpp.o
[ 26%] Building CXX object game/sound/CMakeFiles/sound.dir/989snd/util.cpp.o
[ 26%] Building CXX object game/sound/CMakeFiles/sound.dir/common/synth.cpp.o
[ 26%] Building CXX object game/sound/CMakeFiles/sound.dir/common/voice.cpp.o
[ 26%] Building CXX object game/sound/CMakeFiles/sound.dir/common/envelope.cpp.o
[ 26%] Building CXX object game/sound/CMakeFiles/sound.dir/sndshim.cpp.o
[ 27%] Building CXX object game/sound/CMakeFiles/sound.dir/sdshim.cpp.o
[ 27%] Linking CXX static library libsound.a
[ 27%] Built target sound
make: *** [Makefile:146: all] Error 2

@Hat-Kid
Copy link
Member

Hat-Kid commented Jun 19, 2022

You should be able to add #include <array> to lzokay.cpp for now to fix that particular error. The version of lzokay in this repo is a bit older and breaks on newer versions of GCC or Clang.

@coreybruce
Copy link
Author

coreybruce commented Jun 19, 2022

Yep can confirm that allowed it to compile

Did the test and it passed

[----------] 4 tests from WithGameTests_VectorFloatTests/VectorFloatParameterizedTestFixtureWithRunner_OneOperandQuotient (8 ms total)

[----------] Global test environment tear-down
[==========] 1457 tests from 53 test suites ran. (37318 ms total)
[  PASSED  ] 1457 tests.

So where is the binary and extractor binary?

@Hat-Kid
Copy link
Member

Hat-Kid commented Jun 19, 2022

So where is the binary and extractor binary?

They should be in the build directory. The extractor is in build/decompiler and the runtime is in build/game (called gk).

@coreybruce
Copy link
Author

Will this patch be added to the code?

@coreybruce
Copy link
Author

Having the same build issue on Arch32

[jamie@jamie-emachine projects]$ cd jak-project
[jamie@jamie-emachine jak-project]$ cmake -B build && cmake --build build -j2
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GCC detected! Adding compile flags
Code Coverage build is disabled!
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for include file pulse/pulseaudio.h
-- Looking for include file pulse/pulseaudio.h - found
-- Looking for include file alsa/asoundlib.h
-- Looking for include file alsa/asoundlib.h - found
-- Looking for include file jack/jack.h
-- Looking for include file jack/jack.h - found
-- Looking for include file sndio.h
-- Looking for include file sndio.h - not found
-- Looking for include file aaudio/AAudio.h
-- Looking for include file aaudio/AAudio.h - not found
-- Looking for include file AudioUnit/AudioUnit.h
-- Looking for include file AudioUnit/AudioUnit.h - not found
-- Looking for include file audioclient.h
-- Looking for include file audioclient.h - not found
-- Looking for include files windows.h, mmsystem.h
-- Looking for include files windows.h, mmsystem.h - not found
-- Looking for include file SLES/OpenSLES.h
-- Looking for include file SLES/OpenSLES.h - not found
-- Looking for include file sys/soundcard.h
-- Looking for include file sys/soundcard.h - found
-- Looking for include file android/log.h
-- Looking for include file android/log.h - not found
-- Looking for include file sys/audioio.h
-- Looking for include file sys/audioio.h - not found
-- Looking for include file kai.h
-- Looking for include file kai.h - not found
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Including X11 support
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Found Git: /usr/bin/git (found version "2.36.1") 
-- Found Python: /usr/bin/python3.10 (found version "3.10.5") found components: Interpreter 
no rapidjson, download
-- Configuring done
-- Generating done
-- Build files have been written to: /run/media/jamie/47F22DEE70C10570/projects/jak-project/build
[  0%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Memory.c.o
[  0%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/debug.c.o
[  0%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/entropy_common.c.o
[  0%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Process.c.o
[  0%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Synchronization.c.o
[  1%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/error_private.c.o
[  1%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/fse_decompress.c.o
[  1%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Terminal.c.o
[  1%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/API/Thread.c.o
[  2%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/Allocator.c.o
[  2%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/ArgParse.c.o
[  2%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/pool.c.o
[  2%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/threading.c.o
[  2%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/xxhash.c.o
[  2%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/Bitset.c.o
[  2%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/common/zstd_common.c.o
[  2%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/Format.c.o
[  3%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/fse_compress.c.o
[  3%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/hist.c.o
[  3%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/List.c.o
[  3%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/huf_compress.c.o
[  4%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/String.c.o
[  4%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_compress.c.o
[  4%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/Vector.c.o
[  4%] Building C object third-party/zydis/zycore/CMakeFiles/Zycore.dir/src/Zycore.c.o
[  4%] Linking C static library libZycore.a
[  4%] Built target Zycore
[  4%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_compress_literals.c.o
[  5%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_compress_sequences.c.o
[  5%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/ConvertUTF.cpp.o
[  5%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/conversion.cxx.o
[  5%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_compress_superblock.c.o
[  6%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/escape.cxx.o
[  6%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_double_fast.c.o
[  6%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/history.cxx.o
[  6%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_fast.c.o
[  6%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/prompt.cxx.o
[  6%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_lazy.c.o
[  6%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/replxx.cxx.o
[  6%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/replxx_impl.cxx.o
[  7%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/terminal.cxx.o
[  7%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/util.cxx.o
[  8%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_ldm.c.o
[  8%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstd_opt.c.o
[  8%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/wcwidth.cpp.o
[  8%] Building CXX object third-party/replxx/CMakeFiles/replxx.dir/src/windows.cxx.o
[  8%] Linking CXX shared library libreplxx.so
[  8%] Built target replxx
[  8%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/compress/zstdmt_compress.c.o
[  8%] Building CXX object third-party/lzokay/CMakeFiles/lzokay.dir/lzokay.cpp.o
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::Match3Impl::init()’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:342:27: error: no matching function for call to ‘begin(uint16_t [16384])’
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                 ~~~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/12.1.0/bits/algorithmfwd.h:39,
                 from /usr/include/c++/12.1.0/bits/stl_algo.h:59,
                 from /usr/include/c++/12.1.0/algorithm:61,
                 from /run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:3:
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:342:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                 ~~~~~~~~~~^~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:342:47: error: no matching function for call to ‘end(uint16_t [16384])’
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                                       ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:342:47: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  342 |       std::fill(std::begin(chain_sz), std::end(chain_sz), 0);
      |                                       ~~~~~~~~^~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::Match2Impl::init()’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:373:27: error: no matching function for call to ‘begin(uint16_t [65536])’
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                 ~~~~~~~~~~^~~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:373:27: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                 ~~~~~~~~~~^~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:373:43: error: no matching function for call to ‘end(uint16_t [65536])’
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                                   ~~~~~~~~^~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:373:43: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint16_t*’ {aka ‘short unsigned int*’}
  373 |       std::fill(std::begin(head), std::end(head), UINT16_MAX);
      |                                   ~~~~~~~~^~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::advance(lzokay::State&, uint32_t&, uint32_t&, uint32_t*, bool)’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:486:35: error: no matching function for call to ‘begin(uint32_t [34])’
  486 |       for (auto posit = std::begin(best_pos) + 2, offit = best_off + 2;
      |                         ~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   90 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/12.1.0/initializer_list:90:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:486:35: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint32_t*’ {aka ‘unsigned int*’}
  486 |       for (auto posit = std::begin(best_pos) + 2, offit = best_off + 2;
      |                         ~~~~~~~~~~^~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:487:29: error: no matching function for call to ‘end(uint32_t [34])’
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                     ~~~~~~~~^~~~~~~~~~
/usr/include/c++/12.1.0/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/12.1.0/initializer_list:101:5: note:   template argument deduction/substitution failed:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:487:29: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘uint32_t*’ {aka ‘unsigned int*’}
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                     ~~~~~~~~^~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:487:52: error: ‘offit’ was not declared in this scope; did you mean ‘off_t’?
  487 |            posit != std::end(best_pos); ++posit, ++offit) {
      |                                                    ^~~~~
      |                                                    off_t
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:436:25: warning: unused parameter ‘best_off’ [-Wunused-parameter]
  436 |                uint32_t best_off[MaxMatchByLengthLen], bool skip) {
      |                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [third-party/lzokay/CMakeFiles/lzokay.dir/build.make:76: third-party/lzokay/CMakeFiles/lzokay.dir/lzokay.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2195: third-party/lzokay/CMakeFiles/lzokay.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  8%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/decompress/huf_decompress.c.o
[  8%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/decompress/zstd_ddict.c.o
[  9%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/decompress/zstd_decompress.c.o
[  9%] Building C object third-party/zstd/CMakeFiles/libzstd_static.dir/lib/decompress/zstd_decompress_block.c.o
[  9%] Linking C static library liblibzstd_static.a
[  9%] Built target libzstd_static
make: *** [Makefile:146: all] Error 2
[jamie@jamie-emachine jak-project]$ cmake -B build && cmake --build build -j2
-- GCC detected! Adding compile flags
Code Coverage build is disabled!
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Including X11 support
-- Configuring done
-- Generating done
-- Build files have been written to: /run/media/jamie/47F22DEE70C10570/projects/jak-project/build
Consolidate compiler generated dependencies of target Zycore
Consolidate compiler generated dependencies of target replxx
[  2%] Built target Zycore
[  2%] Building CXX object third-party/fmt/CMakeFiles/fmt.dir/format.cc.o
[  4%] Built target replxx
Consolidate compiler generated dependencies of target libzstd_static
[  9%] Built target libzstd_static
Consolidate compiler generated dependencies of target lzokay
[  9%] Building CXX object third-party/lzokay/CMakeFiles/lzokay.dir/lzokay.cpp.o
In member function ‘uint32_t lzokay::State::pos2off(uint32_t) const’,
    inlined from ‘void lzokay::DictImpl::advance(lzokay::State&, uint32_t&, uint32_t&, uint32_t*, bool)’ at /run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:485:27:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:327:25: warning: ‘lb_pos’ may be used uninitialized [-Wmaybe-uninitialized]
  327 |     return wind_b > pos ? wind_b - pos : DictBase::BufSize - (pos - wind_b);
      |            ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp: In member function ‘void lzokay::DictImpl::advance(lzokay::State&, uint32_t&, uint32_t&, uint32_t*, bool)’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/lzokay/lzokay.cpp:452:14: note: ‘lb_pos’ was declared here
  452 |     uint32_t lb_pos;
      |              ^~~~~~
[  9%] Linking CXX shared library liblzokay.so
[  9%] Built target lzokay
[  9%] Building C object third-party/xdelta3/CMakeFiles/xdelta3.dir/xdelta3.c.o
In file included from /run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3.h:10,
                 from /run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/xdelta3/xdelta3.c:1:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.h:25: warning: "_POSIX_SOURCE" redefined
   25 | #define _POSIX_SOURCE 200112L
      | 
In file included from /usr/include/assert.h:35,
                 from /run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3.h:9:
/usr/include/features.h:288: note: this is the location of the previous definition
  288 | # define _POSIX_SOURCE  1
      | 
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.h:170:1: error: static assertion failed: "SIZEOF_SIZE_T not correctly set"
  170 | static_assert(SIZEOF_SIZE_T == sizeof(size_t), "SIZEOF_SIZE_T not correctly set");
      | ^~~~~~~~~~~~~
In file included from /run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:265,
                 from /run/media/jamie/47F22DEE70C10570/projects/jak-project/third-party/xdelta3/xdelta3.c:2:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c: In function ‘xd3_round_blksize’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3-internal.h:318:33: warning: conversion from ‘long long unsigned int’ to ‘usize_t’ {aka ‘unsigned int’} changes value from ‘9223372036854775808’ to ‘0’ [-Woverflow]
  318 | #define USIZE_T_MAXBLKSZ        0x8000000000000000ULL
      |                                 ^~~~~~~~~~~~~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:1064:14: note: in expansion of macro ‘USIZE_T_MAXBLKSZ’
 1064 |       return USIZE_T_MAXBLKSZ;
      |              ^~~~~~~~~~~~~~~~
In file included from /run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:655:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c: In function ‘xd3_srcwin_setup’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:3637:7: warning: conversion from ‘long long unsigned int’ to ‘xoff_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
 3637 |   x = USIZE_T_MAX;
      |       ^~~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c: In function ‘xd3_srcwin_move_point’:
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:4345:30: warning: conversion from ‘long long unsigned int’ to ‘usize_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
 4345 |           *next_move_point = USIZE_T_MAX;
      |                              ^~~~~~~~~~~
/run/media/jamie/47F22DEE70C10570/projects/jak-project/./third-party/xdelta3/xdelta3/xdelta3.c:4486:30: warning: conversion from ‘long long unsigned int’ to ‘usize_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
 4486 |           *next_move_point = USIZE_T_MAX;
      |                              ^~~~~~~~~~~
make[2]: *** [third-party/xdelta3/CMakeFiles/xdelta3.dir/build.make:76: third-party/xdelta3/CMakeFiles/xdelta3.dir/xdelta3.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2351: third-party/xdelta3/CMakeFiles/xdelta3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  9%] Linking CXX shared library libfmt.so
[  9%] Built target fmt
make: *** [Makefile:146: all] Error 2

@Hat-Kid
Copy link
Member

Hat-Kid commented Jun 23, 2022

The project is x86_64 only.

@coreybruce
Copy link
Author

Oh so it doesn't support 32bit x86 either? but why doesn't it support 32bit x86?

@ManDude
Copy link
Member

ManDude commented Jun 23, 2022

Because we make use of 64-bit registers, instructions and and addressing space.

@coreybruce
Copy link
Author

Ah I see, I know I have already sort of asked but like other projects like RE3 or Devilutionx which can compile for multiple architectures with no issues, will this project ever get that kind of code changes to do that later on?

@ManDude
Copy link
Member

ManDude commented Jun 23, 2022

If someone else wants to do it, sure. But we're not planning on it.

@coreybruce
Copy link
Author

Ok thanks for the update

@xTVaser
Copy link
Member

xTVaser commented Jun 23, 2022

The fix to the lzokay library has been merged into master #1530

So the actual underlying build issue appears to be resolved #1477 (comment)

Closing as there doesn't seem to be an outstanding issue here anymore? Feel free to re-open if im mistaken.

@xTVaser xTVaser closed this as completed Jun 23, 2022
@coreybruce
Copy link
Author

coreybruce commented Jun 30, 2022

Because we make use of 64-bit registers, instructions and and addressing space.

Are you guys using assembly? shouldn't the OS manage the pointers, memory spaces and registers?

@water111
Copy link
Collaborator

This question keeps coming up so I'll give a real answer for why it's not easy for this project to support other architectures.

@coreybruce
Copy link
Author

coreybruce commented Jun 30, 2022

Wait so why did you write your own compiler instead of using a mature compile like GCC? you've made it harder for yourself and unlike your compiler you have made GCC is modular. This would allow you to easily port it to different architectures with far less work as it's already done in GCC

@Biggamer11
Copy link

As someone who is a software engineer for a living this is just stupid, a word of advice is restandardize on GCC or something that is mature.

@water111
Copy link
Collaborator

The game is written in GOAL, which is a custom programming language developed by naughty dog and not supported by gcc or clang or any existing compiler. Did you even look at the code or read the first sentences of the readme? It's all a custom lisp language and the point of the project was to port this custom language to x86.

@coreybruce
Copy link
Author

coreybruce commented Jun 30, 2022

We're just figuring out how it all works and just asking questions on how it all works to get a better understanding. Would it have to use this custom language to work? Just sounds like more work to use a old non standard compiler

@Biggamer11
Copy link

Sorry if I misunderstood something, I’m getting this secondhand from @coreybruce. But can’t this be reimplement in something like c++, I’m looking for answers mostly I’m not here to troll

@Hat-Kid
Copy link
Member

Hat-Kid commented Jun 30, 2022

The point of the project is to port Naughty Dog's custom language to x86, not to port the game's codebase to C++.

@coreybruce
Copy link
Author

Yeah @Biggamer11 has a lot more skills when it comes to this but I am also just wanting to help and ask questions as this is a awesome project and wish to help improve anyways I can :)

@Biggamer11
Copy link

What about transpiler to convert it to code to something intermediate to be compiled on gcc that way you could possibly have something that can use the custom language and have portablity

@water111
Copy link
Collaborator

Understandable, but please take a few moments to read some code or the readme first.
In case you haven't seen what the game code looks like, here is the game's main:
https://github.com/open-goal/jak-project/blob/master/goal_src/jak1/engine/game/main.gc

There's 400,000 lines of this type of code in jak 1, and we think that jak 2 will be about 1 million lines. Porting it to C++ is not very easy because there are a ton of weird features in their language that C++ doesn't support. It is, of course, technically possible to reimplement all their stuff in C++ but we'd have to rework a lot of the engine to actually be possible in C++.

I decided not to try porting it to C++ because:

  • I think it would be much more effort overall
  • I wanted to write a compiler
  • I wanted to figure out why Naughty Dog wrote their own language and see what it would be like

@coreybruce
Copy link
Author

What features in C++ would you need exactly?

@xTVaser
Copy link
Member

xTVaser commented Jun 30, 2022

On the topic of using an IR / transpiler (like LLVM). This question has been asked before a few times, here was the response that is hopefully informative:

I definitely thought about using LLVM, but decided against it for two reasons - it's a little bit annoying to set up and use, and it wasn't clear how to make it do what I wanted in all cases. In GOAL, several registers are used for very specific things. There is a "symbol table" register that always points to the symbol table, a "process" register that always points to the currently running process, and in OpenGOAL, an "offset" register that always points to the base of memory (so OpenGOAL "pointers" are actually 32-bit offsets from the 64-bit memory address). The other challenge is that OpenGOAL code has its own object file format that can be loaded / unloaded at runtime. For a number of reasons, the format used by shared libraries on Linux won't work, and it seemed like a challenge to add a custom object file format to LLVM. I mostly just copied the file format used in GOAL.

@coreybruce
Copy link
Author

I'm passionate about this game and I apologize if it comes across as confrontational. It wasn’t my intention. Best of luck to your project and wish it success.

@water111
Copy link
Collaborator

GOAL's weird features that don't map well to c++ are:

  • coroutines (technically supported in c++20, but wasn't widely supported when the project was started)
  • tagged pointers
  • 128-bit bitfields
  • nonlocal control flow (jump from the middle of one function to another)
  • well-defined behavior when type-punning
  • lisp-style symbol table (can iterate over all global variables/functions or get them by name)
  • compacting garbage collection for stacks
  • ability to copy a threads stack
  • ability to reset a thread's stack to the beginning and start again
  • ability to temporarily run functions on another thread's stack
  • inline assembly
  • runtime type system with types and functions as runtime objects
  • being able to store things other than methods in vtables
  • ability to load code at runtime with a multi-threaded linker
  • ability to edit code in a single file and replace that file in the running game, without dropping any frames
  • ability to easily embed objects with complex data structures (trees, linked lists, runtime type information) into files
  • compile-time macros that can do stuff like "convert the first 8 characters of a string into a uint64".

some of these could be solved with clever c++, but these aren't the sort of problems I'm interested in solving.

In the end our objective isn't to make jak and daxter playable on as many computers as possible - it's more about the tools they used to develop the game.

@water111
Copy link
Collaborator

I'm passionate about this game and I apologize if it comes across as confrontational. It wasn’t my intention. Best of luck to your project and wish it success.

no worries - we're aware that our approach isn't the best for everyone's use case, but it's a tradeoff that we're happy with.

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

8 participants