Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ant compile-tests, is failing #2

Closed
ployt0 opened this issue Mar 1, 2017 · 10 comments
Closed

ant compile-tests, is failing #2

ployt0 opened this issue Mar 1, 2017 · 10 comments

Comments

@ployt0
Copy link

ployt0 commented Mar 1, 2017

On Linux Mint 17.3 I get the following every time I run "ant compile-tests". I've deleted the whole directory and started over once already.
[kotlinc] info: Kotlin Compiler version 1.1.0-rc-91
[kotlinc] /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/android/AndroidTypes.kt:20:15: error: unresolved reference: android
[kotlinc] val Surface = android.view.Surface::class.jobject
[kotlinc]

LWJGL built fine itself, but that was an additional step not outlined here.
Also I didn't have android branch locally and had to fetch using
"git checkout -t origin/android"

@Spasi
Copy link
Member

Spasi commented Mar 1, 2017

Thanks, fixed with LWJGL/lwjgl3@11a2e74.

@Spasi Spasi closed this as completed Mar 1, 2017
@ployt0
Copy link
Author

ployt0 commented Mar 2, 2017

I don't even have this repository cloned on my laptop after the first delete. I simply followed the instructions again, ensuring this time I had set ANDROID_SDK_HOME

  1. clone lwjgl3 and checkout the android branch.
  2. SET/export the ANDROID_SDK_HOME environment variable. Its value should be the root of the Android SDK. The Android NDK must also be installed under the root, in the default ndk-bundle subdirectory.
  3. Run ant compile-templates. This will take 1-2 minutes.

It makes no mention, ironically, of needing the repository it is the readme for, nor where I should put said repository.

I couldn't checkout android this time either, so had to create that branch from master/android, again, missing this repo entirely.

@Spasi
Copy link
Member

Spasi commented Mar 2, 2017

I'm not sure what problem you're having exactly.

This repository contains a simple android project, which depends on an android build of lwjgl3. There are no released builds of lwjgl3 for android, so that means you must build it manually.

