AliveTeam / alive_reversing

Re-implementation of Oddworld: Abe's Exoddus and Oddworld: Abe's Oddysee
331 stars 44 forks source link

Fail the cmake Pi4 #1325

Closed Exarkuniv closed 3 years ago

Exarkuniv commented 3 years ago

im trying to compile this on my Pi4. Im running debain/buster.

i follow the commands in the read me, it errors out when i run cmake -S .. -B .

-- Using unsigned short -- Check if the system is big endian - little endian CMake Error at CMakeLists.txt:119 (target_precompile_headers): Unknown CMake command "target_precompile_headers".

-- Configuring incomplete, errors occurred! See also "/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeOutput.log". See also "/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeError.log". /home/pi/RetroPie-Setup

let me know what else you might need to help. or if it just does not work on the Pi4

MrSapps commented 3 years ago

What version of cmake are you using? Apparently target_precompile_headers was added in >= 3.16.

Exarkuniv commented 3 years ago

that would be it. i have 3.15.4 installed. and that was kinda a pain. ill look into seeing about getting 3.16 installed.

ill update once thats done

MrSapps commented 3 years ago

I think it should work - if so might be worth a PR to bump the min required version

Exarkuniv commented 3 years ago

so i was able to get cmake 3.21 installed. ( i thought why not, unless it is the cause of this problem)

now i get

-- Configuring done CMake Error at 3rdParty/CMakeLists.txt:79 (add_library): Target "imgui" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Warning (dev) at 3rdParty/glew-cmake/CMakeLists.txt:165 (add_library): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "libglew_static" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at Source/AliveLibCommon/CMakeLists.txt:31 (add_library): Target "AliveLibCommon" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at Source/AliveLibAO/CMakeLists.txt:323 (add_library): Target "AliveLibAO" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at Source/AliveLibAE/CMakeLists.txt:387 (add_library): Target "AliveLibAE" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at Source/relive/CMakeLists.txt:7 (add_executable): Target "relive" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at Source/Tools/relive_api/CMakeLists.txt:74 (add_library): Target "relive_api" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at Source/Tools/relive_api/CMakeLists.txt:79 (add_executable): Target "relive_api_test" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at 3rdParty/CMakeLists.txt:79 (add_library): Target "imgui" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Warning (dev) at 3rdParty/glew-cmake/CMakeLists.txt:165 (add_library): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "libglew_static" links to target "OpenGL::GLX" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

i used the git clone --recursive https://github.com/AliveTeam/alive_reversing.git

MrSapps commented 3 years ago

Have you installed the OpenGL dev packages?

Edit: libglx-dev maybe ?

Exarkuniv commented 3 years ago

yes its installed version 1.3.0-7~bpo10+1

Exarkuniv commented 3 years ago

i installed libopengl-dev and that seemed to do the trick

Exarkuniv commented 3 years ago

so i ran make and i get this.

[ 2%] Building C object 3rdParty/fluidsynth-lite/src/CMakeFiles/libfluidsynth.dir/utils/fluid_settings.c.o /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_register_num’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:497:44: error: cast increases required alignment of target type [-Werror=cast-alig ] fluid_num_setting_t setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_get_hints’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:610:44: error: cast increases required alignment of target type [-Werror=cast-alig ] fluid_num_setting_t setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_is_realtime’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:647:44: error: cast increases required alignment of target type [-Werror=cast-alig ] fluid_num_setting_t setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_setnum’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:1054:23: error: cast increases required alignment of target type [-Werror=cast-align] setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_getnum’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:1102:40: error: cast increases required alignment of target type [-Werror=cast-align] fluid_num_setting_t setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_getnum_range’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:1136:40: error: cast increases required alignment of target type [-Werror=cast-align] fluid_num_setting_t setting = (fluid_num_setting_t) node; ^ /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c: In function ‘fluid_settings_getnum_default’: /home/pi/alive_reversing/3rdParty/fluidsynth-lite/src/utils/fluid_settings.c:1165:40: error: cast increases required alignment of target type [-Werror=cast-align] fluid_num_setting_t setting = (fluid_num_setting_t*) node; ^ cc1: all warnings being treated as errors make[2]: [3rdParty/fluidsynth-lite/src/CMakeFiles/libfluidsynth.dir/build.make:132: 3rdParty/fluidsynth-lite/src/CMakeFiles/libfluidsynth.dir/utils/fluid_settings.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:500: 3rdParty/fluidsynth-lite/src/CMakeFiles/libfluidsynth.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 3%] Linking C static library lib/libglew.a create libGLEW symbolic link [ 3%] Built target libglew_static [ 3%] Linking CXX static library libEasyLogging++.a [ 3%] Built target EasyLogging++ [ 4%] Linking CXX static library libgoogletest.a [ 4%] Built target googletest make: [Makefile:166: all] Error 2

