Hi,
I have some strange problems with running Blender from merwin-spacenav
branch. When I try to run it, then it prints following message and then
it crashes:
$ ../install/linux2/blender
ndof: dead zone set to 0.10
ndof: using SpaceNavigator
ndof: 2 buttons -> hex:3
found bundled
python:
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/install/linux2/2.58/python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Neúspěšně ukončen (SIGABRT) (core dumped [obraz paměti uložen])
Core file doesn't include anything useful :-/
When I tried to compile this branch without spnav support (my
user-config.py contains WITH_BF_NDOF = False), then linking of Blender
was ended with following errors:
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/build/linux2/lib/libbf_intern_ghost.a(GHOST_NDOFManagerX11.o):
In function `GHOST_NDOFManagerX11':
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerX11.cpp:36:
undefined reference to `spnav_open'
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/build/linux2/lib/libbf_intern_ghost.a(GHOST_NDOFManagerX11.o):
In function `~GHOST_NDOFManagerX11':
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerX11.cpp:70:
undefined reference to `spnav_close'
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/build/linux2/lib/libbf_intern_ghost.a(GHOST_NDOFManagerX11.o):
In function `GHOST_NDOFManagerX11::processEvents()':
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerX11.cpp:89:
undefined reference to `spnav_poll_event'
collect2: ld returned 1 exit status
scons: ***
[/home/jirka/Development/Blender/svn/branches/merwin-spacenav/build/linux2/bin/blender]
Error 1
scons: building terminated because of errors.
You forgot to add some #ifdef to source code files. I created patch that
enables to compile Blender without support of spnav at Linux. This patch
can be found in attachment. When I try to run Blender without spnav
support, then it crashes too:
found bundled
python:
/home/jirka/Development/Blender/svn/branches/merwin-spacenav/install/linux2/2.58/python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Neúspěšně ukončen (SIGABRT) (core dumped [obraz paměti uložen])
Best Regards,
Jiri
Index: intern/ghost/intern/GHOST_NDOFManagerX11.cpp
===================================================================
--- intern/ghost/intern/GHOST_NDOFManagerX11.cpp (revision 38812)
+++ intern/ghost/intern/GHOST_NDOFManagerX11.cpp (working copy)
@@ -23,7 +23,9 @@
#include "GHOST_NDOFManagerX11.h"
#include "GHOST_SystemX11.h"
+#ifdef WITH_BF_NDOF
#include <spnav.h>
+#endif
#include <stdio.h>
@@ -31,6 +33,7 @@
: GHOST_NDOFManager(sys)
, m_available(false)
{
+#ifdef WITH_BF_NDOF
setDeadZone(0.1f); // how to calibrate on Linux? throw away slight motion!
if (spnav_open() != -1)
@@ -62,12 +65,15 @@
printf("ndof: spacenavd not found\n");
// This isn't a hard error, just means the user doesn't have a 3D mouse.
}
+#endif
}
GHOST_NDOFManagerX11::~GHOST_NDOFManagerX11()
{
+#ifdef WITH_BF_NDOF
if (m_available)
spnav_close();
+#endif
}
bool GHOST_NDOFManagerX11::available()
@@ -82,6 +88,7 @@
bool GHOST_NDOFManagerX11::processEvents()
{
+#ifdef WITH_BF_NDOF
GHOST_TUns64 now = m_system.getMilliSeconds();
bool anyProcessed = false;
@@ -107,4 +114,5 @@
anyProcessed = true;
}
return anyProcessed;
+#endif
}
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers