EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
982 stars 186 forks source link

0.6.0 source tarball doesn't build, missing files #1753

Closed akien-mga closed 1 year ago

akien-mga commented 5 years ago

The EasyRPG Player 0.6.0 source tarball provided on the website cannot be used to build from source: https://easyrpg.org/downloads/player/0.6.0/easyrpg-player-0.6.0.tar.gz

Console-specific files have been excluded when generating it, but they're still listed in CMakeLists.txt, so the build fails:

$ cmake .
-- The CXX compiler identification is GNU 8.3.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found liblcf: /usr/lib64/liblcf.so (found version "0.6.0") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.36") 
-- Found Pixman: /usr/lib64/libpixman-1.so  
-- Found SDL2: /usr/lib64/libSDL2.so  
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.9.1") 
-- Found Harfbuzz: /usr/lib64/libharfbuzz.so  
-- Found SDL2_mixer: /usr/lib64/libSDL2_mixer.so  
-- Could NOT find speexdsp (missing: SPEEXDSP_LIBRARY SPEEXDSP_INCLUDE_DIR) 
-- Could NOT find mpg123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR) 
-- Could NOT find LibSndFile (missing: LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR) 
-- Found Vorbisfile: /usr/lib64/libvorbisfile.so  
-- Found Opusfile: /usr/lib64/libopusfile.so  
-- Could NOT find WildMidi (missing: WILDMIDI_LIBRARY WILDMIDI_INCLUDE_DIR) 
-- Could NOT find XMP (missing: XMP_LIBRARY XMP_INCLUDE_DIR) 
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.15") found components:  doxygen dot 
-- 
-- Audio backend: SDL2_mixer
-- 
-- WAV playback: SDL2_mixer
-- MIDI playback: SDL2_mixer. Fallback to built-in (FmMidi)
-- MP3 playback: None
-- Ogg Vorbis playback: libvorbis
-- MOD playback: None
-- Opus playback: opusfile
-- Resampler: None
-- 
-- WARNING:
-- Using SDL2_mixer directly for playback or resampling is not recommended.
-- Some RPG Maker features (e.g. pitch changes) will not work.
-- 
-- Font rendering: Freetype with Harfbuzz / built-in
-- 
-- Configuring done
CMake Error at CMakeLists.txt:11 (add_library):
  Cannot find source file:

    src/3ds_ui.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

CMake Error at CMakeLists.txt:11 (add_library):
  No SOURCES given to target: EasyRPG_Player

-- Build files have been written to: /home/akien/Projects/mageia/Checkout/easyrpg-player/BUILD/easyrpg-player-0.6.0
Ghabry commented 5 years ago

Thanks, this directly shows another bug: The summary is wrong, mp3 and mod should be "SDL2 Mixer" instead of "None".

Needs SDL2_MIXER_FOUND in the if, not SDL2_mixer_FOUND

Ghabry commented 5 years ago

@carstene1ns

What's your prefered solution for this? Add all the missing cpp/h files to libeasyrpg_player_a_SOURCES or use EXTRADIST?

Same problem applies for WANT_FMMIDI btw. When this is disabled the dist package won't be able to build against FMMIDI because the source files are missing.

carstene1ns commented 5 years ago

I am working on a different solution already.

zeuskabob commented 5 years ago

This is still an issue.

In file included from src/game_commonevent.h:24:0, from src/game_map.h:25, from src/battle_animation.cpp:23: src/game_interpreter_map.h:26:36: fatal error: rpg_saveeventexecframe.h: No such file or directory

Without any need for confirmation from source, we find that Player has no "rpg_saveeventexecframe.h", and that this file is referenced in "game_interpreter_map.h"

This is when pulled from master.

Ghabry commented 5 years ago

This is completely unrelated to this issue.

That file is part of liblcf. Because you build from the master branch you also have to build liblcf from it.

zeuskabob commented 5 years ago

Oh wow, I was just coming in to correct myself. That must mean I've done something wrong during my install of liblcf, yes? For example, after copying over the header files from the liblcf release I'm getting

src/game_battlealgorithm.cpp: In member function ‘virtual bool Game_BattleAlgorithm::Normal::Execute()’: src/game_battlealgorithm.cpp:1038:50: error: ‘const class RPG::Item’ has no member named ‘reverse_state_effect’ weapon1_heals_states = weapon1 && weapon1->reverse_state_effect;

indicating I've got inconsistent versions of files in the install.

zeuskabob commented 5 years ago

Hmm, after re-installing everything per the instructions on https://wiki.easyrpg.org/development/compiling/liblcf/autotools and https://wiki.easyrpg.org/development/compiling/player/autotools and confirming that liblcf files were in /usr/lib/ (liblcf.a, liblcf.la, liblcf.so, liblcf.so.0, and liblcf.so.0.0.0), it still fails with the same error. I'll continue troubleshooting eventually, but it doesn't seem to work properly when using the master branch and instructions provided.

Ghabry commented 5 years ago

Our buildbots say that the master branch compiles fine.

Either use player 0.6 and liblcf 0.6 or player master and liblcf master.

reverse_state_effect was added after 0.6 so you haven't installed liblcf properly