i remember having i issue with fluidsynth-lite on when i was trying to compile something else. i just need to remember what i did for that unless the error ir for something else

MrSapps commented 3 years ago

You can probably just hack it to not treat the warning as an error, fluid synth is going to be removed as a dep in the coming months

Exarkuniv commented 3 years ago

thats what i came across. it was for the Doom64ex port and someone else posted they needed to remove the -Werrors flag to get it to compile. good to know that in future it will not be a issue

Exarkuniv commented 3 years ago

also got it. heres the newest error

[ 63%] Building CXX object Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/Slog.cpp.o In file included from /home/pi/alive_reversing/Source/AliveLibAO/Mudokon.cpp:32: /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp: In instantiation of ‘constexpr const short int magic_enum::detail::min_v’: /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:545:55: required from ‘constexpr std::size_t magic_enum::detail::undex(U) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:562:18: required from ‘constexpr std::size_t magic_enum::detail::endex(E) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:701:38: required from ‘constexpr magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > magic_enum::enum_name(E) [with E = AO::TlvTypes; magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > = std::basic_string_view]’ /home/pi/alive_reversing/Source/AliveLibAO/Mudokon.cpp:300:13: required from here /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:467:31: in ‘constexpr’ expansion of ‘magic_enum::detail::values_v<AO::TlvTypes, false>.std::array<AO::TlvTypes, 0>::front()’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:467:23: error: dereferencing a null pointer inline constexpr auto min_v = static_cast(values_v<E, IsFlags>.front()); ^~~~~ In file included from /usr/include/c++/8/tuple:39, from /usr/include/c++/8/bits/stl_map.h:63, from /usr/include/c++/8/map:61, from /home/pi/alive_reversing/3rdParty/EasyLogging++/EasyLogging/src/easylogging++.h:380, from /home/pi/alive_reversing/Source/AliveLibCommon/logger.hpp:5, from /home/pi/alive_reversing/Source/AliveLibCommon/pch_shared.h:123, from /home/pi/alive_reversing/build/Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/cmake_pch.hxx:5, from : /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp: In instantiation of ‘constexpr const short int magic_enum::detail::max_v’: /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:545:96: required from ‘constexpr std::size_t magic_enum::detail::undex(U) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:562:18: required from ‘constexpr std::size_t magic_enum::detail::endex(E) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:701:38: required from ‘constexpr magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > magic_enum::enum_name(E) [with E = AO::TlvTypes; magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > = std::basic_string_view]’ /home/pi/alive_reversing/Source/AliveLibAO/Mudokon.cpp:300:13: required from here /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:470:31: in ‘constexpr’ expansion of ‘magic_enum::detail::values_v<AO::TlvTypes, false>.std::array<AO::TlvTypes, 0>::back()’ /usr/include/c++/8/array:229:13: error: dereferencing a null pointer return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1)

              : _AT_Type::_S_ref(_M_elems, 0);

In file included from /home/pi/alive_reversing/Source/AliveLibAO/Mudokon.cpp:32: /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp: In instantiation of ‘constexpr const bool magic_enum::detail::is_sparse_v’: /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:546:19: required from ‘constexpr std::size_t magic_enum::detail::undex(U) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:562:18: required from ‘constexpr std::size_t magic_enum::detail::endex(E) [with E = AO::TlvTypes; U = short int; std::size_t = unsigned int]’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:701:38: required from ‘constexpr magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > magic_enum::enum_name(E) [with E = AO::TlvTypes; magic_enum::detail::enable_if_enum_t<E, std::basic_string_view > = std::basic_string_view]’ /home/pi/alive_reversing/Source/AliveLibAO/Mudokon.cpp:300:13: required from here /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:539:58: in ‘constexpr’ expansion of ‘magic_enum::detail::is_sparse<AO::TlvTypes, false>()’ /home/pi/alive_reversing/3rdParty/magic_enum/include/magic_enum.hpp:539:23: error: ‘constexpr’ call flows off the end of the function inline constexpr bool is_sparse_v = is_sparse<E, IsFlags>(); ^~~ /home/pi/alive_reversing/Source/AliveLibAO/SlingMudokon.cpp: In member function ‘s16 AO::SlingMudokon::Brain_1_Spawn_470230()’: /home/pi/alive_reversing/Source/AliveLibAO/SlingMudokon.cpp:692:63: warning: potential null pointer dereference [-Wnull-dereference] if (pDove->field_10_anim.field_4_flags.Get(AnimFlags::eBit5_FlipX))


