Package Details: polymc 5.1-4

Git Clone URL: https://aur.archlinux.org/polymc.git (read-only, click to copy)
Package Base: polymc
Description: Minecraft launcher with the ability to manage multiple instances
Upstream URL: https://github.com/PolyMC/PolyMC
Licenses: GPL3
Submitter: glorious-yellow
Maintainer: LennyLennington (Kaydax, sperg512)
Last Packager: Kaydax
Votes: 62
Popularity: 0.64
First Submitted: 2022-01-11 20:53 (UTC)
Last Updated: 2023-08-02 18:38 (UTC)

Dependencies (18)

Required by (1)

Sources (1)

Latest Comments

1 2 3 4 5 6 .. 8 Next › Last »

Static_Rocket commented on 2023-08-05 05:25 (UTC) (edited on 2023-08-05 05:27 (UTC) by Static_Rocket)

I would recommend the following changes since jdk17 is the latest supported lts and a chroot build (or any other build) can have issues if another version of java is on the system or is set to something else. This forces the use of jdk17 during compilation unconditionally. From what I've seen the use of JAVA_HOME is only frowned upon in runtime scripts: https://wiki.archlinux.org/title/Java_package_guidelines#Java_packaging_on_Arch_Linux

diff --git a/PKGBUILD b/PKGBUILD
index 0b600cf..f898711 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ url="https://github.com/PolyMC/PolyMC"
 license=('GPL3')
 depends=('java-runtime' 'libgl' 'qt6-base' 'qt6-5compat' 'qt6-svg'
          'qt6-imageformats' 'zlib' 'hicolor-icon-theme' 'quazip-qt6' 'qt6-charts')
