Page 1 of 1

building texgen on linux

Posted: Fri Feb 03, 2012 8:53 pm
by eikep
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

Re: building texgen on linux

Posted: Mon Feb 06, 2012 10:03 am
by louisepb
Hi ep,

I normally work in Visual Studio to develop TexGen but always make sure that everything builds and runs on my linux partition before I do a release. You should therefore always be able to build the version stored in the latest release tag of the repository but it's possible that commits since then may cause problems in the linux build. (If more people are using TexGen in linux then I should probably be more diligent about checking my commits work in linux as I do them).

So, as far as versions of things go:

TexGen 3.5.0
Python 2.5
Swig 1.3.4
wxWidgets 2.8.10
vtk 5.4.2
Not logged onto my linux partition at the moment so I'm not sure what version my gcc is.

I've been working on CTextile3DWeave recently so it's quite possible that this may throw up some errors - I'll try and check this later if I have time.

I'm not sure about the wxgtk. As far as I'm aware it hasn't been used in the builds that I have done so far.

As far as VTK goes I downloaded the source and built it.

I hope that helps. I had to learn linux when I started work on this project so it has been very much a case of feeling my way along to get everything working. If there are things that I've missed your contributions are much appreciated!

Best regards,
Louise

Re: building texgen on linux

Posted: Mon Feb 06, 2012 1:46 pm
by louisepb
Hi,

I have just built my linux version. I had to make a few changes so the current version in the repository ( revision 733 ) builds and works on my machine.

I am running gcc-4.4

Louise

Re: building texgen on linux

Posted: Mon Nov 19, 2012 2:31 pm
by dyeyanie
Hi Louise,

Could you show me how to install Texgen in Linux system?

thanks.

Yanie

Re: building texgen on linux

Posted: Mon Nov 19, 2012 3:15 pm
by louisepb
Hi Yanie,

The instructions for building on a Unix/Linux system are on the TexGen website here: http://texgen.sourceforge.net/index.php ... ource#Unix

I have tested the latest release in Ubuntu and it works fine.

Louise