/home/pi/alive_reversing/Source/AliveLibAO/SlingMudokon.cpp: In member function ‘s16 AO::SlingMudokon::Brain_2_AskForPassword_4707B0()’:
/home/pi/alive_reversing/Source/AliveLibAO/SlingMudokon.cpp:986:63: warning: potential null pointer dereference [-Wnull-dereference]
                     if (pDove->field_10_anim.field_4_flags.Get(AnimFlags::eBit5_FlipX))
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/build.make:541: Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/Mudokon.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/pi/alive_reversing/Source/AliveLibAO/Slog.cpp: In member function ‘s16 AO::Slog::Brain_1_Idle_4719C0()’:
/home/pi/alive_reversing/Source/AliveLibAO/Slog.cpp:2272:32: warning: null pointer dereference [-Wnull-dereference]
             field_10C_pTarget->field_C_refCount--;
             ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/pi/alive_reversing/Source/AliveLibAO/Slog.cpp:2272:48: warning: null pointer dereference [-Wnull-dereference]
             field_10C_pTarget->field_C_refCount--;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make[1]: *** [CMakeFiles/Makefile2:561: Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

that one im lost on
MrSapps commented 3 years ago

I think your compiler is too old to compile the magic_enum lib

Exarkuniv commented 3 years ago

how would i go about finding out what version it is? i dont even know what software is the compiler. lol

MrSapps commented 3 years ago

gcc --version or clang --version

Exarkuniv commented 3 years ago

i have gcc (Raspbian 8.3.0-6+rpi1) 8.3.0 but i dont have clang installed. i do see a version 7 for that one

MrSapps commented 3 years ago

Compiler compatibility Clang/LLVM >= 5 MSVC++ >= 14.11 / Visual Studio >= 2017 Xcode >= 10 GCC >= 9 MinGW >= 9

seems like clang should work

Exarkuniv commented 3 years ago

ok ill give that a shot if not i know i can install gcc11.

im trying to make a install script for this, for the people who use Retropie. to make it easy to install for them. and also for myself.

MrSapps commented 3 years ago

any luck?

Exarkuniv commented 3 years ago

sorry, my pi is at work so on the weekend i do get anything done. before i was trying to get clang installed. i would install the package but it would not see it. so i tried to get gcc11 installed. after having to redo my images im getting the script to run right now.

Exarkuniv commented 3 years ago

so i got clang version 9.0.0 installed but i still get it to fail at the same point.

i can still get GCC11 installed but it will take a few hours to compile. which im doing right now which on my system i dont mind, but i think trying to make a script for other people to use will just wait till. retropie moves to a new OS

unless that error is caused by something else

MrSapps commented 3 years ago

You can't get that error with clang 9, your build must have still been using gcc.

Exarkuniv commented 3 years ago

that would make sense. how would i make it build clang 9

MrSapps commented 3 years ago

$ export CC=/usr/bin/clang $ export CXX=/usr/bin/clang++ $ cmake .. -- The C compiler identification is Clang -- The CXX compiler identification is Clang

Exarkuniv commented 3 years ago

i did that, and i get CMake Error at /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:48 (message): Could not find compiler set in environment variable CC:

/usr/bin/clang. Call Stack (most recent call first): CMakeLists.txt:2 (project)

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeOutput.log".

thinking that its just not seeing that clang is installed. even though i use clang --version and it pulls up info.

MrSapps commented 3 years ago

Did you set them to the correct path to the clang binary?

Exarkuniv commented 3 years ago

after i slept on it i was thinking the same thing when i install clang 9 i used this to make the paths permanent

echo 'export PATH=/usr/local/clang_9.0.0/bin:$PATH' >> .bashrc echo 'export LD_LIBRARY_PATH=/usr/local/clang_9.0.0/lib:$LD_LIBRARY_PATH' >> .bashrc and when i run clang --version it came up with version 9

so i used this export CC=/usr/local/clang_9.0.0 $ export CXX=/usr/local/clang_9.0.0 $ cmake ..

i get this

-- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/local/clang_9.0.0 -- Check for working C compiler: /usr/local/clang_9.0.0 -- broken CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler

"/usr/local/clang_9.0.0"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_30f4b/fast"
/usr/bin/make -f CMakeFiles/cmTC_30f4b.dir/build.make CMakeFiles/cmTC_30f4b.dir/build
make[1]: Entering directory '/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_30f4b.dir/testCCompiler.c.o
/usr/local/clang_9.0.0   -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -O2    -o CMakeFiles/cmTC_30f4b.dir/testCCompiler.c.o   -c /home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: execvp: /usr/local/clang_9.0.0: Permission denied
make[1]: *** [CMakeFiles/cmTC_30f4b.dir/build.make:66: CMakeFiles/cmTC_30f4b.dir/testCCompiler.c.o] Error 127
make[1]: Leaving directory '/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_30f4b/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred! See also "/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeOutput.log". See also "/home/pi/RetroPie-Setup/tmp/build/relive/alive_reversing/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop. /home/pi/RetroPie-Setup

MrSapps commented 3 years ago

make[1]: execvp: /usr/local/clang_9.0.0: Permission denied

something is broken with your clang install

Exarkuniv commented 3 years ago

good try but its a no. even though i have the path correct it still will not see or use clang. and i have changed owners on the clang folder to try and still nothing.

so on Buster or least on my build its a no. there is no way to get the correct versions installed on this OS. or least no way that works

MrSapps commented 3 years ago

your log indicates a broken clang install, its nothing to do with relive at that point in the failure, it means the executable probably hasn't got the execute permission, hence broken install

Exarkuniv commented 3 years ago

i know. how i installed this way got it to be "installed" but i think since its not official for Debian/buster is why its not working correctly

if i had a new OS that have newer versions of GCC and clang.

MrSapps commented 3 years ago

Yeah I'm not sure why you've done that? It isn't working because the binaries don't have the +X flag. But why not just install the system clang which is clang 7? You need 6 or above so that would just work...

Exarkuniv commented 3 years ago

i triyed that, before, but nothing happened

after more digging i happen to find something that installed and now shows up when i run clang --version

Exarkuniv commented 3 years ago

now that i have clang installed and its right this time. it almost compiles all the way. it stops at 90%. so close

i got this when i ran the cmake pi@retropie:~/alive_reversing/build $ cmake -S .. -B . -- The C compiler identification is Clang 7.0.1 -- The CXX compiler identification is Clang 7.0.1 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found SDL: /usr/lib/arm-linux-gnueabihf/libSDL2main.a;/usr/lib/arm-linux-gnueabihf/libSDL2.so;-lpthread CMake Warning at CMakeLists.txt:61 (message): No AE_ROOT environment variable found, resorting to the default path

CMake Warning at CMakeLists.txt:68 (message): No AO_ROOT environment variable found, resorting to the default path

-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libOpenGL.so -- Found X11: /usr/include -- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so -- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/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 -- Checking whether system has ANSI C header files -- Looking for 8 include files dlfcn.h, ..., float.h -- Looking for 8 include files dlfcn.h, ..., float.h - found -- Performing Test memchrExists -- Performing Test memchrExists - Success -- Performing Test freeExists -- Performing Test freeExists - Success -- ANSI C header files - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for DIR in sys/stat.h;sys/types.h;dirent.h -- Looking for DIR in sys/stat.h;sys/types.h;dirent.h - found -- Looking for stdio.h -- Looking for stdio.h - found -- Looking for stdbool.h -- Looking for stdbool.h - found -- Looking for math.h -- Looking for math.h - found -- Looking for errno.h -- Looking for errno.h - found -- Looking for stdarg.h -- Looking for stdarg.h - found -- Looking for memory.h -- Looking for memory.h - found -- Looking for sys/mman.h -- Looking for sys/mman.h - found -- Looking for sys/time.h -- Looking for sys/time.h - found -- Looking for sys/ioctl.h -- Looking for sys/ioctl.h - found -- Looking for fcntl.h -- Looking for fcntl.h - found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test _have_inline -- Performing Test _have_inline - Success -- Performing Test _have_vla -- Performing Test _have_vla - Success -- Check if the system is big endian -- Searching 16 bit integer -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Configuring done -- Generating done -- Build files have been written to: /home/pi/alive_reversing/build

then as it was running the make i was seeing a few different warnings popping up

this is just a small part of what i was seeing

/home/pi/alive_reversing/Source/AliveLibAO/PauseMenu.cpp:397:54: error: non-constant-expression cannot be narrowed from type 'signed char' to 'char_type' (aka 'char') in initializer list [-Wc++11-narrowing] char_type lastPressedKeyNT[2] = {last_pressed, 0}; ^~~~ /home/pi/alive_reversing/Source/AliveLibAO/PauseMenu.cpp:397:54: note: insert an explicit cast to silence this issue char_type lastPressedKeyNT[2] = {last_pressed, 0}; ^~~~ static_cast( ) /home/pi/alive_reversing/Source/AliveLibAO/Abe.cpp:7215:52: warning: result of comparison of constant -1 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] if (pSaveData->field_264_bInfiniteGrenades == -1)


