matanui159 / ReplaySorcery

An open-source, instant-replay solution for Linux
GNU General Public License v3.0
853 stars 27 forks source link

Error whilst compiling with backtrace #71

Closed monstoor closed 3 years ago

monstoor commented 3 years ago

Hi. I'm trying to compile this with my OpenSUSE Tumbleweed system and all goes well until the final stages where I get the following output:

[ 86%] Building C object CMakeFiles/replay-sorcery.dir/src/system/xlib.c.o
[ 88%] Building C object CMakeFiles/replay-sorcery.dir/src/audio_input/audio.c.o
[ 89%] Building C object CMakeFiles/replay-sorcery.dir/src/audio_input/audio_encoder.c.o
[ 91%] Building C object CMakeFiles/replay-sorcery.dir/src/config.c.o
[ 93%] Building C object CMakeFiles/replay-sorcery.dir/src/compress.c.o
[ 94%] Building C object CMakeFiles/replay-sorcery.dir/src/mp4.c.o
[ 96%] Building C object CMakeFiles/replay-sorcery.dir/src/output.c.o
make[2]: *** No rule to make target 'backtrace-prefix/lib/libbacktrace.a', needed by 'replay-sorcery'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 98%] Building C object CMakeFiles/replay-sorcery.dir/src/main.c.o
make[2]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
make[1]: *** [CMakeFiles/Makefile2:272: CMakeFiles/replay-sorcery.dir/all] Error 2
make[1]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
make: *** [Makefile:149: all] Error 2
make: Leaving directory '/data2/Applications/ReplaySorcery/bin'

I used the -j8 option when compiling but I don't know if this would make any difference. Sadly, my coding skills are 25 years out of date so if any help could be offered it'd be appreciated.

matanui159 commented 3 years ago

I believe you forgot to run git submodule update --init

monstoor commented 3 years ago

Thanks for the reply. I have followed your correct instructions and here's an abridged copy of the output:

