OpenDriver2 / REDRIVER2

Driver 2 Playstation game reverse engineering effort
MIT License
1.04k stars 60 forks source link

Error building on Linux #177

Closed studiesronalds closed 9 months ago

studiesronalds commented 2 years ago

Describe the bug

  ==== Building PsyCross (debug_x86) ====
  ==== Building REDRIVER2 (debug_x86) ====
  DebugOverlay.cpp
  In file included from ../DebugOverlay.cpp:1:0:
  ../Game/driver2.h:4:19: fatal error: types.h: No such file or directory
  compilation terminated.
  REDRIVER2.make:313: recipe for target 'obj/x86/Debug/REDRIVER2/DebugOverlay.o' failed
  make[1]: *** [obj/x86/Debug/REDRIVER2/DebugOverlay.o] Error 1
  Makefile:41: recipe for target 'REDRIVER2' failed
  make: *** [REDRIVER2] Error 2

To Reproduce Steps to reproduce the behavior: Install all dependencies , add Linux version of premake5 , run gen_make2.sh , go to directory project_gmake2_linux and run make

Expected behavior Building project

SoapyMan commented 1 year ago

Pull request fixing the build would be helpful. It does build for Ubuntu tho (through Appveyor)

matthilde commented 1 year ago

It looks there is no types.h header in Linux (probably that Ubuntu got a symlink or workaround?). I am not sure what types.h specifically is in that context but it may be the equivalent of <sys/types.h> on Linux or other unix-like environments.

lis6502 commented 1 year ago

it's due to lack of -i386 development package for libc6, however i am myself struggling with working around this. Having x64 Debian 12-ish by standard i i have everything x86_64, including gcc.

lis6502 commented 1 year ago

after installing

linux-libc-dev:i386 libc6-dev-i386

and trying to manually step by step build DebugOverlay i am stuck - no package provides 'libcd.h'

lis6502@e595:~/git/REDRIVER2/src_rebuild$ gcc -m32 DebugOverlay.cpp -I/usr/include/linux/ 
In file included from DebugOverlay.cpp:1:
Game/driver2.h:5:10: fatal error: libcd.h: No such file or directory
    5 | #include <libcd.h>
      |          ^~~~~~~~~
compilation terminated.
SoapyMan commented 1 year ago

Please check how it's getting built with AppVeyor, also it's better to checkout develop-SoapyMan as linux compatibility been improved here