Cannot Build on Arch Linux
Closed this issue · 4 comments
Trying to build from source manually throws a whole heap of Java errors:
`javac:
[exec] make: Nothing to be done for 'all'.
[javac] Compiling 1052 source files to /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/build
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/templates/TemplateDatabase.java:420: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val name = getNameFromPrefsKey(key);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/FlipActions.java:98: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val type = datum.getType();
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/ImageBrowserActions.java:123: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val file = datum.getFile();
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/ImageBrowserActions.java:231: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val file = datum.getFile();
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/ImageBrowserActions.java:245: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val file = datum.getFile();
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/ImageBrowserActions.java:250: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val file = FileUtil.resolveAliasFile(f);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/browser/view/ImageBrowserActions.java:251: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val path = file.getAbsolutePath();
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/image/metadata/makernotes/MakerNoteProbe.java:40: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val dirClass = probe.match(metadata);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:106: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val userKey = getUserPresentableKey(key);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:107: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val checkbox = new JCheckBox(userKey);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:128: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val userKey = getUserPresentableKey(key);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:129: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val config = op.getSliderConfig(key);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:130: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val slider = new GenericSlider(userKey, config);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:266: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val value = Double.parseDouble(sliderNode.getAttribute(key));
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:269: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val value = Integer.parseInt(sliderNode.getAttribute(key));
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:284: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val value = checkboxNode.getAttribute(key);
[javac] ^
[javac] /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/ui/operation/generic/GenericControl.java:293: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
[javac] val value = choiceNode.getAttribute(key);
[javac] ^
[javac] Note: /home/solarisfire/Documents/lightzone/LightZone/lightcrafts/src/com/lightcrafts/model/ImageEditor/ImageEditorDisplay.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 17 errors
BUILD FAILED
/home/solarisfire/Documents/lightzone/LightZone/linux/build.xml:37: The following error occurred while executing this line:
/home/solarisfire/Documents/lightzone/LightZone/lightcrafts/build.xml:106: Compile failed; see the compiler error output for details.`
Trying to install using lightzone-git from the aur throws a different error:
` [exec] LC_lensfun.cpp: In function ‘jlong Java_com_lightcrafts_utils_Lensfun_init(JNIEnv*, jobject, jstring)’:
[exec] LC_lensfun.cpp:57:29: error: ‘uintptr_t’ does not name a type
[exec] 57 | return reinterpret_cast<uintptr_t>(lf);
[exec] | ^~~~~~~~~
[exec] LC_lensfun.cpp:16:1: note: ‘uintptr_t’ is defined in header ‘’; did you forget to ‘#include ’?
[exec] 15 | #include "interpolation.h"
[exec] +++ |+#include
[exec] 16 |
[exec] make[2]: *** [../../../lightcrafts/mk/sources.mk:134: LC_lensfun.o] Error 1
[exec] make[1]: *** [../jni.mk:198: mk_target] Error 2
[exec] make: *** [../mk/recurse.mk:29: lensfun] Error 1
BUILD FAILED
/home/solarisfire/.cache/yay/lightzone-git/src/LightZone/linux/build.xml:37: The following error occurred while executing this line:
/home/solarisfire/.cache/yay/lightzone-git/src/LightZone/lightcrafts/build.xml:141: exec returned: 2`
Any ideas?
This issue caused by lombok that doesn't support the latest JDK yet.
I replaced the val
with final var
as a workaround in 4ec2b1a.
By the way, I recently became a maintainer of the lightzone
package on AUR and uploaded new version with that patch, so it should work fine now.
Tried installing lightzone from the AUR and getting:
[exec] -----> Entering lensfun
[exec] make --no-print-directory -j -C lensfun || exit 1
[exec] g++ -c -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -fPIC -march=athlon64 -msse2 -mfpmath=sse -O3 -fno-trapping-math -fomit-frame-pointer -std=c++14 -DJNILIB -g -fPIC -march=athlon64 -msse2 -mfpmath=sse -O3 -fno-trapping-math -fomit-frame-pointer -std=c++14 -DJNILIB -I/usr/lib/jvm/java-17-openjdk/include -I/usr/lib/jvm/java-17-openjdk/include/linux -I../../../lightcrafts -I../../../lightcrafts/jnisrc/jniutils -I/usr/include/lensfun -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 LC_lensfun.cpp
[exec] LC_lensfun.cpp: In function ‘jlong Java_com_lightcrafts_utils_Lensfun_init(JNIEnv*, jobject, jstring)’:
[exec] LC_lensfun.cpp:57:29: error: ‘uintptr_t’ does not name a type
[exec] 57 | return reinterpret_cast<uintptr_t>(lf);
[exec] | ^~~~~~~~~
[exec] LC_lensfun.cpp:16:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
[exec] 15 | #include "interpolation.h"
[exec] +++ |+#include <cstdint>
[exec] 16 |
[exec] make[2]: *** [../../../lightcrafts/mk/sources.mk:134: LC_lensfun.o] Error 1
[exec] make[1]: *** [../jni.mk:198: mk_target] Error 2
[exec] make: *** [../mk/recurse.mk:29: lensfun] Error 1
BUILD FAILED
/home/solarisfire/.cache/yay/lightzone/src/LightZone-4.2.4/linux/build.xml:37: The following error occurred while executing this line:
/home/solarisfire/.cache/yay/lightzone/src/LightZone-4.2.4/lightcrafts/build.xml:140: exec returned: 2
Total time: 24 seconds
==> ERROR: A failure occurred in build().
Aborting...
-> error making: lightzone-exit status 4
Same for lightzone-git:
[exec] -----> Entering lensfun
[exec] make --no-print-directory -j -C lensfun || exit 1
[exec] g++ -c -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -fPIC -march=athlon64 -msse2 -mfpmath=sse -O3 -fno-trapping-math -fomit-frame-pointer -std=c++14 -DJNILIB -g -fPIC -march=athlon64 -msse2 -mfpmath=sse -O3 -fno-trapping-math -fomit-frame-pointer -std=c++14 -DJNILIB -I/usr/lib/jvm/java-17-openjdk/include -I/usr/lib/jvm/java-17-openjdk/include/linux -I../../../lightcrafts -I../../../lightcrafts/jnisrc/jniutils -I/usr/include/lensfun -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 LC_lensfun.cpp
[exec] LC_lensfun.cpp: In function ‘jlong Java_com_lightcrafts_utils_Lensfun_init(JNIEnv*, jobject, jstring)’:
[exec] LC_lensfun.cpp:57:29: error: ‘uintptr_t’ does not name a type
[exec] 57 | return reinterpret_cast<uintptr_t>(lf);
[exec] | ^~~~~~~~~
[exec] LC_lensfun.cpp:16:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
[exec] 15 | #include "interpolation.h"
[exec] +++ |+#include <cstdint>
[exec] 16 |
[exec] make[2]: *** [../../../lightcrafts/mk/sources.mk:134: LC_lensfun.o] Error 1
[exec] make[1]: *** [../jni.mk:198: mk_target] Error 2
[exec] make: *** [../mk/recurse.mk:29: lensfun] Error 1
BUILD FAILED
/home/solarisfire/.cache/yay/lightzone-git/src/LightZone/linux/build.xml:37: The following error occurred while executing this line:
/home/solarisfire/.cache/yay/lightzone-git/src/LightZone/lightcrafts/build.xml:141: exec returned: 2
Total time: 20 seconds
==> ERROR: A failure occurred in build().
Aborting...
-> error making: lightzone-git-exit status 4
-> Failed to install the following packages. Manual intervention is required:
lightzone-git - exit status 4
Although guessing this may be an upstream lensfun issue?