NetBeans OpenGL Pack building on FreeBSD

  6 posts   Feedicon  
Replies: 5 - Last Post: November 12, 2009 13:22
by: Michael Bien
showing 1 - 6 of 6
 
Posted: October 27, 2009 18:00 by Heiner Strauss
Hello,
how can I build the pack on FreeBSD ? So far I have added

<ns0:os folder='-natives-freebsd' regex='^(?i)freebsd'>
<ns0:cpu folder='-amd64' regex='^(?i)amd|x64|x86_64$'/>
<ns0:cpu folder='-i586' regex='^(?i)i?+[3-9|x]86$'/>
</ns0:os>

in the build files.
I don't know how to build gluegen1/gluegen-dist/gluegen-rt-webstart.zip and where to change jogl-project/nbproject/build-impl.xml to get the FreeBSD native libs.
Greetings,
Heiner
 
Posted: October 28, 2009 17:05 by Michael Bien
gluegen1 and jogl1 are only there for backwards compatibility with jogl 1.x projects created with older GLPack releases. You can ignore them for now.

(the jogl and gluegen modules already include a jogl2 beta distribution)

jogl-project/jogl-project/nbproject/build-jogl-template-impl.xml is responsible for initial project creation. I don't think you will have to change anything. The user is asked in the "new project dialog" on which platform he is. If he chooses linux it should already work.

"...where to change jogl-project/nbproject/build-impl.xml to get the FreeBSD native libs."

I don't understand this part Wink The GLPack project does not build jogl or any native libs.
 
Posted: October 28, 2009 20:07 by Heiner Strauss
Oh, I must have misunderstood something. When I start NetBeans I get:

net.java.nativelibsupport.LibDeploymentException: The jogl native libraries are either not available for this system (OS: FreeBSD CPU: i386) or an error accrued while deploying
at net.java.nativelibsupport.NativeLibSupport.deploy(NativeLibSupport.java:167)
Caused: net.java.nativelibsupport.LibDeploymentException: can not deploy jogl.all.jar natives
at net.java.nativelibsupport.NativeLibSupport.deploy(NativeLibSupport.java:177)
at net.java.nboglpack.jogl.Installer.restored(Installer.java:28)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:440)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:361)
at org.netbeans.ModuleManager.enable(ModuleManager.java:917)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:289)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:225)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
at org.netbeans.core.startup.Main.start(Main.java:309)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:111)
[catch] at java.lang.Thread.run(Thread.java:619)

My JOGL stuff is installed in /usr/local/jogl-2.0-freebsd-i586/lib. How do I tell NetBeans to use this path ? For standard java projects I can set the the JOGL libraries to that path and the examples are working as far the OpenGL DRI Radeon Driver is capable.
Update:
I can run build and run the NeHe Lesson1. But I have to remove the linux native libs manualy and set -Djava.library.path="/usr/local/jogl-2.0-freebsd-i586/lib:lib" for the project.

init:
Deleting: /home/heiner/NetBeansProjects/Lesson01/build/built-jar.properties
deps-jar:
Updating property file: /home/heiner/NetBeansProjects/Lesson01/build/built-jar.properties
compile-single:
run-single:
libGL: XF86DRIGetClientDriverName: 5.3.0 r200 (screen 0)
libGL: OpenDriver: trying /usr/local/lib/dri/r200_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 16, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 16, (OK)
drmOpenByBusid: drmOpenMinor returns 16
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /home/heiner/.drirc: No such file or directory.
BUILD SUCCESSFUL (total time: 35 seconds)

Basicly it works but the pack wants always to use the evil linux libs Smile I have found the platform selection code, but I don't know how to construct the jar with FreeBSD libs.
 
Posted: October 28, 2009 22:58 by Michael Bien
the functionality to use a pre installed jogl distribution does not exit, sorry.

The pack creates self contained - os independent JOGL2 projects (they have even no dependency to the GLPack itself once they are created). All jogl files are copied into the project folder.