fdelapena commented 5 years ago

@akien-mga thanks, the 0.6.1 release fixes the cmake build, this issue is kept open for a better solution.

akien-mga commented 5 years ago

@fdelapena Thanks. I tried building the 0.6.1 tar.xz tarball and it still seems to lack some files though:

Executing(%prep): /bin/sh -e /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILDROOT/rpm-tmp.blS7bJ
+ umask 022
+ cd /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILD
+ rm -rf easyrpg-player-0.6.1
+ /usr/bin/xz -dc /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/SOURCES/easyrpg-player-0.6.1.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd easyrpg-player-0.6.1
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILDROOT/rpm-tmp.nOXyQZ
+ umask 022
+ cd /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILD
+ cd easyrpg-player-0.6.1
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables'
+ export FFLAGS
+ LDFLAGS=' -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags'
+ export LDFLAGS
+ CONFIGURE_TOP=.
+ /usr/lib/rpm/mageia/force-as-needed-for-shared-lib-in-libtool
Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html)
+ /usr/lib/rpm/mageia/drop-ld-no-undefined-for-shared-lib-modules-in-libtool
+ /usr/lib/rpm/mageia/fix-libtool-ltmain-from-overlinking
+ /usr/lib/rpm/mageia/fix-libtool-from-moving-options-after-libs .
+ /usr/lib/rpm/mageia/fix-dlsearch-path-in-libtool-for-multilib . lib64
+ '[' -f ./configure.in -o -f ./configure.ac ']'
+ CONFIGURE_XPATH='--x-includes=/usr/include --x-libraries=/usr/lib64'
+ ./configure --build=x86_64-mageia-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib64 --bindir=/usr/games
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LCF... yes
checking for PIXMAN... yes
checking for FREETYPE... yes
checking for HARFBUZZ... yes
checking for SDL... yes
checking for SDLMIXER... yes
checking for PNG... yes
checking for ZLIB... yes
checking for MPG123... no
checking for WILDMIDI... no
checking for OGGVORBIS... yes
checking for OPUS... yes
checking for SNDFILE... yes
checking for XMP... no
checking for SPEEXDSP... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking cstdint usability... yes
checking cstdint presence... yes
checking for cstdint... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking string usability... yes
checking string presence... yes
checking for string... yes
checking iostream usability... yes
checking iostream presence... yes
checking for iostream... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking whether byte ordering is bigendian... no
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int8_t... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for error_at_line... yes
checking for malloc... yes
checking for floor... yes
checking for getcwd... yes
checking for memset... yes
checking for putenv... yes
checking for strerror... yes
checking for a2x... no
checking for a2x.py... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating resources/Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
+ /usr/bin/make -O -j8 -j1
/usr/bin/make  all-am
make[1]: Entering directory '/home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILD/easyrpg-player-0.6.1'
  CXX      src/easyrpg_player-main.o
  CXX      src/libeasyrpg_player_a-3ds_ui.o
  CXX      src/libeasyrpg_player_a-async_handler.o
In file included from src/async_handler.cpp:31:
src/main_data.h:22:10: fatal error: data.h: No such file or directory
 #include "data.h"
          ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:2062: src/libeasyrpg_player_a-async_handler.o] Error 1
make[1]: Leaving directory '/home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILD/easyrpg-player-0.6.1'
make: *** [Makefile:1332: all] Error 2
error: Bad exit status from /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILDROOT/rpm-tmp.nOXyQZ (%build)

RPM build errors:
    Bad exit status from /home/akien/Projects/mageia/Checkout/liblcf/easyrpg-player/BUILDROOT/rpm-tmp.nOXyQZ (%build)
fdelapena commented 5 years ago

@akien-mga: it seems unable to find data.h from liblcf, (though LCF from pkg-config looks around...) is liblcf 0.6.1 installed properly? By the way, the checkout path looks strange (liblcf/easyrpg-player).

Did you use cmake to install liblcf and autotools for easyrpg-player? (I've never tried this combination, maybe it fails). Maybe the pkg config path or some other buildroot setting is conflicting somehow.

akien-mga commented 5 years ago

I'm using CMake for both, but indeed there's something off in the liblcf pkgconfig:

$ pkg-config --libs --cflags liblcf
-I/usr/liblcf -L/usr/usr/lib64 -llcf

(should be -I/usr/include/liblcf -L/usr/lib64)

By the way, the checkout path looks strange (liblcf/easyrpg-player).

That's just because I was lazy and checked out easyrpg-player after building liblcf, and thus in the same folder, so that I can eventually remove both in one go ;)

akien-mga commented 5 years ago

I can provide a patch for liblcf to fix the pkgconfig file generation.

fdelapena commented 5 years ago

Thank you, patches are welcome :)

cc @carstene1ns @Ghabry

carstene1ns commented 4 years ago

Pushing this branch for completeness: https://github.com/EasyRPG/Player/compare/master...carstene1ns:git-dist-ver In the future I want to use git archive to generate distribution archives, it lessens the maintenance burden.

Ghabry commented 3 years ago

@carstene1ns Will this be solved via your branch before 0.7 or move it?