Open Spasi opened 6 years ago
Glad I finally checked the issue tracker... I thought it was just me.
I've been playing around with it a bit to see if I can fix the build path issues, but I seem to be missing a libs/testng.jar, which I'm assuming is where the org.testing.* package is coming from and why most of the modules/lwjgl/core/src/test/java/ classes are broken.
The other thing that's showing up broken for me is the @Nullable
annotation. I'm not sure where that's linked from. Eclipse is telling me to import the com.sun.istack.internal package, but something tells me that's not right and the annotation is defined in one of the other source folders that was refactored.
Lots of other missing and broken imports as well, it'll take me some time to track them all down. I tried to run the build.xml with ant from the root, but it craps out on me when it gets to building the config/linux/build.xml
unfortunately Ant and Gradle are foreign territory for me so I'm not sure how to debug them.
You should first do a successful Ant build before attempting to setup the Eclipse project.
bin
folder to the path.JAVA_HOME
to a version 8+ JDK.ant compile-templates compile-tests
in lwjgl3's root directory.ant tests
if there's a working C/C++ compiler available. (optional)This will download all dependencies and build the project.
ant compile-templates compile-tests
completed successfully
ant test
failed in the same place in the linux build as it did before. I think it might be related to the
BUILD FAILED /home/pram/development/eclipse/lwjgl3/build.xml:442: The following error occurred while executing this line: /home/pram/development/eclipse/lwjgl3/config/linux/build.xml:197: The following error occurred while executing this line: /home/pram/development/eclipse/lwjgl3/config/linux/build.xml:201: exec returned: 1 The following error occurred while executing this line: /home/pram/development/eclipse/lwjgl3/config/linux/build.xml:83: The following error occurred while executing this line: /home/pram/development/eclipse/lwjgl3/config/linux/build.xml:33: apply returned: 1
I did get things working, but probably not in the way you'd like. I added a pom.xml file and used Maven to gather the missing libraries.
It mainly grabs the TestNG testing.jar file and points to the missing resource jars jsr305-3.0.5.jar (for the missing nullable, and a couple other, annotations.)
The one thing that gave me problems is the com.sun.javadoc.* package. I had to manually add the tools.jar from my /usr/lib/jvm/jdk1.8.0_121_64/lib/ directory. Apparently that's a common issue.
ant test failed in the same place in the linux build as it did before.
Looks like you're missing libgtk-3-dev
.
I did get things working, but probably not in the way you'd like. I added a pom.xml file and used Maven to gather the missing libraries.
If ant compile-templates compile-tests
was successful, then you should already have the necessary libraries in bin/libs/java/
.
The one thing that gave me problems is the com.sun.javadoc.* package. I had to manually add the tools.jar
Correct, this needs to be set up in the IDE project using tools.jar from the JDK. There's a related issue: #349
I finally went back and cleaned up my linux system. (I really need to spend more time on keeping things up-to-date.)
I got libgtk-3-dev
but when I run ant tests
I still get an error
[gcc] Linking lwjgl_opengl
[g++] Linking lwjgl_tootle
BUILD FAILED
~/development/eclipse/lwjgl3/build.xml:442: The following error occurred while executing this line:
~/development/eclipse/lwjgl3/config/linux/build.xml:237: The following error occurred while executing this line:
~/development/eclipse/lwjgl3/config/linux/build.xml:83: The following error occurred while executing this line:
~/development/eclipse/lwjgl3/config/linux/build.xml:33: apply returned: 1
which seems to be this section of the config/linux/build.xml
<sequential>
<local name="cpp"/>
<condition property="cpp"><not><equals arg1="@{lang}" arg2="c"/></not></condition>
<local name="gcc"/>
<condition property="gcc" value="gcc" else="g++"><equals arg1="@{lang}" arg2="c"/></condition>
<mkdir dir="@{dest}"/>
This line--> <apply dir="@{dest}" executable="${gcc}" dest="@{dest}" skipemptyfilesets="true" failonerror="true" parallel="true" taskname="Compiler">
<arg line="-c -std=c11" unless:set="cpp"/>
<arg line="-c -std=c++11" if:set="cpp"/>
<arg line="-m64" if:true="${build.arch.x64}"/>
<arg line="-m32 -mfpmath=sse -msse -msse2" unless:true="${build.arch.x64}"/>
<arg line="-O3 @{lto} -fPIC @{flags} -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_GNU_SOURCE -DNDEBUG -DLWJGL_LINUX -DLWJGL_${build.arch}"/>
<arg value="-I${jni.headers}"/>
<arg value="-I${jni.headers}/linux"/>
<arg value="-I${module.lwjgl.rel}/core/src/main/c"/>
<arg value="-I${module.lwjgl.rel}/core/src/main/c/${platform}"/>
<arg value="-I${src.main.rel}" if:true="@{simple}"/>
<source/>
<fileset dir="." includes="${src.generated}/*.c" if:true="@{simple}"/>
<regexpmapper from="(\w+)\.c(?:c|pp)?$" to="\1.o"/>
</apply>
</sequential>
Looks like it's failing at remotery now (build.xml:237
). Try installing xorg-dev
.
For reference, here's how the official binaries are built.
It wasn't xorg-dev, but that was helpful. I was on gcc and g++ 5, I updated to gcc and g++ 6 and it's compiling properly now.
demo/FiraSans.ttf
is missing. I got a copy of fire-sans.regular.ttf here and renamed it and it worked fine. I could add that to the git repo.
also missing demo/Phero.ogg
They are not missing. Assets are downloaded automatically when you run the demo
target, to avoid bloating the repository. For example:
ant demo -Dclass=org.lwjgl.demo.stb.Vorbis
Which source folders should appear in Eclipse ? From the netbeans project file, I can see :
Anything else ?
I see that the core project contains 3 src/java folder:
These folder redefine some classes (e.g. CheckIntrinsics.java). I'm not sure if I can put all of them in the project.
The simpler way to get a clear picture is to examine the IntelliJ project setup. It's not complicated, but it is verbose, every binding is a separate IntelliJ "module". See modules.xml to get a sense of the high level organization. Each module is configured as you would expect, with its own source/test/resource folders and its own class output path.
The modules/lwjgl/core/src/main/java10
for example belongs to the lwjgl.core10 module. It depends on lwjgl.core
and lwjgl.core9
and is configured to be built with a JDK 10, while the rest of the project uses JDK 8 (and lwjgl.core9
uses JDK 9). This is necessary to support the multi-release JAR file functionality and works nicely in IntelliJ. I'm not sure how other IDEs handle it, but if no clean solution exists, you could simply ignore those folders.
Seriously? Like others before me, it took me ages. And like others I finally checked the issue tracker.
If no one wants to fix this, then at least remove eclipse AND maven from the documentation etc...
Very, very bad impression from this project.
As of 00e1f52cf95c16b0cea34c83372145532b4745ba the LWJGL codebase has a new directory layout. This has broken the included Eclipse project.