The exception you posted happenes because the JOGL module tries to deploy JOGL in a way that other NetBeans modules (like the GLSL compiler) can use jogl within NetBeans. (the configuration files for this step are the xml files with the regexp. you already edited)


I probably already said that but having jogl in your system path could cause a lot of trouble (not working webstart... etc) Wink
 
Posted: November 12, 2009 11:03 by Heiner Strauss
It's almost working now. In the "GL example project" setup I can choose freebsd now. I think the template needs freebsd natives in the webstart file. Is there a way to build a new webstart.zip ? Or did I misunderstood the setup ?

initProject:
Created dir: /home/heiner/NetBeansProjects/Lesson02/tmp
Expanding: /home/heiner/.netbeans/6.8m2/jogl-project/Nehe-Source.zip into /home/heiner/NetBeansProjects/Lesson02/tmp
Created dir: /home/heiner/NetBeansProjects/Lesson02/src/demos/nehe/lesson02
Moving 1 file to /home/heiner/NetBeansProjects/Lesson02/src/demos/nehe/lesson02
Deleting directory /home/heiner/NetBeansProjects/Lesson02/tmp
addDeps:
Created dir: /home/heiner/NetBeansProjects/Lesson02/tmp
Expanding: /home/heiner/.netbeans/6.8m2/jogl-project/Nehe-Source.zip into /home/heiner/NetBeansProjects/Lesson02/tmp
Moving 1 file to /home/heiner/NetBeansProjects/Lesson02/src/demos/nehe/lesson02
Deleting directory /home/heiner/NetBeansProjects/Lesson02/tmp
Expanding: /home/heiner/.netbeans/6.8m2/jogl-project/Nehe-Source.zip into /home/heiner/NetBeansProjects/Lesson02/tmp
Moving 7 files to /home/heiner/NetBeansProjects/Lesson02/src
Deleting directory /home/heiner/NetBeansProjects/Lesson02/tmp
Copying 4 files to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
Copying 1 file to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
Copying 1 file to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
Copying 1 file to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
Copying 1 file to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
Copying 1 file to /home/heiner/NetBeansProjects/Lesson02/jogl-dist
jogl-template-impl.jogl-template-deploy-jogl:
Deploying JOGL
Expanding: /home/heiner/NetBeansProjects/Lesson02/jogl-dist/jogl-2.0-webstart.zip into /home/heiner/NetBeansProjects/Lesson02/lib
Expanding: /home/heiner/NetBeansProjects/Lesson02/lib/jogl-natives-freebsd-i586.jar into /home/heiner/NetBeansProjects/Lesson02/lib
/home/heiner/.netbeans/6.8m2/jogl-project/initJoglProject.xml:85: The following error occurred while executing this line:
/home/heiner/NetBeansProjects/Lesson02/nbproject/build-jogl-template-impl.xml:173: Error while expanding /home/heiner/NetBeansProjects/Lesson02/lib/jogl-natives-freebsd-i586.jar
java.io.FileNotFoundException: /home/heiner/NetBeansProjects/Lesson02/lib/jogl-natives-freebsd-i586.jar (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:150)
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:137)
at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:107)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
BUILD FAILED (total time: 5 seconds)
 
Posted: November 12, 2009 13:22 by Michael Bien
the jogl 2 webstart zip files are provided by the jogl project itself:
http://download.java.net/media/jogl/builds/archive/jsr-231-2.0-beta10/

the jogl 2 lib wrapper have three zip files
jogl-2.0-webstart.zip
nativewindow-2.0-webstart.zip
newt-2.0-webstart.zip

same for gluegen:
gluegen-rt-webstart.zip

jogl is currently moving (http://www.javagaming.org/index.php/topic,21516.0.html) it could take one or two weeks until the automatic builds are up and running again.

to check if its working you could simple update the zip archives manually and place a freebsd distribution (renamed linux dist) into each.

hope that helps and thank you for the efforts.
showing 1 - 6 of 6
Replies: 5 - Last Post: November 12, 2009 13:22
by: Michael Bien
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close