3 warnings generated.
[ 90%] Building CXX object Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/DDCheat.cpp.o
[ 90%] Building CXX object Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/CheatController.cpp.o
In file included from /home/pi/alive_reversing/Source/AliveLibAO/DDCheat.cpp:9:
In file included from /home/pi/alive_reversing/Source/AliveLibAO/Abe.hpp:9:
In file included from /home/pi/alive_reversing/Source/AliveLibAE/Path.hpp:4:
In file included from /home/pi/alive_reversing/Source/AliveLibAE/Psx.hpp:4:
In file included from /home/pi/alive_reversing/Source/AliveLibAE/bmp.hpp:22:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:440:9: warning: unannotated fall-through between
      switch labels [-Wimplicit-fallthrough]
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
/usr/include/SDL2/SDL_stdinc.h:440:9: note: insert '[[fallthrough]];' to silence
      this warning
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/include/SDL2/SDL_stdinc.h:440:9: note: insert 'break;' to avoid
      fall-through
        case 3:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/include/SDL2/SDL_stdinc.h:441:9: warning: unannotated fall-through between
      switch labels [-Wimplicit-fallthrough]
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
/usr/include/SDL2/SDL_stdinc.h:441:9: note: insert '[[fallthrough]];' to silence
      this warning
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/include/SDL2/SDL_stdinc.h:441:9: note: insert 'break;' to avoid
      fall-through
        case 2:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/usr/include/SDL2/SDL_stdinc.h:442:9: warning: unannotated fall-through between
      switch labels [-Wimplicit-fallthrough]
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
/usr/include/SDL2/SDL_stdinc.h:442:9: note: insert '[[fallthrough]];' to silence
      this warning
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        [[fallthrough]];
/usr/include/SDL2/SDL_stdinc.h:442:9: note: insert 'break;' to avoid
      fall-through
        case 1:         *_p++ = _val;   /* fallthrough */
        ^
        break;