You can clone and build lwjgl3 (by following the instructions) in any folder. You then copy <lwjgl3>/bin/android/lwjgl.aar to the /lwjgl/` folder. Then you can build the android project.

This process is not meant to be particularly easy, normally you'd just download lwjgl3 for android from the site or maven central. Please understand that this repository is a work-in-progress. If you simply want to try out the demos, you can download pre-built APKs from here.

@ployt0
Copy link
Author

ployt0 commented Mar 2, 2017

I've built lwjgl3, I then had to create the android branch from master/android because it was missing. As it stands I have no android folder in bin.

Perhaps you could verify this for me as I can't locate (again) the instructions other than those on the android-test github page which I quoted above.

This is the content of my lwjgl3 directory:

.    build.gradle  .directory  .gitignore         gradlew      libs        README.md
..   build.xml     doc         gradle             gradlew.bat  LICENSE.md  settings.gradle
bin  config        .git        gradle.properties  .idea        modules     update-dependencies.xml

And this the bin:

. .. Core Generator linux Templates Tests

If there are some other instructions, I'd be happy to follow them. Thank you.

@Spasi
Copy link
Member

Spasi commented Mar 3, 2017

I've built lwjgl3, I then had to create the android branch

This is backwards. You must first checkout the android branch and then build lwjgl3.

from master/android because it was missing.

I'm not sure how it can be missing, it's right here. This should work:

git clone https://github.com/LWJGL/lwjgl3.git
cd lwjgl3
git checkout android

Perhaps you could verify this for me as I can't locate (again) the instructions other than those on the android-test github page which I quoted above.

There are no other instructions. Running "ant compile-templates aar" should produce the android binaries. If you mean general instructions for lwjgl3, see doc/README and the wiki.

And this the bin:

. .. Core Generator linux Templates Tests

This means you did a standard Linux build, instead of an Android build. The only thing you need to do to enable the Android build is export ANDROID_SDK_HOME=<path/to/android/sdk>

If you're still having trouble, please post the build output.

@ployt0
Copy link
Author

ployt0 commented Mar 3, 2017

Hmm, when you say "here" it appears slightly different to the lwjgl I thought I needed, https://github.com/LWJGL/lwjgl3, and indeed had acquired by following your instructions:

git clone git@github.com:ployt0/lwjgl3.git
> git clone https://github.com/LWJGL/lwjgl3.git
cd lwjgl3
> git checkout android
git checkout -t origin/android

I do have some android folder, but they contain nothing more significant than view->Surface.java

If I knew where to find the build output I would have checked it, as the command line (used to) advised, here is the command line output:

ant compile-templates aar
Buildfile: /home/xxxxx/lwjgl3/build.xml

init:

check-dependencies:

-compile-generator:

bindings:

compile-templates:
[Templates] Compiling Kotlin templates. This will take 1-2 minutes...
[kotlinc] Compiling [/home/xxxxx/lwjgl3/modules/templates/src/main/android, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/assimp, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/bgfx, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/egl, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/glfw, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/nanovg, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/nuklear, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/openal, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/opencl, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/opengl, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/opengles, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/openvr, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/stb, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/vulkan, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/dyncall, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/jawt, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/jemalloc, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/jni, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/libc, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/android, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/linux, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/macosx, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/templates, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/windows, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/lmdb, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/nfd, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/par, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/simd, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/tinyexr, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/tinyfd, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/xxhash, /home/xxxxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/util/yoga] => [/home/xxxxx/lwjgl3/bin/Templates]
[kotlinc] info: Kotlin Compiler version 1.1.0-rc-91
[kotlinc] error: source file or directory not found: /home/xxxxx/lwjgl3/modules/templates/src/main/android

BUILD FAILED

@Spasi
Copy link
Member

Spasi commented Mar 3, 2017

Hmm, when you say "here" it appears slightly different to the lwjgl I thought I needed, https://github.com/LWJGL/lwjgl3, and indeed had acquired by following your instructions

It's the same repo. I just linked to the android branch.

I do have some android folder, but they contain nothing more significant than view->Surface.java

Then you haven't updated to the latest commit. It sounds like you're having trouble with git.

git clone git@github.com:ployt0/lwjgl3.git

My suggestion is: try a fresh clone of lwjgl3. Do not use your fork, unless you're sure how to properly keep it synchronized with the upstream repository. The android branch in your fork has not been updated with the latest changes.

@ployt0
Copy link
Author

ployt0 commented Mar 6, 2017

git clone https://github.com/LWJGL/lwjgl3.git
cd lwjgl3
git checkout android
ant compile-templates

works but doesn't give android folder in the root or bin directory.

so I try

ant compile-templates aar

and this is what I get:

[javac: Core] /home/xxxx/lwjgl3master/lwjgl3/modules/core/src/generated/java/org/lwjgl/system/android/ANativeWindow.java:65: error: cannot find symbol
[javac: Core] public static native long nANativeWindow_fromSurface(long __functionAddress, Surface surface);
[javac: Core] ^
[javac: Core] symbol: class Surface
[javac: Core] location: class ANativeWindow
[javac: Core] /home/xxxx/lwjgl3master/lwjgl3/modules/core/src/generated/java/org/lwjgl/system/android/ANativeWindow.java:67: error: cannot find symbol
[javac: Core] public static long ANativeWindow_fromSurface(Surface surface) {
[javac: Core] ^
[javac: Core] symbol: class Surface
[javac: Core] location: class ANativeWindow
[javac: Core] 3 errors

BUILD FAILED
/home/xxxx/lwjgl3master/lwjgl3/build.xml:370: Compile failed; see the compiler error output for details.

@Spasi
Copy link
Member

Spasi commented Mar 6, 2017

I can't reproduce it. Did you export ANDROID_SDK_HOME before running ant compile-templates aar?

@ployt0
Copy link
Author

ployt0 commented Mar 6, 2017

Yes, that is set.
I tried once more, this time integrating the "master" instructions:

  1. git clone git@github.com:ployt0/lwjgl3.git
  2. cd lwjgl3
  3. ant init
  4. git checkout android
  5. ant compile-templates

Whereupon it stops with

[kotlinc] info: Kotlin Compiler version 1.1.0-rc-91
[kotlinc] /home/xxx/lwjgl3/modules/templates/src/main/kotlin/org/lwjgl/system/android/AndroidTypes.kt:20:15: error: unresolved reference: android
[kotlinc] val Surface = android.view.Surface::class.jobject
[kotlinc] ^

BUILD FAILED
/home/xxx/lwjgl3/build.xml:215: Compile failed; see the compiler error output for details.

Which looks pretty much like my original issue, although now I'm back using my using my fork, since it is no worse than yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants