deezer / deezer/weslang

Error compiling (missing JNA?)

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
54
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Running the docker build, and erroring due to missing JNA?

```
Step 8 : RUN buck build //java/com/deezer/research/language:detection_app
---> Running in cd35101d10ea
Not using buckd because watchman isn't installed.
Atomic moves not supported, falling back to synchronous delete: java.nio.file.AtomicMoveNotSupportedException: /weslang/buck-out/gen -> /weslang/buck-out/.trash/d9166051-f230-477c-9f26-d256692feed5/gen: Invalid cross-device linkAtomic moves not supported, falling back to synchronous delete: java.nio.file.AtomicMoveNotSupportedException: /weslang/buck-out/bin -> /weslang/buck-out/.trash/d9166051-f230-477c-9f26-d256692feed5/bin: Invalid cross-device linkDisabling caching for target //third_party/java/language-detection-v2/src/com/cybozu/labs/langdetect:langdetect, because one or more input files are under a symbolic link ({third_party/java/language-detection-v2/src/com/cybozu/labs/langdetect/profiles=third_party/java/language-detection-v2/profiles}). This will severely impact performance! To resolve this, use separate rules and declare dependencies instead of using symbolic links.
[-] PARSING BUCK FILES...FINISHED 0.5s [100%] ? (Symlink caused cache invalidation)
/weslang/java/com/deezer/research/cld2/CLDHints.java:19: error: package com.sun.jna does not exist
import com.sun.jna.Pointer;
^
/weslang/java/com/deezer/research/cld2/CLDHints.java:20: error: package com.sun.jna does not exist
import com.sun.jna.Structure;
^
/weslang/java/com/deezer/research/cld2/CLDHints.java:28: error: cannot find symbol
public class CLDHints extends Structure {
^
symbol: class Structure
/weslang/java/com/deezer/research/cld2/CLDHints.java:53: error: cannot find symbol
public CLDHints(Pointer peer) {
^
symbol: class Pointer
location: class com.deezer.research.cld2.CLDHints
/weslang/java/com/deezer/research/cld2/Cld2Library.java:19: error: package com.sun.jna does not exist
import com.sun.jna.Library;
^
/weslang/java/com/deezer/research/cld2/Cld2Library.java:20: error: package com.sun.jna does not exist
import com.sun.jna.Native;
^
/weslang/java/com/deezer/research/cld2/Cld2Library.java:21: error: package com.sun.jna does not exist
import com.sun.jna.NativeLibrary;
^
/weslang/java/com/deezer/research/cld2/Cld2Library.java:22: error: package com.sun.jna.ptr does not exist
import com.sun.jna.ptr.PointerByReference;
^
/weslang/java/com/deezer/research/cld2/Cld2Library.java:35: error: cannot find symbol
interface Cld2Library extends Library {
^
symbol: class Library
/weslang/java/com/deezer/research/cld2/Cld2Library.java:37: error: cannot find symbol
NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(Cld2Library.JNA_LIBRARY_NAME);
^
symbol: class NativeLibrary
location: interface com.deezer.research.cld2.Cld2Library
/weslang/java/com/deezer/research/cld2/Cld2Library.java:55: error: cannot find symbol
PointerByReference resultchunkvector, int[] textBytes, boolean[] isReliable);
^
symbol: class PointerByReference
location: interface com.deezer.research.cld2.Cld2Library
/weslang/java/com/deezer/research/cld2/Cld2Library.java:37: error: cannot find symbol
NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(Cld2Library.JNA_LIBRARY_NAME);
^
symbol: variable NativeLibrary
location: interface com.deezer.research.cld2.Cld2Library
/weslang/java/com/deezer/research/cld2/Cld2Library.java:38: error: cannot find symbol
Cld2Library INSTANCE = (Cld2Library) Native.loadLibrary(Cld2Library.JNA_LIBRARY_NAME,
^
symbol: variable Native
location: interface com.deezer.research.cld2.Cld2Library
Errors: 13. Warnings: 0.

BUILT 1/23 JOBS 0.3s //java/com/deezer/research/language:manifest
BUILT 3/23 JOBS 1.0s //java/com/deezer/research/language:detection_service_interface
BUILT 4/23 JOBS 3.6s //third_party/java/guava:guava
BUILT 5/23 JOBS 2.5s //third_party/java/spring-boot:spring-boot
BUILT 6/23 JOBS 0.2s //third_party/java/language-detection-v2:jsonic-1.2.0-jar
BUILT 7/23 JOBS 11.8s //third_party/java/spring-boot:spring-boot-deps
BUILT 8/23 JOBS 4.9s //third_party/java/spring-boot:spring-boot-deps#abi
BUILD FAILED: //java/com/deezer/research/cld2:cld2 failed with exit code 1:
javac
[-] BUILDING...FINISHED 30.9s [100%]
The command '/bin/sh -c buck build //java/com/deezer/research/language:detection_app' returned a non-zero code: 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the Docker build command targeting //java/com/deezer/research/language:detection_app, then inspect the build configuration for //java/com/deezer/research/cld2 and the Java files CLDHints.java and Cld2Library.java. Confirm whether the JNA classes are available to that target and verify that the detection_app build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.