building texgen on linux
Posted: Fri Feb 03, 2012 8:53 pm
Hi Louise,
so far my effort to build a working texgen-gui failed. you mentioned in the forum that u managed to build it on ubuntu. can u please provide some information on your built ?
texgen version: ?
python version: ?
swig version: ?
wxwidgets/wxgtk: ?
vtk version: ?
gcc version: `?
i had to overcome some compile errors but in the end it segfaulted anyway (svn rev. 730):
1.
error for latest gcc 4.6.2 extra qualification ... on member ...
In file included from /root/texgen/TexGenSvn1/Core/Textile3DWeave.cpp:21:0:
/root/texgen/TexGenSvn1/Core/Textile3DWeave.h:289:13: error: extra qualification 'TexGen::CTextile3DWeave::' on member 'GetCrossSection' [-fpermissive]
i changed
/Core/Textile3DWeave.h:289
-- CSection* CTextile3DWeave::GetCrossSection( int YarnIndex, int Node = -1 ) const;
++ CSection* GetCrossSection( int YarnIndex, int Node = -1 ) const;
-------------------------------------------------------------------------------------------------
2.
i dont have the error logged
i changed
/Gui/TexGenMainFrame.cpp:1991
-- wxString $Filename = filenames;
++ const wxString $Filename = filenames;
-------------------------------------------------------------------------------------------------
3. i dont have the error logged
building with wxwidgets 2.9.x messed up the make alot.
i modified the wxVTKRenderWindwoInteractor.cxx to reflect the incompatibility changes from 2.8.x
/GUI/wxVTKRenderWindwoInteractor.cxx
#if (wxCHECK_VERSION(2, 9, 3))
# include <wx/gtk/private/win_gtk.h>
#else
#ifdef __WXGTK20__
#include <wx/gtk/win_gtk.h>
#else
#include <wx/gtk1/win_gtk.h>
#endif // __WXGTK20__
#endif // wxCHECK_VERSION
#if wxCHECK_VERSION(2, 9, 3)
#define piz(wxwin) WX_PIZZA((wxwin)->m_wxwindow)
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
GDK_WINDOW_XWINDOW(((GtkWidget*)piz(wxwin))->window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#else
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#endif
#endif
in the end i reverted to 2.8.12 anyways
-------------------------------------------------------------------------------------------------
4. i had to manually add some libs to the linker related to wxgtk
______________________________________________________________________
another problem was the binary package of VTK provided by my linux distribution (archlinux.org):
--> its not only a concern for this distro but for several others:
VTK isnt built with all libs texgen depends on, but is linked to the system libs providing the same api(freetype,png,etc..); modifying the cmake to take this into account would be helpfull ( i tried to do this but failed and adjusted the generated cmakes accordingly).
i am not experienced in c++ nor cmake but i desire to get a full featured texgen built on my distro. once i figure out the build on my distro i would offer to provide some binaries not only for archlinux, but also for ubuntu and would contribute so cmake is more aware of some linux specific configuration/options.
i ll hope you can help me out and thanks alot for your dedication to this project.
best regards,
ep
so far my effort to build a working texgen-gui failed. you mentioned in the forum that u managed to build it on ubuntu. can u please provide some information on your built ?
texgen version: ?
python version: ?
swig version: ?
wxwidgets/wxgtk: ?
vtk version: ?
gcc version: `?
i had to overcome some compile errors but in the end it segfaulted anyway (svn rev. 730):
1.
error for latest gcc 4.6.2 extra qualification ... on member ...
In file included from /root/texgen/TexGenSvn1/Core/Textile3DWeave.cpp:21:0:
/root/texgen/TexGenSvn1/Core/Textile3DWeave.h:289:13: error: extra qualification 'TexGen::CTextile3DWeave::' on member 'GetCrossSection' [-fpermissive]
i changed
/Core/Textile3DWeave.h:289
-- CSection* CTextile3DWeave::GetCrossSection( int YarnIndex, int Node = -1 ) const;
++ CSection* GetCrossSection( int YarnIndex, int Node = -1 ) const;
-------------------------------------------------------------------------------------------------
2.
i dont have the error logged
i changed
/Gui/TexGenMainFrame.cpp:1991
-- wxString $Filename = filenames;
++ const wxString $Filename = filenames;
-------------------------------------------------------------------------------------------------
3. i dont have the error logged
building with wxwidgets 2.9.x messed up the make alot.
i modified the wxVTKRenderWindwoInteractor.cxx to reflect the incompatibility changes from 2.8.x
/GUI/wxVTKRenderWindwoInteractor.cxx
#if (wxCHECK_VERSION(2, 9, 3))
# include <wx/gtk/private/win_gtk.h>
#else
#ifdef __WXGTK20__
#include <wx/gtk/win_gtk.h>
#else
#include <wx/gtk1/win_gtk.h>
#endif // __WXGTK20__
#endif // wxCHECK_VERSION
#if wxCHECK_VERSION(2, 9, 3)
#define piz(wxwin) WX_PIZZA((wxwin)->m_wxwindow)
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
GDK_WINDOW_XWINDOW(((GtkWidget*)piz(wxwin))->window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#else
#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
#endif
#endif
in the end i reverted to 2.8.12 anyways
-------------------------------------------------------------------------------------------------
4. i had to manually add some libs to the linker related to wxgtk
______________________________________________________________________
another problem was the binary package of VTK provided by my linux distribution (archlinux.org):
--> its not only a concern for this distro but for several others:
VTK isnt built with all libs texgen depends on, but is linked to the system libs providing the same api(freetype,png,etc..); modifying the cmake to take this into account would be helpfull ( i tried to do this but failed and adjusted the generated cmakes accordingly).
i am not experienced in c++ nor cmake but i desire to get a full featured texgen built on my distro. once i figure out the build on my distro i would offer to provide some binaries not only for archlinux, but also for ubuntu and would contribute so cmake is more aware of some linux specific configuration/options.
i ll hope you can help me out and thanks alot for your dedication to this project.
best regards,
ep