ata4 / angrylion-rdp-plus

A low-level N64 video emulation plugin, based on the pixel-perfect angrylion RDP plugin with some improvements.
157 stars 25 forks source link

Build issues on Linux with mupen64plus #11

Closed Mastergatto closed 6 years ago

Mastergatto commented 7 years ago

On Archlinux I'm having some issues with compiling this video plugin for mupen64plus, but in the end it still build a working .so library.

$ make -j8 [ 4%] Generate Git version Scanning dependencies of target gl-screen [ 13%] Building C object CMakeFiles/gl-screen.dir/gl-screen/gl_core_3_3.c.o [ 13%] Building C object CMakeFiles/gl-screen.dir/gl-screen/gl_screen.c.o Scanning dependencies of target core [ 30%] Building C object CMakeFiles/core.dir/core/file.c.o [ 30%] Building C object CMakeFiles/core.dir/core/core.c.o [ 34%] Building C object CMakeFiles/core.dir/core/msg.c.o [ 30%] Building C object CMakeFiles/core.dir/core/rdram.c.o [ 30%] Building C object CMakeFiles/core.dir/core/rdp.c.o [ 39%] Building C object CMakeFiles/core.dir/core/trace_write.c.o [ 43%] Building C object CMakeFiles/core.dir/core/trace_read.c.o [ 47%] Building C object CMakeFiles/core.dir/core/vi.c.o [ 56%] Building CXX object CMakeFiles/core.dir/core/parallel_c.cpp.o [ 56%] Building CXX object CMakeFiles/core.dir/core/parallel.cpp.o [ 60%] Linking C static library libgl-screen.a [ 60%] Built target gl-screen [ 65%] Linking CXX static library libcore.a [ 65%] Built target core Scanning dependencies of target retrace Scanning dependencies of target mupen64plus-video-angrylionplus [ 78%] Building C object CMakeFiles/retrace.dir/retrace/screen_sdl.c.o [ 78%] Building C object CMakeFiles/retrace.dir/retrace/plugin_retrace.c.o [ 78%] Building C object CMakeFiles/retrace.dir/retrace/screen_headless.c.o [ 82%] Building C object CMakeFiles/retrace.dir/retrace/retrace.c.o [ 86%] Building C object CMakeFiles/mupen64plus-video-angrylionplus.dir/plugin-mupen64plus/plugin_m64p.c.o [ 91%] Building C object CMakeFiles/mupen64plus-video-angrylionplus.dir/plugin-mupen64plus/screen_opengl_m64p.c.o [ 95%] Linking CXX executable retrace /usr/bin/ld: cannot open output file retrace: Is a directory collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/retrace.dir/build.make:174: retrace] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/retrace.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [100%] Linking CXX shared library mupen64plus-video-angrylionplus.so [100%] Built target mupen64plus-video-angrylionplus make: [Makefile:84: all] Error 2

loganmc10 commented 7 years ago

This is because it's trying to create an executable called retrace (unrelated to the mupen64plus library), but there is already a folder called "retrace".

You can get around this by building in a "build" folder:

git clone https://github.com/ata4/angrylion-rdp-plus.git
cd angrylion-rdp-plus
mkdir build
cd build
cmake ../
make -j4

Then all the output files will be in angrylion-rdp-plus/build

Mastergatto commented 7 years ago

It has worked this way, thanks for the tip! Although...I wonder if it's still needed to leave the cmakelist as it is now or not. Anyways, I'm leaving to you the decision to close this issue. Thanks again.

loganmc10 commented 7 years ago

It's normal for the CMakeList to be in with the source code, creating a "build" folder is the proper way to do it, that way your Makefile and build objects don't get mixed in with the source code. The retrace folder could be renamed so it doesn't conflict with the retrace executable that is created, I'll leave that up to @ata4

ata4 commented 7 years ago

I would preferably keep the folder name, but rename the executable instead. Or possibly even move all (re)tracing code to a local branch, since it's just an utility program for my tests that appears to confuse anyone else right now.