You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE: Okay, I am seeing this issue is not getting picked up. Probably because it needs to be reformulated. The original message will be available under the tearline.
My project depends on LWJGL and it involves working with the LWJGL native libraries. I have found that Leiningen is searching for the native libs in the project/target/native/windows/x86_64 directory. However, in reality the native libs get extracted into project/target/native/windows. If I manually copy the dlls from the latter to the former, then the project, launched with Leiningen can see the dlls and use them.
Apparently this is an issue in how Leiningen manages the paths and needs to be corrected.
Below is a link to an example project. The issue was successfully reproduced on Windows and Mac. Please also read the reproduction instruction because it describes precise steps of reproducing the problem. How the problem manifests itself depends on the sequence of actions taken.
See how Leiningen fails to find the dlls it extracts.
remove the target and bin directories
lein clean
add :native-path "target/native/native/windows" to the project.clj
lein repl
(require 'test-natives.core)
It fails to find the dep
If you go to the target dir, there's a strange thing. The dlls are lying in this actual location: target\native\native\windows\native\windows\..this looks very wrong...
_II. The original guilt of the :native-path_
This will prove that the :native-path parameter does not behave correctly:
manually remove the target and bin directories
lein clean
lein repl
exit lein repl back to command line
add :native-path "target/native/native/windows" to the project.clj
lein repl
(require 'test-natives.core)
It works.
Somehow specifying :natives-path before the first creation of target wreaks havoc on the directory structure.
_III. The Final Disclosure_
How to understand what is going on:
manually remove the target and bin directories
lein clean
add :native-path "target/native/a/b/c/d/native/windows" to the project.clj
lein repl
(require 'test-natives.core) fail!
exit lein repl back to command line
examine the directory structure and find dlls at target\native\a\b\c\d\native\windows\native\windows\ - the actual path differs from the one specified in project.clj by having an additional \native\windows\ at the end. alright.
change :native-path "target/native/a/b/c/d/native/windows" to :native-path "target/native/a/b/c/d/native/windows/native/windows" the project.clj
lein repl
(require 'test-natives.core)
It works
Obviously this is a bug in Leiningen. It treats the :native-paths parameter differently in cases of the first and subsequent runs.
-------------- tearline --------------
Working with LWJGL in Leiningen, I have stepped into some strange errors on about how Leiningen works with native libraries paths. As I work through CounterClockWise, I first reported the problem to its issue tracker, but after some research it became evident that the problem is of Leiningen origin.
As the description of the problem is rather extensive, I think I won't copy-paste it here and instead provide the description via link to the CCW issue.
Alright, this is inconsistent because the native path is not cleaned up if :native-path has been changed. Neither does it clean up if the native dependencies themselves change. I'm working on a fix for this, which should be provided with 2.6.0.
It seems like the native paths themselves works as intended for native dependencies (mostly because of what's discussed over at #898 (comment)), but as outlined in https://github.com/rogerallen/hello_lwjgl it seems like lwjgl has a very strange packaging format that cannot be extracted by Leiningen itself.
UPDATE: Okay, I am seeing this issue is not getting picked up. Probably because it needs to be reformulated. The original message will be available under the tearline.
My project depends on LWJGL and it involves working with the LWJGL native libraries. I have found that Leiningen is searching for the native libs in the
project/target/native/windows/x86_64
directory. However, in reality the native libs get extracted intoproject/target/native/windows
. If I manually copy thedll
s from the latter to the former, then the project, launched with Leiningen can see thedll
s and use them.Apparently this is an issue in how Leiningen manages the paths and needs to be corrected.
Below is a link to an example project. The issue was successfully reproduced on Windows and Mac. Please also read the reproduction instruction because it describes precise steps of reproducing the problem. How the problem manifests itself depends on the sequence of actions taken.
REPRODUCTION INSTRUCTION
_I. The Original Failure_
See how Leiningen fails to find the
dll
s it extracts.target
andbin
directorieslein clean
:native-path "target/native/native/windows"
to theproject.clj
lein repl
(require 'test-natives.core)
If you go to the target dir, there's a strange thing. The dlls are lying in this actual location:
target\native\native\windows\native\windows\
..this looks very wrong..._II. The original guilt of the
:native-path
_This will prove that the
:native-path
parameter does not behave correctly:target
andbin
directorieslein clean
lein repl
:native-path "target/native/native/windows"
to theproject.clj
lein repl
(require 'test-natives.core)
Somehow specifying
:natives-path
before the first creation oftarget
wreaks havoc on the directory structure._III. The Final Disclosure_
How to understand what is going on:
target
andbin
directorieslein clean
:native-path "target/native/a/b/c/d/native/windows"
to theproject.clj
lein repl
(require 'test-natives.core)
fail!target\native\a\b\c\d\native\windows\native\windows\
- the actual path differs from the one specified inproject.clj
by having an additional\native\windows\
at the end. alright.:native-path "target/native/a/b/c/d/native/windows"
to:native-path "target/native/a/b/c/d/native/windows/native/windows"
theproject.clj
lein repl
(require 'test-natives.core)
Obviously this is a bug in Leiningen. It treats the
:native-paths
parameter differently in cases of the first and subsequent runs.-------------- tearline --------------
Working with LWJGL in Leiningen, I have stepped into some strange errors on about how Leiningen works with native libraries paths. As I work through CounterClockWise, I first reported the problem to its issue tracker, but after some research it became evident that the problem is of Leiningen origin.
As the description of the problem is rather extensive, I think I won't copy-paste it here and instead provide the description via link to the CCW issue.
The text was updated successfully, but these errors were encountered: