51 posts / 0 new
Last post
ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Hey all,
I am trying to get an updated port for K-3D on FreeBSD 8.
Since the K-3D maybe don't manage this but someone at FreeBSD should, I started a thread on the FreeBSD forums.
http://forums.freebsd.org/showthread.php?p=63896
Lets see what happens.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

As a "heads up", quite a lot has changed in the build - in particular, we've switched to CMake as our build system.
Regardless, we're happy to help you or anyone else downstream.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Thanks. I spent some time on your wiki trying to figure out how to compile.
I am looking at K-3D and Blender and so far I like K-3D better, but in order to recommend it on my blog's FreeBSD Friday section, I got to be able to get the latest version to work. The blender interface is so NOT intuitive.
Your tutorials as text information and then the mouse moves for you and shows you what to do and actually does it in a way you can save the file (not just a video) is just awesome and I believe that this sets you apart. I have tried to follow tutorials at Blender (which are basically links to other poeples blogs who have written the tutorial and none are successful so far.
Anyway, I am willing to do some work to get this working on FreeBSD. So far I have not had success compiling the latest version.
I have a FreeBSD desktop as described here:
How to install and configure a FreeBSD 8 Desktop with Xorg and KDE?
http://rhyous.com/2009/12/18/how-to-install-and-configure-a-freebsd-8-de...
Now, with that, I went to ports and installed k3d.
# cd /usr/ports/graphics/k3d
# make install
This worked, however, it was a way old version.
So I uninstalled it. Then I updated the port's Makefile to pull the new version and it did download the newest version and then it failed.
So then I started following the K-3D wiki, particularly this page:
http://www.k-3d.org/wiki/CMake_Build
I decided to see if this would compile on FreeBSD without ports, but just in a folder under my users directory as the wiki mentions.
I had to install cmake (as that is not installed by default on FreeBSD 8).
# cd /usr/ports/devel/cmake
# make install
I also had to install mercurial to pull down the source.
# cd /usr/ports/devel/mercurial
# make install
Now I was able to follow the steps:
$ cd ~
$ hg clone http://k3d.hg.sf.net/hgweb/k3d/k3d
...wait for code to download.
$ mkdir k3d-build
$ cd k3d-build
$ cmake ../k3d
This failed because it said that uuid was not installed. So I installed it.
# cd cd /usr/ports/misc/ossp-uuid
# make install
Then I tried again.
$ cd ~
$ cd kd3-build
$ cmake ../k3d
...waited and this time it finished.
$ make
The building appeared as if it were going to work but it didn't. It failed at 14%. Here is the error message.
[ 14%] Building CXX object k3dsdk/CMakeFiles/k3dsdk.dir/uuid.cpp.o
/root/k3d/k3dsdk/uuid.cpp:32:24: error: uuid/uuid.h: No such file or directory
/root/k3d/k3dsdk/uuid.cpp: In static member function 'static const k3d::uuid k3d::uuid::random()':
/root/k3d/k3dsdk/uuid.cpp:71: error: 'uuid_t' was not declared in this scope
/root/k3d/k3dsdk/uuid.cpp:71: error: expected `;' before 'temp'
/root/k3d/k3dsdk/uuid.cpp:72: error: 'temp' was not declared in this scope
/root/k3d/k3dsdk/uuid.cpp:72: error: 'uuid_generate' was not declared in this scope
*** Error code 1
Stop in /root/k3d-build.
*** Error code 1
Stop in /root/k3d-build.
*** Error code 1
Stop in /root/k3d-build.
So I look at the error and sure enough, it is correct. uuid/uuid.h doesn't exist.
So right now I am researching where uuid.h is on FreeBSD and seeing if I need a patch.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I don't know if this is true of FreeBSD, but on many Linux distros the header (.h) files are in separate packages (usually called "dev" packages or similar) from the libraries. So it's possible that you just need to install an additional port.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Thanks, that actually helped. I had installed ossp-uuid so I was not longer verifying that the right libraries were installed, but instead I was assuming there was some difference that FreeBSD had.
However, your comment made me doublecheck the uuid library and with research I found a second library for uuid other than ossp-uuid. It is the e2fsprogs-libuuid.
So I uninstalled ossp-uuid.
# cd /usr/ports/misc/ossp-uuid
# make deinstall
Then I installed e2fsprogs-libuuid.
# cd /usr/ports/misc/e2fsprogs-libuuid
# make install
Now my build is not failing at 14% anymore with that error. So far it is running smoothly at 21%.
Hope there are no more errors.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I went to bed while it was compiling and to my disappointment,
In file included from /home/jared/Devel/k3d/modules/inotify/file_change_notifier.cpp:25:
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h: In constructor 'InotifyEvent::InotifyEvent(const inotify_event*, InotifyWatch*)':
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:244: error: invalid use of incomplete type 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:239: error: forward declaration of 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:245: error: invalid use of incomplete type 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:239: error: forward declaration of 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:246: error: invalid use of incomplete type 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:239: error: forward declaration of 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:247: error: invalid use of incomplete type 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:239: error: forward declaration of 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:248: error: invalid use of incomplete type 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:239: error: forward declaration of 'const struct inotify_event'
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h: At global scope:
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:873: error: invalid application of 'sizeof' to incomplete type 'inotify_event'
/home/jared/Devel/k3d/modules/inotify/file_change_notifier.cpp: In member function 'virtual k3d::uint_t module::inotify::file_change_notifier::watch_file(const k3d::filesystem::path&, const sigc::slot&)':
/home/jared/Devel/k3d/modules/inotify/file_change_notifier.cpp:80: error: 'IN_CLOSE_WRITE' was not declared in this scope
*** Error code 1
Stop in /usr/home/jared/Devel/k3d-build.
*** Error code 1
Stop in /usr/home/jared/Devel/k3d-build.
*** Error code 1
Stop in /usr/home/jared/Devel/k3d-build.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

[ 47%] Building CXX object modules/inotify/CMakeFiles/k3d-inotify.dir/file_change_notifier.cpp.o
In file included from /home/jared/Devel/k3d/modules/inotify/file_change_notifier.cpp:25:
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:32:25: error: sys/inotify.h: No such file or directory
/home/jared/Devel/k3d/modules/inotify/inotify-cxx.h:36:34: error: sys/inotify-syscalls.h: No such file or directory
Forgot to include the lines above (they located above the error message in my last post).
Anyway, FreeBSD and MAC OSX supposedly do not have the library at all but have a different solution. They use kqueue and kevent. However, I am still reasearching. So if this is true that neither FreeBSD or MAC OSX have inotify, then since this compiles on MAC, there must be a way to compile on FreeBSD as well.
I will just keep researching but if someone could verify if the MAC OSX build uses inotify or not, or if there is a build parameter that I can use to not use inotify that would be beneficial.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I am passed this second problem, by setting K3D_BUILD_INOTIFY_MODULE to OFF.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Well, it compiled 100%. But now it doesn't run.
I am going to run through the process again clean now that I know how to compile.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

The logic to decide whether to enable K3D_BUILD_INOTIFY_MODULE by default was naive, I've updated it so that it should handle FreeBSD correctly in the future.
I wouldn't expect a rebuild to fix a runtime issue. Post the details of how you ran the program and what went wrong and we'll take a look.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Thanks for fixing that.
I did rebuild it all and as you stated the error is the same.
$ make run
Scanning dependencies of target run
INFO: package: k3d
INFO: version: 0.7.12.0
INFO: platform: FreeBSD-8.0-RELEASE-p2;amd64
INFO: compiler: 4.2.1 20070719 [FreeBSD]
INFO: build time: Jan 26 2010 18:14:16 local
INFO: xml parser: expat
INFO: options file: /home/jared/.k3d/options.k3d
INFO: plugin path(s): /home/jared/k3d-build/lib/k3d/plugins
INFO: shader cache path: /home/jared/.k3d/shadercache
INFO: share path: /home/jared/k3d/share
INFO: user interface: /home/jared/k3d-build/lib/k3d/plugins/k3d-ngui.module
INFO: home directory: /home/jared
INFO: temp directory: /tmp
INFO: locale path: /home/jared/k3d-build/po
INFO: Loading options from /home/jared/.k3d/options.k3d
ERROR: Exception loading options: no element found line: 1 column: 0
WARNING: Resetting options data to version 4
INFO: Loading plugin module /home/jared/k3d-build/lib/k3d/plugins/k3d-ngui.module
INFO: Loading plugin NGUI
INFO: Saving hotkeys to /home/jared/.k3d/hotkeys
ERROR: Gtk: g_hash_table_slist_values: assertion
`
hash_table != NULL' failed
INFO: Saving options to /home/jared/.k3d/options.k3d
CRITICAL: Caught exception [std::runtime_error] - UI plugin module [/home/jared/k3d-build/lib/k3d/plugins/k3d-ngui.module] does not implement k3d::iuser_interface
*** Error code 1
Stop in /usr/home/jared/k3d-build.
*** Error code 1
Stop in /usr/home/jared/k3d-build.
*** Error code 1
Stop in /usr/home/jared/k3d-build.
*** Error code 1
Stop in /usr/home/jared/k3d-build.
$

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8
ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

So, this is a pretty strange error ... without getting into too much detail, K-3D divides most of its functionality into plugins, which are separate shared libraries. K-3D loads these plugins at runtime, then uses the dynamic_cast feature in C++ to discover information about those plugins. This error suggests that the user interface plugin isn't derived from the k3d::iuser_interface base class, which is obviously not true ... so it seems as if there's something strange going on with dynamic linking on FreeBSD. I'm sure it can be made to work (it's not that different from what Apache does), there's probably just some compiler or linker flag that needs to get set.
You might want to try and track down someone who is familiar with dynamic linking on FreeBSD. This is intriguing enough that I'm trying to setup FreeBSD in a virtual machine, which is not me committing to find a solution, but I'll be interested to see if I can reproduce the problem ;)
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Thanks. I am in this until we figure it out. Like I said, I am coming at this from both ways, and I have post here and on the FreeBSD forums here: http://forums.freebsd.org/showthread.php?p=63896
If you have any problems setting up a FreeBSD desktop, I am here to help.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Well, for what it's worth I've gotten to the point where I can reproduce this. Probably gonna sleep on it for awhile, and/or develop a minimal test case that you could shop-around to experts ...
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Timothy,
Thanks for duplicating it. Let me provide you with an update of what I have done:
See the update at my same blog post:
How to compile and install K-3D 0.7.12 on FreeBSD 8?
http://rhyous.com/2010/01/26/how-to-compile-and-install-k-3d-0-7-12-on-f...
Well, lets past it here as well:
UPDATE: 2/2/2010
Ok, so I am back. Here is the what I have done.
Step 5 - Fixing run errors

Compiled with debugging. I ran ccmake ~/k3d again and this time I set the CMAKE_BUILD_TYPE to Debug before choosing to configure. Once configure was done, I ran make again.

Grepped for the error in the code. Specifically, this term:
$ grep -Rn k3d::iuser_interface ~/k3d/*
I found the problem code was in this file and line number:
File: /home/jared/k3d/application/k3d_main.cpp
line: 460

Went to the problematic code and investigated it. It seems to be a simple check, so I commented that block of code out so it would continue:
[sourcecode language="cpp"]
// if(!dynamic_cast(g_user_interface))
// {
// delete g_user_interface;
// g_user_interface = 0;
// handle_error("UI plugin module [" + module_name + "] does not impleme
// return;
// }
[/sourcecode]

I recompiled (everything remained compiled except the one part with the file I changed so compiling was quick).

I launched make run again:
# make run
This time, as I had hoped, it loaded the application completely.
However, I noticed some errors.
The first two error lines occurred early in the load process. I am not sure but they seem to be unrelated:
INFO: Gtk: Failed to load module "atk-bridge": Shared object "libatk-bridge.so" not found, required by "k3d"
:1: error: unexpected character \241', expected keyword - e.g.style'
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_point_painter.cpp line 73: assertion `delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSPointPainter
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_edge_painter.cpp line 73: assertion `delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSEdgePainter
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_face_painter.cpp line 73: assertion `delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSFacePainter

I searched the ports tree for the libatk-bridge.so file.
# /usr/ports
# grep -R libatk-bridge *
It looks like there is a at-spi package that provides this library.

Install the at-spi package
# cd /usr/ports/accessibility/at-spi
# make install

Tried to make run again.
# exit
$ cd ~/k3d-build
$ make run
The application loaded and the libatk-bridge error was gone but it was replaced with a warning:
(k3d:55092): atk-bridge-WARNING **: AT_SPI_REGISTRY was not started at session startup.
(k3d:55092): atk-bridge-WARNING **: IOR not set.
(k3d:55092): atk-bridge-WARNING **: Could not locate registry

Ok, so now that it is running, I think it is time to submit bugs to K-3d for the remaining errors.

As of right now, I don't think it is worth the effort to create a port of version 7.11 as it has bugs for FreeBSD. I feel comfortable that when the next revision of K-3D comes out, version 8.x, the code will work well and we will create a port for it.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

So as I said, since it is running, but there are a few error, I think I have done enough investigating that the K-3D team can duplicate and debug if I submit bugs.
I think there are four bugs to submit:
Bug #1 - A check in k3d_main.cpp fails on FreeBSD 8.
ERROR: Gtk: g_hash_table_slist_values: assertion
hash_table != NULL' failed
INFO: Saving options to /home/jared/.k3d/options.k3d
CRITICAL: Caught exception [std::runtime_error] - UI plugin module [/home/jared/k3d-build/lib/k3d/plugins/k3d-ngui.module] does not implement k3d::iuser_interface
*** Error code 1

Bug # 2 - Running K-3D on FreeBSD provides warnings about atk-bridge

(k3d:55092): atk-bridge-WARNING **: AT_SPI_REGISTRY was not started at session startup.

(k3d:55092): atk-bridge-WARNING **: IOR not set.

(k3d:55092): atk-bridge-WARNING **: Could not locate registry

Bug #3 - An unexpected character error
:1: error: unexpected character \241', expected keyword - e.g.style'

Bug #4 - Problem loading the VirtualOpenGLSDSFacePainter plugin on FreeBSD
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_point_painter.cpp line 73: assertion
delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSPointPainter
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_edge_painter.cpp line 73: assertion `delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSEdgePainter
ERROR: /home/jared/k3d/modules/virtual_opengl_painters/sds_face_painter.cpp line 73: assertion `delegate' failed
ERROR: Error creating document plugin: VirtualOpenGLSDSFacePainter
So I guess I will get to submitting them.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Ok, so I cannot find on the site where to submit a bug...I find the bug tracker but not a place to submit a bug.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

The tracker is read-only on purpose, you can read about why here. I've recorded these issues in the tracker. In general, they're all harmless except #1. If this one dynamic_cast fails, I'd expect lots of other to fail, too ... are you able to use the application at all?
Cheers,

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Yeah, only sort of works. It loads and if I try to do the example mug script, I can't because I cannot select the top face, though I can select squares on the side of the cylinder.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I'm in the process of rebuilding my FreeBSD VM (long story), in the meantime, I've added a test application that should exercise the same bug. Grab the latest sources, rebuild with K3D_ENABLE_TESTING "ON", and try running the test from your build directory:
$ ctest -V -R shared-dynamic-cast
... and see what you get. Assuming that it fails, it will provide a minimal use-case for experimenting / getting expert help.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Thanks for taking the time to do that. That was painless enough to do.
[jared@FBSD8 ~/build-k3d]$ ctest -V -R shared-dynamic-cast
UpdateCTestConfiguration from :/home/jared/build-k3d/DartConfiguration.tcl
Parse Config file:/home/jared/build-k3d/DartConfiguration.tcl
Add coverage exclude regular expressions.
UpdateCTestConfiguration from :/home/jared/build-k3d/DartConfiguration.tcl
Parse Config file:/home/jared/build-k3d/DartConfiguration.tcl
Test project /home/jared/build-k3d
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 23
Start 23: k3dsdk.shared-dynamic-cast
23: Test command: /home/jared/build-k3d/bin/test-shared-dynamic-cast
23: Test timeout computed to be: 1500
23: Exception: Dynamic casting failed.
1/1 Test #23: k3dsdk.shared-dynamic-cast .......***Failed 0.00 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 1.00 sec
The following tests FAILED:
23 - k3dsdk.shared-dynamic-cast (Failed)
Errors while running CTest
[jared@FBSD8 ~/build-k3d]$

I realized that I didn't build with debugging when I made this, should I redo it with
debugging?

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I guess it is the same output exactly whether I built with Debug enabled or not.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

OK, got my FreeBSD VM going again, and after reproducing the error using the test, I believe I have a fix. If you update your sources, rebuild, and re-run the test it should be working for you now. I'm going to test that it doesn't cause problems on other platforms, then assuming it doesn't I'll apply it to the main application.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Hey,
That fixed the test, but the same issue trying to launch the app.

[jared@FBSD8 ~/build-k3d]$ ctest -V -R shared-dynamic-cast
UpdateCTestConfiguration from :/home/jared/build-k3d/DartConfiguration.tcl
Parse Config file:/home/jared/build-k3d/DartConfiguration.tcl
Add coverage exclude regular expressions.
UpdateCTestConfiguration from :/home/jared/build-k3d/DartConfiguration.tcl
Parse Config file:/home/jared/build-k3d/DartConfiguration.tcl
Test project /home/jared/build-k3d
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 23
Start 23: k3dsdk.shared-dynamic-cast
23: Test command: /home/jared/build-k3d/bin/test-shared-dynamic-cast
23: Test timeout computed to be: 1500
23: Success!
1/1 Test #23: k3dsdk.shared-dynamic-cast ....... Passed 1.00 sec
The following tests passed:
k3dsdk.shared-dynamic-cast
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 2.00 sec
[jared@FBSD8 ~/build-k3d]$ make run
Scanning dependencies of target run
INFO: package: k3d
INFO: version: 0.7.12.0
INFO: platform: FreeBSD-8.0-RELEASE-p2;amd64
INFO: compiler: 4.2.1 20070719 [FreeBSD]
INFO: build time: Feb 3 2010 21:29:45 local
INFO: xml parser: expat
INFO: options file: /home/jared/.k3d/options.k3d
INFO: plugin path(s): /home/jared/build-k3d/lib/k3d/plugins
INFO: shader cache path: /home/jared/.k3d/shadercache
INFO: share path: /home/jared/k3d/share
INFO: user interface: /home/jared/build-k3d/lib/k3d/plugins/k3d-ngui.module
INFO: home directory: /home/jared
INFO: temp directory: /tmp
INFO: locale path: /home/jared/build-k3d/po
INFO: Loading options from /home/jared/.k3d/options.k3d
INFO: Loading plugin module /home/jared/build-k3d/lib/k3d/plugins/k3d-ngui.module
INFO: Loading plugin NGUI
INFO: Saving hotkeys to /home/jared/.k3d/hotkeys
ERROR: Gtk: g_hash_table_slist_values: assertion `hash_table != NULL' failed
INFO: Saving options to /home/jared/.k3d/options.k3d
CRITICAL: Caught exception [std::runtime_error] - UI plugin module [/home/jared/build-k3d/lib/k3d/plugins/k3d-ngui.module] does not implement k3d::iuser_interface
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
[jared@FBSD8 ~/build-k3d]$

Well, I guess that means we are one step closer. The test works so something got fixed. :-)
Thanks for taking time on this, I appreciate it.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Just to clarify ... I wanted to see whether the test worked for you before making changes to the main app, so this is expected. I also need to confirm whether this change would cause problems on Linux. Assuming it doesn't, I'll go ahead and apply the change to the main app.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Oh...right, I misunderstood that. Now I think I understand.
Only the test had the code change.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

OK, I've made this change for K-3D proper ... give it a shot!
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Timothy,
Yes, it launches. Your awesome.
It may not yet be fully functional yet as the issue I mentioned before about not being able to select a face properly is still occurring.
I realized that when I click on a face, it is actually selecting the rear most face where I clicked. For example, I am trying to do the mug tutorial. I am mostly facing the side of the mug, with the top showing. If I try to click on the top of th mug to select its face, instead it selects a square on the back of the mug. I didn't realize this until I turned the mug all the way around and saw the selection occurred at the back.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

This works fine for me in Linux and OSX with an NVidia GeForce 9400. I'm able to reproduce the problem in my FreeBSD VM, which is using the Mesa 7.4.4 software rasterizer. I'd be interested to see what OpenGL implementation you're using, for comparison. Pull the latest sources and rebuild, start K-3D, and choose the Advanced > Dialogs > NGUIOpenGLDialog menu item. A small window will open with information about your OpenGL implementation - post it to the forum and we'll see what we can figure-out.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

This is mesa bug https://bugs.freedesktop.org/show_bug.cgi?id=16866. If you build the GLX plugin (set K3D_BUILD_GLX_MODULE to ON in CMake) you should get a warning that your Mesa version is too old. I recommend upgrading to 7.6 or later, although this particular bug has been fixed starting with 7.5.1.
I should probably move the mesa version check to the opengl module, since it only uses pure OpenGL functions.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Actually, K3D_BUILD_GLX_MODULE is ON by default on FreeBSD (UNIX AND NOT APPLE) ... the problem seems to be that glGetString(GL_VENDOR) returns "Mesa Project" which is what I would expect. The source code in mesa_version_check.cpp is testing for "Tungsten Graphics, Inc", about which I'm highly skeptical ;)
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Actually, it looks like "Tungsten Graphics, Inc" is the vendor for recent versions of Mesa, and "Mesa Project" is the vendor for older versions. So it appears that we should be testing for both; however, even with that change the test doesn't work on my FreeBSD VM; it appears that glewGetContext() fails; this points to a longstanding issue where we need to cleanup our initialization of OpenGL.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I have both a VMWare version of FreeBSD and an IBM T40 version.
They are pretty much the same:
Vmware

OpenGL Vendor:
Mesa Project
OpenGL Renderer:
Software Rasterizer
OpenGL Version:
2.1 Mesa 7.4.4
OpenGL Extensions:
GL_3DFX_texture_compression_FXT1
GL_APPLE_packed_pixels
GL_APPLE_vertex_array_object
GL_ARB_depth_texture
GL_ARB_draw_buffers
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_half_float_pixel
GL_ARB_imaging
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_shader_objects
GL_ARB_shading_language_100
GL_ARB_shading_language_120
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_non_power_of_two
GL_ARB_texture_rectangle
GL_ARB_transpose_matrix
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_window_pos
GL_ATI_blend_equation_separate
GL_ATI_fragment_shader
GL_ATI_separate_stencil
GL_ATI_texture_env_combine3
GL_ATI_texture_mirror_once
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_convolution
GL_EXT_copy_texture
GL_EXT_depth_bounds_test
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_object
GL_EXT_gpu_program_parameters
GL_EXT_histogram
GL_EXT_multi_draw_arrays
GL_EXT_packed_depth_stencil
GL_EXT_packed_pixels
GL_EXT_paletted_texture
GL_EXT_pixel_buffer_object
GL_EXT_point_parameters
GL_EXT_polygon_offset
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_shared_texture_palette
GL_EXT_stencil_two_side
GL_EXT_stencil_wrap
GL_EXT_subtexture
GL_EXT_texture
GL_EXT_texture3D
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_texture_sRGB
GL_EXT_vertex_array
GL_IBM_multimode_draw_arrays
GL_IBM_rasterpos_clip
GL_IBM_texture_mirrored_repeat
GL_INGR_blend_func_separate
GL_MESA_pack_invert
GL_MESA_program_debug
GL_MESA_resize_buffers
GL_MESA_texture_array
GL_MESA_window_pos
GL_MESA_ycbcr_texture
GL_NV_blend_square
GL_NV_fragment_program
GL_NV_light_max_exponent
GL_NV_point_sprite
GL_NV_texgen_reflection
GL_NV_texture_rectangle
GL_NV_vertex_program
GL_NV_vertex_program1_1
GL_OES_read_format
GL_SGIS_generate_mipmap
GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGIX_depth_texture
GL_SGIX_shadow
GL_SGIX_shadow_ambient
GL_SGI_color_matrix
GL_SGI_color_table
GL_SGI_texture_color_table
GL_SUN_multi_draw_arrays
OpenGLU Version:
1.3
OpenGLU Extensions:
GLU_EXT_nurbs_tessellator
GLU_EXT_object_space_tess

I post my T40 in a second.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

IBM T40

OpenGL Vendor:
Tungsten Graphics, Inc.
OpenGL Renderer:
Mesa DRI Radeon 20061018 AGP 4x x86/MMX/SSE2 TCL
OpenGL Version:
1.3 Mesa 7.4.4
OpenGL Extensions:
GL_APPLE_packed_pixels
GL_ARB_imaging
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_rectangle
GL_ARB_transpose_matrix
GL_ARB_vertex_buffer_object
GL_ARB_window_pos
GL_ATI_texture_env_combine3
GL_ATI_texture_mirror_once
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_convolution
GL_EXT_copy_texture
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_histogram
GL_EXT_packed_pixels
GL_EXT_polygon_offset
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_stencil_wrap
GL_EXT_subtexture
GL_EXT_texture
GL_EXT_texture3D
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_vertex_array
GL_IBM_rasterpos_clip
GL_IBM_texture_mirrored_repeat
GL_MESA_window_pos
GL_MESA_ycbcr_texture
GL_NV_blend_square
GL_NV_light_max_exponent
GL_NV_texgen_reflection
GL_NV_texture_rectangle
GL_OES_read_format
GL_SGIS_generate_mipmap
GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGI_color_matrix
GL_SGI_color_table
OpenGLU Version:
1.3
OpenGLU Extensions:
GLU_EXT_nurbs_tessellator
GLU_EXT_object_space_tess

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

By the way, this may not help, but selecting a face is not a problem with version 0.6.7.0_5. I realize a lot has changed, but its better to mention something that doesn't matter than not mention something that does.
The older version can be installed version with:
pkg_add -r k3d
or
cd /usr/ports/graphics/k3d
make install
I can do the mug demo without a problem in this older version.
I also checked on the two patches that were being applied by the FreeBSD port, and one no longer appears to apply and the other is already a permanent change.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

So, to clarify, the only error here is that K-3D wasn't warning you about this problematic Mesa version. I've committed a fix that should address this - if you grab the latest sources and rebuild, you'll get a warning message at startup. Obviously, that doesn't solve the problem for you, but the real fix would be to upgrade the FreeBSD libGL port to a later version of Mesa.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Ok, it looks like Mesa 7.6.1 is available on FreeBSD.
You just have do make WITHOUT_NOUVEAU in order for the new version to be pulled.

portsnap fetch update
cd /usr/ports/graphics/libGL/
make deinstall
make WITHOUT_NOUVEAU=yes install
cd /usr/ports/graphics/libGLU/
make deinstall
make WITHOUT_NOUVEAU=yes install
cd /usr/ports/graphics/libGLw/
make deinstall
make WITHOUT_NOUVEAU=yes install
cd /usr/ports/graphics/libglut/
make deinstall
make WITHOUT_NOUVEAU=yes install
cd /usr/ports/graphics/dri/
make deinstall
make WITHOUT_NOUVEAU=yes install

So I am getting these new OpenGL libraries updated and I should be able to test tomorrow.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Oh...before updating /usr/ports/graphics/dri/ you must update libdrm or else it will fail to build.

cd /usr/ports/graphics/libdrm/
make deinstall
make WITHOUT_NOUVEAU=yes install

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

However, now when I launch K-3D, I get this:

INFO: Loading plugin NGUI
INFO: Loading GTK resources from /etc/gtk-2.0/gtkrc
INFO: Loading GTK resources from /home/jared/.gtkrc-2.0
INFO: Loading GTK resources from
INFO: Loading GTK resources from /usr/home/jared/.kde4/share/config/gtkrc-2.0
INFO: Loading GTK resources from /home/jared/.k3d/gtkrc
(k3d:11301): GdkGLExt-WARNING **: Window system doesn't support OpenGL.
ERROR: Could not initialize gtkglext
INFO: Saving hotkeys to /home/jared/.k3d/hotkeys
INFO: Saving options to /home/jared/.k3d/options.k3d
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
*** Error code 1
Stop in /usr/home/jared/build-k3d.
[jared@FBSD8 ~/build-k3d]$[/CODE]

Of course, I updated gtkglext but same issue.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Looks to me like the new mesa may not have installed correctly. What happens if you run glxinfo in a terminal?
Cheers,
Bart

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

We know that Mesa 7.6.1 works fine with gtkglext on other platforms, so I'd suspect that there are other dependencies that need to be updated.
I see a couple of items you might try at http://forums.freebsd.org/showthread.php?p=67852
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

It looks like they are still cleaning things up with OpenGL on FreeBSD. I will come back to this in a few weeks.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Timothy,
I have the Mesa libs updated. And glxinfo is working.
The selecting of the faces is now working properly. Yeah, one more issue surpassed.
So walking through the mug example here is what is still not working on FreeBSD:
1. The extrude interface appears to work until I try to change the Inset. The Inset setting doesn't do anything.
2. When I make the mug handle, the dissolve and bridge didn't work. I can't tell if a dissolve occurred but definitely no bridging occurs.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

These are errors of omission, not specific to FreeBSD; I've added some tracker items to address them before the 0.8 release.
Thanks!
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Following-up on this ...
* Group Faces is off by default for ExtrudeFaces.
* Inset functionality when Group Faces is on is restored.
* The BridgeFaces plugin is restored ... not sure what you were using ... BridgeEdges?
I hope to restore Dissolve in the next few days. Again, not sure what you would have been using in your testing, since the Dissolve plugin was completely disabled? Anyway, fixing Dissolve is one of two final items before the 0.8 release.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Hey, I am keeping an eye on this.
I would love for FreeBSD to have a working port of the new version 8 and am willing to do testing for it.
Let me know when you are a few days from release and I will test again.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I saw your post:
http://k-3d.org/blogs/tshead/2010/03/25/k-3d-video-gallery/
So I downloaded the source, compiled on FreeBSD again, and tested and everything in the mug tutorial is now working on FreeBSD.
I am trying to figure out why I just get a plain black box when rendering using Aqsis. There was one problem with the Aqsis FreeBSD port that I got around to get it installed. However, if I can't figure the RenderMan thing out, I'll start a separate post.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Cool ... I was about to post another link ... I am working on packaging issues for the Mac, Bart is working on Win32, so the 0.8 release is just about here.
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

I sort of have a FreeBSD port working.
If I already have the dependencies installed, then it works, but I it needs more work.
I have to figure out in ports how to add a lot of the dependencies we had to install above as well as make sure they install with WITHOUT_NOUVEAU=yes defined.
It would be nice to add a config for some of the options, too.

ForumImport
Offline
Last seen: 9 years 11 months ago
Joined: 09/22/2009 - 18:47
Need Updated Port for FreeBSD 8

Re: Aqsis, you may have run into some of the shader-compilation issues that we fixed in K-3D 0.8.0.1.
Let us know if there are any other issues!
Cheers,
Tim

Log in or register to post comments