-makedepends=('cmake' 'extra-cmake-modules' 'java-environment' 'scdoc')
+makedepends=('cmake' 'extra-cmake-modules' 'java-environment=17' 'scdoc')
 optdepends=('glfw: to use system GLFW libraries'
             'openal: to use system OpenAL libraries'
             'visualvm: Profiling support'
@@ -26,6 +26,7 @@ source=("https://github.com/PolyMC/PolyMC/releases/download/$pkgver/PolyMC-$pkgv
 sha256sums=('ed8a43555c9fcfa783193a0377c6353bb5c9360a0e5742bbb6be4f7c6e7b2704')

 build() {
+  export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
   cmake -B build -S PolyMC-$pkgver \
       -DLauncher_BUILD_PLATFORM='archlinux' \
       -DLauncher_QT_VERSION_MAJOR='6' \

dack commented on 2023-08-03 18:02 (UTC)

Since this fails to build on java 20, could you change the make dependency to something like 'java-environment<=17'? That way, it should build correctly in a clean chroot without manual intervention.

joehillen commented on 2023-08-01 16:01 (UTC)

Another build failure:

[ 30%] Building CXX object launcher/CMakeFiles/Launcher_logic.dir/InstanceCreationTask.cpp.o
In file included from /home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/minecraft/ProfileUtils.h:38,
                 from /home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/minecraft/PackProfile.h:47,
                 from /home/joe/.cache/paru/clone/polymc/src/build/launcher/Launcher_logic_autogen/EWIEGA46WW/../../../../PolyMC-5.1/launcher/ui/pages/instance/VersionPage.h:41,
                 from /home/joe/.cache/paru/clone/polymc/src/build/launcher/Launcher_logic_autogen/EWIEGA46WW/../../../../PolyMC-5.1/launcher/InstancePageProvider.h:7,
                 from /home/joe/.cache/paru/clone/polymc/src/build/launcher/Launcher_logic_autogen/EWIEGA46WW/moc_InstancePageProvider.cpp:9,
                 from /home/joe/.cache/paru/clone/polymc/src/build/launcher/Launcher_logic_autogen/mocs_compilation.cpp:9:
/home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/minecraft/VersionFile.h:141:22: warning: identifier ‘requires’ is a keyword in C++20 [-Wc++20-compat]
  141 |     Meta::RequireSet requires;
      |                      ^~~~~~~~
In file included from /usr/include/c++/13.1.1/functional:57,
                 from /usr/include/qt6/QtCore/qrunnable.h:8,
                 from /usr/include/qt6/QtCore/QRunnable:1,
                 from /home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/tasks/Task.h:38,
                 from /home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/InstanceCopyTask.h:3,
                 from /home/joe/.cache/paru/clone/polymc/src/PolyMC-5.1/launcher/InstanceCopyTask.cpp:1:
/usr/include/c++/13.1.1/bits/refwrap.h:109:1: internal compiler error: in cp_parser_lookup_name, at cp/parser.cc:31213
  109 | _GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
      | ^~~~~~~~~~~~~~~~~~~~~~
0x1ad4bb8 internal_error(char const*, ...)
    ???:0
0x6b7b33 fancy_abort(char const*, int, char const*)
    ???:0
0x944010 c_common_parse_file()
    ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
make[2]: *** [launcher/CMakeFiles/Launcher_logic.dir/build.make:1023: launcher/CMakeFiles/Launcher_logic.dir/InstanceCopyTask.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:2721: launcher/CMakeFiles/Launcher_logic.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'polymc-5.1-2':
error: packages failed to build: polymc-5.1-2

SClause commented on 2023-05-31 04:14 (UTC) (edited on 2023-05-31 05:42 (UTC) by SClause)

warning: [options] bootstrap class path not set in conjunction with -source 7
error: Source option 7 is no longer supported. Use 8 or later.
error: Target option 7 is no longer supported. Use 8 or later.
make[2]: *** [libraries/launcher/CMakeFiles/NewLaunch.dir/build.make:93: 
libraries/launcher/CMakeFiles/NewLaunch.dir/java_compiled_NewLaunch] Error 2
make[1]: *** [CMakeFiles/Makefile2:1418: 
libraries/launcher/CMakeFiles/NewLaunch.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

This seems to be a problem with the Java version. I solved it by switching to version 17.

pacman -S jre17-openjdk jdk17-openjdk
sudo archlinux-java set java-17-openjdk

After compile and install I switched back to Java 20.

sudo archlinux-java set java-20-openjdk

lgdsgd commented on 2023-05-30 12:05 (UTC) (edited on 2023-05-31 07:14 (UTC) by lgdsgd)

警告: [options] 未与 -source 7 一起设置引导类路径
错误: 不再支持源选项 7。请使用 8 或更高版本。
错误: 不再支持目标选项 7。请使用 8 或更高版本。
make[2]: *** [libraries/launcher/CMakeFiles/NewLaunch.dir/build.make:93:
libraries/launcher/CMakeFiles/NewLaunch.dir/java_compiled_NewLaunch] 错误 2
make[1]: *** [CMakeFiles/Makefile2:1418:
libraries/launcher/CMakeFiles/NewLaunch.dir/all] 错误 2
make: *** [Makefile:146:all] 错误 2
==> 错误: 在 build() 中发生一个错误。    
正在放弃...
错误: 未能构建 'polymc-5.1-1': 
错误: 未能构建的软件包: polymc-5.1-1

I use java20 and get this error

bkb commented on 2023-03-02 08:42 (UTC)

I've just switched to binaries and it's all fine

LennyLennington commented on 2023-03-01 20:57 (UTC)

@bkb You need to use archlinux-java to set your default java version to one for which you have a JDK installed.

bkb commented on 2023-02-27 14:28 (UTC)

CMake Error at libraries/launcher/CMakeLists.txt:2 (project):
  No CMAKE_Java_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "JAVA_COMPILER" or the CMake cache entry CMAKE_Java_COMPILER to
  the full path to the compiler, or to the compiler name if it is in the
  PATH.


-- Configuring incomplete, errors occurred!
See also "/home/$USER/.cache/paru/clone/polymc/src/build/CMakeFiles/CMakeOutput.log".
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'polymc-5.1-1': 

blakkheim commented on 2023-01-30 15:26 (UTC)

@trainzkid Not good advice. This package depends on the shared library quazip-qt6 provides. All you need to do is rebuild it with the updated package installed (1.4 in this case).