/home/pi/alive_reversing/Source/AliveLibAO/DDCheat.cpp:511:37: warning:
      explicitly assigning value of variable of type 'AO::BaseAliveGameObject *'
      to itself [-Wself-assign]
        sControlledCharacter_50767C = sControlledCharacter_50767C;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/alive_reversing/Source/AliveLibAO/DDCheat.cpp:587:22: warning: format
      string is not a string literal [-Wformat-nonliteral]
    vsprintf(buffer, formatStr, va);
                     ^~~~~~~~~
/home/pi/alive_reversing/Source/AliveLibAO/DDCheat.cpp:598:25: warning: format
      string is not a string literal [-Wformat-nonliteral]
    vsprintf(strBuffer, pStr, va);
3 warnings and 1 error generated.
                        ^~~~
make[2]: *** [Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/build.make:2299: Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/PauseMenu.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/pi/alive_reversing/Source/AliveLibAO/Abe.cpp:73:24: warning: unused
      variable 'sAbeMotionNames' [-Wunused-const-variable]
const char_type* const sAbeMotionNames[] = {
                       ^
6 warnings generated.
6 warnings generated.
make[1]: *** [CMakeFiles/Makefile2:602: Source/AliveLibAO/CMakeFiles/AliveLibAO.dir/all] Error 2

like it did not like the SDL2. or something 
MrSapps commented 3 years ago

There is only 1 error:

/home/pi/alive_reversing/Source/AliveLibAO/PauseMenu.cpp:397:54: error: non-constant-expression cannot be narrowed from type 'signed char' to 'char_type' (aka 'char') in initializer list [-Wc++11-narrowing] char_type lastPressedKeyNT[2] = {last_pressed, 0}; ^~~~ /home/pi/alive_reversing/Source/AliveLibAO/PauseMenu.cpp:397:54: note: insert an explicit cast to silence this issue char_type lastPressedKeyNT[2] = {last_pressed, 0};

It needs a cast as it says.

Exarkuniv commented 3 years ago

what is a cast

MrSapps commented 3 years ago

try again with the latest

Exarkuniv commented 3 years ago

that did it. i was able to compile it completely.