doctor@localhost:/data2/Applications> git clone https://github.com/matanui159/ReplaySorcery.git
Cloning into 'ReplaySorcery'...
remote: Enumerating objects: 365, done.
remote: Counting objects: 100% (365/365), done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 1883 (delta 272), reused 199 (delta 120), pack-reused 1518
Receiving objects: 100% (1883/1883), 1010.67 KiB | 2.45 MiB/s, done.
Resolving deltas: 100% (1290/1290), done.
doctor@localhost:/data2/Applications> cd ReplaySorcery
doctor@localhost:/data2/Applications/ReplaySorcery> git submodule update --init
Submodule 'dep/fdk-aac' (https://github.com/mstorsjo/fdk-aac.git) registered for path 'dep/fdk-aac'
Submodule 'dep/libbacktrace' (https://github.com/ianlancetaylor/libbacktrace.git) registered for path 'dep/libbacktrace'
Submodule 'dep/libjpeg-turbo' (https://github.com/libjpeg-turbo/libjpeg-turbo.git) registered for path 'dep/libjpeg-turbo'
Submodule 'dep/minimp4' (https://github.com/lieff/minimp4.git) registered for path 'dep/minimp4'
Submodule 'dep/sdl2' (https://github.com/pseregiet/sdl2-audio-monitor.git) registered for path 'dep/sdl2'
Submodule 'dep/x264' (https://code.videolan.org/videolan/x264.git) registered for path 'dep/x264'
Cloning into '/data2/Applications/ReplaySorcery/dep/fdk-aac'...
Cloning into '/data2/Applications/ReplaySorcery/dep/libbacktrace'...
Cloning into '/data2/Applications/ReplaySorcery/dep/libjpeg-turbo'...
Cloning into '/data2/Applications/ReplaySorcery/dep/minimp4'...
Cloning into '/data2/Applications/ReplaySorcery/dep/sdl2'...
Cloning into '/data2/Applications/ReplaySorcery/dep/x264'...
Submodule path 'dep/fdk-aac': checked out '3a831a5fbc990c83e9b5b804a082bb158364e793'
Submodule path 'dep/libbacktrace': checked out 'f24e9f401fde0249ca48fa98493a672e83b0f3dc'
Submodule path 'dep/libjpeg-turbo': checked out '02227e48a990911a6da35ab8034911a9fbc1055a'
Submodule path 'dep/minimp4': checked out '6184e61cd6c9cad592d10fd7eae7278ff82a604a'
Submodule path 'dep/sdl2': checked out '74936a856eb20c90e08f56a0a1fe8bee2d14e2ce'
Submodule path 'dep/x264': checked out '4121277b40a667665d4eea1726aefdc55d12d110'
doctor@localhost:/data2/Applications/ReplaySorcery> cmake -B bin -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- 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
-- Performing Test HAVE_G_FLAG
-- Performing Test HAVE_G_FLAG - Success
-- Performing Test HAVE_ALL_WARN
-- Performing Test HAVE_ALL_WARN - Success
-- Performing Test HAVE_EXTRA_WARN
-- Performing Test HAVE_EXTRA_WARN - Success
-- Performing Test HAVE_PEDANTIC_WARN
-- Performing Test HAVE_PEDANTIC_WARN - Success
-- Performing Test HAVE_CONVERSION_WARN
-- Performing Test HAVE_CONVERSION_WARN - Success
-- Performing Test HAVE_STRICT_PROTOTYPES_WARN
-- Performing Test HAVE_STRICT_PROTOTYPES_WARN - Success
-- Performing Test HAVE_MISSING_PROTOTYPES_WARN
-- Performing Test HAVE_MISSING_PROTOTYPES_WARN - Success
-- 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 X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/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
-- Configuring done
-- Generating done
-- Build files have been written to: /data2/Applications/ReplaySorcery/bin
doctor@localhost:/data2/Applications/ReplaySorcery> make -j8 -C bin
make: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[1]: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
...
make[3]: Leaving directory '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/src/fdk-aac-build'
[ 66%] Performing install step for 'fdk-aac'
make[3]: Entering directory '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/src/fdk-aac-build'
make[4]: Entering directory '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/src/fdk-aac-build'
 /usr/bin/mkdir -p '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64'
 /usr/bin/mkdir -p '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/include/fdk-aac'
 /usr/bin/mkdir -p '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/pkgconfig'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libfdk-aac.la '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64'
 /usr/bin/install -c -m 644 fdk-aac.pc '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/pkgconfig'
 /usr/bin/install -c -m 644 /data2/Applications/ReplaySorcery/dep/fdk-aac/libSYS/include/machine_type.h /data2/Applications/ReplaySorcery/dep/fdk-aac/libSYS/include/genericStds.h /data2/Applications/ReplaySorcery/dep/fdk-aac/libSYS/include/FDK_audio.h /data2/Applications/ReplaySorcery/dep/fdk-aac/libSYS/include/syslib_channelMapDescr.h /data2/Applications/ReplaySorcery/dep/fdk-aac/libAACenc/include/aacenc_lib.h /data2/Applications/ReplaySorcery/dep/fdk-aac/libAACdec/include/aacdecoder_lib.h '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/include/fdk-aac'
libtool: install: /usr/bin/install -c .libs/libfdk-aac.lai /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/libfdk-aac.la
libtool: install: /usr/bin/install -c .libs/libfdk-aac.a /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/libfdk-aac.a
libtool: install: chmod 644 /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/libfdk-aac.a
libtool: install: ranlib /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64/libfdk-aac.a
libtool: finish: PATH="/home/doctor/.local/bin:/home/doctor/.local/bin:/usr/local/bin:/usr/bin:/bin:/home/doctor/.dotnet/tools:/sbin" ldconfig -n /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64
----------------------------------------------------------------------
Libraries have been installed in:
   /data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[4]: Leaving directory '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/src/fdk-aac-build'
make[3]: Leaving directory '/data2/Applications/ReplaySorcery/bin/fdk-aac-prefix/src/fdk-aac-build'
[ 67%] Completed 'fdk-aac'
make[2]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
[ 67%] Built target fdk-aac
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
Scanning dependencies of target replay-sorcery
make[2]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
make[2]: Entering directory '/data2/Applications/ReplaySorcery/bin'
[ 69%] Building C object CMakeFiles/replay-sorcery.dir/src/util/log.c.o
[ 71%] Building C object CMakeFiles/replay-sorcery.dir/src/util/buffer.c.o
[ 72%] Building C object CMakeFiles/replay-sorcery.dir/src/util/circle_static.c.o
[ 74%] Building C object CMakeFiles/replay-sorcery.dir/src/util/path.c.o
[ 76%] Building C object CMakeFiles/replay-sorcery.dir/src/util/string.c.o
[ 79%] Building C object CMakeFiles/replay-sorcery.dir/src/util/memory.c.o
[ 79%] Building C object CMakeFiles/replay-sorcery.dir/src/util/circle.c.o
[ 81%] Building C object CMakeFiles/replay-sorcery.dir/src/util/frame.c.o
[ 83%] Building C object CMakeFiles/replay-sorcery.dir/src/system/system.c.o
[ 84%] Building C object CMakeFiles/replay-sorcery.dir/src/system/framerate.c.o
[ 86%] Building C object CMakeFiles/replay-sorcery.dir/src/system/xlib.c.o
[ 88%] Building C object CMakeFiles/replay-sorcery.dir/src/audio_input/audio.c.o
[ 89%] Building C object CMakeFiles/replay-sorcery.dir/src/config.c.o
[ 91%] Building C object CMakeFiles/replay-sorcery.dir/src/compress.c.o
[ 93%] Building C object CMakeFiles/replay-sorcery.dir/src/audio_input/audio_encoder.c.o
[ 94%] Building C object CMakeFiles/replay-sorcery.dir/src/mp4.c.o
[ 96%] Building C object CMakeFiles/replay-sorcery.dir/src/output.c.o
make[2]: *** No rule to make target 'backtrace-prefix/lib/libbacktrace.a', needed by 'replay-sorcery'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 98%] Building C object CMakeFiles/replay-sorcery.dir/src/main.c.o
make[2]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
make[1]: *** [CMakeFiles/Makefile2:272: CMakeFiles/replay-sorcery.dir/all] Error 2
make[1]: Leaving directory '/data2/Applications/ReplaySorcery/bin'
make: *** [Makefile:149: all] Error 2
make: Leaving directory '/data2/Applications/ReplaySorcery/bin'

Sadly, it still does not compile the backtrace library.

matanui159 commented 3 years ago

I tried replicating this myself on latest master and everything seemed normal. Maybe libbacktrace is failing to build? Can you try building with -j1 and see if anything goes wrong around the point where it builds libbacktrace?

monstoor commented 3 years ago

Hi, I have the output of the -j1 build here:

[ 17%] Performing build step for 'backtrace'
make[3]: Entering directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
make[4]: Entering directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=atomic.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/atomic.c -o atomic.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=dwarf.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/dwarf.c -o dwarf.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=fileline.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/fileline.c -o fileline.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=posix.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/posix.c -o posix.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=print.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/print.c -o print.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=sort.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/sort.c -o sort.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=state.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/state.c -o state.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=backtrace.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/backtrace.c -o backtrace.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=simple.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/simple.c -o simple.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=elf.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/elf.c -o elf.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=mmapio.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/mmapio.c -o mmapio.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/data2/Applications/ReplaySorcery/dep/libbacktrace -funwind-tables -frandom-seed=mmap.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -O3 -c /data2/Applications/ReplaySorcery/dep/libbacktrace/mmap.c -o mmap.o
libtool: link: ar cru .libs/libbacktrace.a  atomic.o dwarf.o fileline.o posix.o print.o sort.o state.o backtrace.o simple.o elf.o mmapio.o mmap.o
libtool: link: ranlib .libs/libbacktrace.a
libtool: link: ( cd ".libs" && rm -f "libbacktrace.la" && ln -s "../libbacktrace.la" "libbacktrace.la" )
make[4]: Leaving directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
make[3]: Leaving directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
[ 20%] Performing install step for 'backtrace'
make[3]: Entering directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
make[4]: Entering directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
 /usr/bin/mkdir -p '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libbacktrace.la '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64'
libtool: install: /usr/bin/install -c .libs/libbacktrace.lai /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64/libbacktrace.la
libtool: install: /usr/bin/install -c .libs/libbacktrace.a /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64/libbacktrace.a
libtool: install: chmod 644 /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64/libbacktrace.a
libtool: install: ranlib /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64/libbacktrace.a
libtool: finish: PATH="/home/doctor/.local/bin:/home/doctor/.local/bin:/usr/local/bin:/usr/bin:/bin:/home/doctor/.dotnet/tools:/sbin" ldconfig -n /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64
----------------------------------------------------------------------
Libraries have been installed in:
   /data2/Applications/ReplaySorcery/bin/backtrace-prefix/lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/include'
 /usr/bin/install -c -m 644 /data2/Applications/ReplaySorcery/dep/libbacktrace/backtrace.h backtrace-supported.h '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/include'
make[4]: Leaving directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
make[3]: Leaving directory '/data2/Applications/ReplaySorcery/bin/backtrace-prefix/src/backtrace-build'
[ 22%] Completed 'backtrace'
matanui159 commented 3 years ago

Ah, so the problem is that its installing to backtrace-prefix/lib64 instead of backtrace-prefix/lib. I will look into seeing if I can prevent this from happening.

matanui159 commented 3 years ago

When you get a chance can you try building latest master? I have a potential fix there

monstoor commented 3 years ago

I'm pleased to announce that the compilation was successful with the latest master! Many thanks for your patience and help with this.