LyX 2.3.1 builds fine on openSUSE. Maybe you are interested in warnings and errors that the buildsystem used by openSUSE report:
[ 1130s] RPMLINT report: [ 1130s] =============== [ 1139s] lyx.x86_64: W: empty-%post [ 1139s] lyx.x86_64: W: empty-%postun [ 1139s] lyx.x86_64: W: non-executable-script /usr/share/lyx/lyx2lyx/profiling.py 644 /usr/bin/env python [ 1139s] lyx.x86_64: W: non-executable-script /usr/share/lyx/scripts/prefTest.pl.in 644 /usr/bin/env perl [ 1139s] This text file contains a shebang or is located in a path dedicated for [ 1139s] executables, but lacks the executable bits and cannot thus be executed. If [ 1139s] the file is meant to be an executable script, add the executable bits, [ 1139s] otherwise remove the shebang or move the file elsewhere. [ 1139s] [ 1139s] lyx.x86_64: W: position-independent-executable-suggested /usr/bin/lyx [ 1139s] lyx.x86_64: W: position-independent-executable-suggested /usr/bin/lyxclient [ 1139s] lyx.x86_64: W: position-independent-executable-suggested /usr/bin/tex2lyx [ 1139s] This executable should be position independent (all binaries should). Check [ 1139s] that it is built with -fPIE/-fpie in compiler flags and -pie in linker flags. [ 1139s] [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/TeXFiles.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/clean_dvi.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/convertDefault.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/convert_pdf.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/csv2lyx.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/ext_copy.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/fen2ascii.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/fig2pdftex.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/fig2pstex.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/fig_copy.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/html2latexwrapper.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/include_bib.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/layout2layout.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/legacy_lyxpreview2ppm.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/lyxpak.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/lyxpreview2bitmap.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/lyxpreview_tools.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/prefs2prefs.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/prefs2prefs_lfuns.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/prefs2prefs_prefs.py [ 1139s] lyx.x86_64: W: script-without-shebang /usr/share/lyx/scripts/tex_copy.py [ 1139s] This text file has executable bits set or is located in a path dedicated for [ 1139s] executables, but lacks a shebang and cannot thus be executed. If the file is [ 1140s] meant to be an executable script, add the shebang, otherwise remove the [ 1140s] executable bits or move the file elsewhere. [ 1140s] [ 1140s] lyx.x86_64: W: suse-filelist-forbidden-bashcomp-userdirs /etc/bash_completion.d/lyx is not allowed in SUSE [ 1140s] This directory is for user files, use /usr/share/bash- [ 1140s] completion/completions/ [ 1140s] [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9) /usr/share/lyx/configure.py /usr/bin/env python [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9) /usr/share/lyx/lyx2lyx/lyx2lyx /usr/bin/env python [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9) /usr/share/lyx/scripts/listerrors /usr/bin/env python [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9) /usr/share/lyx/scripts/svg2pdftex.py /usr/bin/env python [ 1140s] lyx.x86_64: E: env-script-interpreter (Badness: 9) /usr/share/lyx/scripts/svg2pstex.py /usr/bin/env python [ 1140s] This script uses 'env' as an interpreter. For the rpm runtime dependency [ 1140s] detection to work, the shebang #!/usr/bin/env python needs to be patched into [ 1140s] #!/usr/bin/python otherwise the package dependency generator merely adds a [ 1140s] dependency on /usr/bin/env rather than the actual interpreter /usr/bin/python. [ 1140s] Alternatively, if the file should not be executed, then ensure that it is not [ 1140s] marked as executable or don't install it in a path that is reserved for [ 1140s] executables.