|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Running a CtrlLib application "headless"
Running a CtrlLib application "headless" [message #37109] |
Fri, 24 August 2012 20:30  |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Hi,
I have a rather large and complex GUI application. This application can run in batch mode and I have an academic user who wants to run it headless (no GUI) on a cloud.
Is there a simple way to recompile a CtrlLib application to run without it's GUI or is the only way for me to use preprocessor directives to cut out all the GUI code?
I imagine that the first thing is to not use the Run command.
Does anyone have experience of doing something similar?
Nick
|
|
|
|
|
|
|
|
|
|
|
Re: Running a CtrlLib application "headless" [message #38547 is a reply to message #37592] |
Sun, 23 December 2012 02:07   |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Hi Mirek,
When I try I get the following or similar error:
----- CtrlLib ( MT OCOE PRO AC CLIENT_MIT HEADLESS RAINBOW SKELETON GCC SHARED LINUX POSIX ) (1 / 26)
LabelBase.cpp
Button.cpp
Switch.cpp
EditField.cpp
Text.cpp
LineEdit.cpp
DocEdit.cpp
ScrollBar.cpp
HeaderCtrl.cpp
In file included from /home/nick/upp/uppsrc/CtrlCore/CtrlCore.h:20:0,
from /home/nick/upp/uppsrc/CtrlLib/CtrlLib.h:4,
from /home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp:1:
/home/nick/upp/rainbow/Skeleton/Skeleton.h:75:14: error: cannot declare field ‘Upp::ImageDraw::alpha’ to be of abstract type ‘Upp::SystemDraw’
/home/nick/upp/rainbow/Skeleton/Skeleton.h:5:7: note: because the following virtual functions are pure within ‘Upp::SystemDraw’:
/home/nick/upp/uppsrc/Draw/Draw.h:445:15: note: virtual void Upp::Draw::DrawImageOp(int, int, int, int, const Upp::Image&, const Rect&, Upp::Color)
/home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp: In member function ‘virtual void Upp::LineEdit::LeftDrag(Upp::Point, Upp::dword)’:
/home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp:858:13: error: cannot declare variable ‘iw’ to be of abstract type ‘Upp::ImageDraw’
/home/nick/upp/rainbow/Skeleton/Skeleton.h:74:7: note: because the following virtual functions are pure within ‘Upp::ImageDraw’:
/home/nick/upp/uppsrc/Draw/Draw.h:445:15: note: virtual void Upp::Draw::DrawImageOp(int, int, int, int, const Upp::Image&, const Rect&, Upp::Color)
ArrayCtrl.cpp
repeated many times. Are my flags wrong? I have copied code across from upp/rainbow so that I now have upp/uppsrc, upp/bazaar and upp/rainbow. Are there more packages that I need please?
Nick
[Updated on: Sun, 23 December 2012 02:08] Report message to a moderator
|
|
|
Re: Running a CtrlLib application "headless" [message #38548 is a reply to message #38547] |
Sun, 23 December 2012 09:52   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
nixnixnix wrote on Sat, 22 December 2012 20:07 | Hi Mirek,
When I try I get the following or similar error:
----- CtrlLib ( MT OCOE PRO AC CLIENT_MIT HEADLESS RAINBOW SKELETON GCC SHARED LINUX POSIX ) (1 / 26)
LabelBase.cpp
Button.cpp
Switch.cpp
EditField.cpp
Text.cpp
LineEdit.cpp
DocEdit.cpp
ScrollBar.cpp
HeaderCtrl.cpp
In file included from /home/nick/upp/uppsrc/CtrlCore/CtrlCore.h:20:0,
from /home/nick/upp/uppsrc/CtrlLib/CtrlLib.h:4,
from /home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp:1:
/home/nick/upp/rainbow/Skeleton/Skeleton.h:75:14: error: cannot declare field ‘Upp::ImageDraw::alpha’ to be of abstract type ‘Upp::SystemDraw’
/home/nick/upp/rainbow/Skeleton/Skeleton.h:5:7: note: because the following virtual functions are pure within ‘Upp::SystemDraw’:
/home/nick/upp/uppsrc/Draw/Draw.h:445:15: note: virtual void Upp::Draw::DrawImageOp(int, int, int, int, const Upp::Image&, const Rect&, Upp::Color)
/home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp: In member function ‘virtual void Upp::LineEdit::LeftDrag(Upp::Point, Upp::dword)’:
/home/nick/upp/uppsrc/CtrlLib/LineEdit.cpp:858:13: error: cannot declare variable ‘iw’ to be of abstract type ‘Upp::ImageDraw’
/home/nick/upp/rainbow/Skeleton/Skeleton.h:74:7: note: because the following virtual functions are pure within ‘Upp::ImageDraw’:
/home/nick/upp/uppsrc/Draw/Draw.h:445:15: note: virtual void Upp::Draw::DrawImageOp(int, int, int, int, const Upp::Image&, const Rect&, Upp::Color)
ArrayCtrl.cpp
repeated many times. Are my flags wrong? I have copied code across from upp/rainbow so that I now have upp/uppsrc, upp/bazaar and upp/rainbow. Are there more packages that I need please?
Nick
|
Now this rather looks like you have hit a period of unstability - I am now working on new rainbow backends, adding or changing stuff here and there. Just yesterday I have found that skeleton was broken - uppweb did not compiled. Today, it should be fixed in svn again.
Mirek
|
|
|
Re: Running a CtrlLib application "headless" [message #38601 is a reply to message #38548] |
Thu, 27 December 2012 05:25   |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Hi Mirek,
Sorry for the delay in getting back to you but I broke my Linux VM and had to set everything up again.
I am back to being able to build and run all variants of my software in the Ubuntu 64 based version of Mint Linux apart from the headless build which gives me the following link errors
----- OpenWind ( MT OCOE PRO AC CLIENT_MIT HEADLESS RAINBOW SKELETON NOGTK MAIN GCC SHARED LINUX POSIX ) (26 / 26)
Linking...
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawX11.o): In function `Upp::BackDraw::Destroy()':
DrawX11.cpp:(.text._ZN3Upp8BackDraw7DestroyEv+0x1b): undefined reference to `XftDrawDestroy'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawX11.o): In function `Upp::SetClip(_XGC*, _XftDraw*, Upp::Vector<Upp::Rect_<int> > const&)':
DrawX11.cpp:(.text._ZN3Upp7SetClipEP4_XGCP8_XftDrawRKNS_6VectorINS_5Rect_IiEEEE+0x96): undefined reference to `XftDrawSetClipRectangles'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawX11.o): In function `Upp::BackDraw::Create(Upp::SystemDraw&, int, int)':
DrawX11.cpp:(.text._ZN3Upp8BackDraw6CreateERNS_10SystemDrawEii+0x9d): undefined reference to `XftDrawCreate'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawTextX11.o): In function `Upp::CreateXftFont(Upp::Font, int)':
DrawTextX11.cpp:(.text._ZN3Upp13CreateXftFontENS_4FontEi+0x15b): undefined reference to `XftFontMatch'
DrawTextX11.cpp:(.text._ZN3Upp13CreateXftFontENS_4FontEi+0x27a): undefined reference to `XftFontOpenPattern'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawTextX11.o): In function `Upp::GetXftFont(Upp::XftEntry*, Upp::Font, int)':
DrawTextX11.cpp:(.text._ZN3Upp10GetXftFontEPNS_8XftEntryENS_4FontEi+0x1c2): undefined reference to `XftFontClose'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawTextX11.o): In function `Upp::SystemDraw::DrawTextOp(int, int, int, unsigned short const*, U
pp::Font, Upp::Color, int, int const*)':
DrawTextX11.cpp:(.text._ZN3Upp10SystemDraw10DrawTextOpEiiiPKtNS_4FontENS_5ColorEiPKi+0x391): undefined reference to `XftDrawString16'
DrawTextX11.cpp:(.text._ZN3Upp10SystemDraw10DrawTextOpEiiiPKtNS_4FontENS_5ColorEiPKi+0x564): undefined reference to `XftDrawCharSpec'
DrawTextX11.cpp:(.text._ZN3Upp10SystemDraw10DrawTextOpEiiiPKtNS_4FontENS_5ColorEiPKi+0x5a2): undefined reference to `XftDrawString16'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(DrawTextX11.o): In function `Upp::XftGetGlyphInfoSys(Upp::Font, int)':
DrawTextX11.cpp:(.text._ZN3Upp18XftGetGlyphInfoSysENS_4FontEi+0x2a): undefined reference to `XftTextExtents16'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::SetSurface(Upp::SystemDraw&, int, int, int, int, Upp::RGBA const*
)':
ImageX11.cpp:(.text._ZN3Upp10SetSurfaceERNS_10SystemDrawEiiiiPKNS_4RGBAE+0x55): undefined reference to `XRenderFindStandardFormat'
ImageX11.cpp:(.text._ZN3Upp10SetSurfaceERNS_10SystemDrawEiiiiPKNS_4RGBAE+0x6c): undefined reference to `XRenderCreatePicture'
ImageX11.cpp:(.text._ZN3Upp10SetSurfaceERNS_10SystemDrawEiiiiPKNS_4RGBAE+0x160): undefined reference to `XftDrawPicture'
ImageX11.cpp:(.text._ZN3Upp10SetSurfaceERNS_10SystemDrawEiiiiPKNS_4RGBAE+0x1aa): undefined reference to `XRenderComposite'
ImageX11.cpp:(.text._ZN3Upp10SetSurfaceERNS_10SystemDrawEiiiiPKNS_4RGBAE+0x1bb): undefined reference to `XRenderFreePicture'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::ImageSysData::~ImageSysData()':
ImageX11.cpp:(.text._ZN3Upp12ImageSysDataD2Ev+0x48): undefined reference to `XRenderFreePicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysDataD2Ev+0x56): undefined reference to `XRenderFreePicture'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::SystemDraw::CursorX11(Upp::Image const&)':
ImageX11.cpp:(.text._ZN3Upp10SystemDraw9CursorX11ERKNS_5ImageE+0x7d): undefined reference to `XRenderFindStandardFormat'
ImageX11.cpp:(.text._ZN3Upp10SystemDraw9CursorX11ERKNS_5ImageE+0x94): undefined reference to `XRenderCreatePicture'
ImageX11.cpp:(.text._ZN3Upp10SystemDraw9CursorX11ERKNS_5ImageE+0x1dc): undefined reference to `XRenderCreateCursor'
ImageX11.cpp:(.text._ZN3Upp10SystemDraw9CursorX11ERKNS_5ImageE+0x1ee): undefined reference to `XRenderFreePicture'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::ImageSysData::Paint(Upp::SystemDraw&, int, int, Upp::Rect_<int> c
onst&, Upp::Color)':
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x1e5): undefined reference to `XRenderFindStandardFormat'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x1fc): undefined reference to `XRenderCreatePicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x342): undefined reference to `XftDrawPicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x392): undefined reference to `XRenderComposite'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x3df): undefined reference to `XRenderFindStandardFormat'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x3f8): undefined reference to `XRenderCreatePicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x558): undefined reference to `XftDrawPicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x5ac): undefined reference to `XRenderFreePicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x5f5): undefined reference to `XRenderFindStandardFormat'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x625): undefined reference to `XRenderCreatePicture'
ImageX11.cpp:(.text._ZN3Upp12ImageSysData5PaintERNS_10SystemDrawEiiRKNS_5Rect_IiEENS_5ColorE+0x6ca): undefined reference to `XRenderFillRectangle'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::ImageDraw::~ImageDraw()':
ImageX11.cpp:(.text._ZN3Upp9ImageDrawD2Ev+0x17): undefined reference to `XftDrawDestroy'
ImageX11.cpp:(.text._ZN3Upp9ImageDrawD2Ev+0x43): undefined reference to `XftDrawDestroy'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(ImageX11.o): In function `Upp::ImageDraw::Init()':
ImageX11.cpp:(.text._ZN3Upp9ImageDraw4InitEv+0x8e): undefined reference to `XftDrawCreate'
ImageX11.cpp:(.text._ZN3Upp9ImageDraw4InitEv+0x120): undefined reference to `XftDrawCreate'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(X11Wnd.o): In function `Upp::Ctrl::DoPaint(Upp::Vector<Upp::Rect_<int> > const&)':
X11Wnd.cpp:(.text._ZN3Upp4Ctrl7DoPaintERKNS_6VectorINS_5Rect_IiEEEE+0x75): undefined reference to `XftDrawCreate'
X11Wnd.cpp:(.text._ZN3Upp4Ctrl7DoPaintERKNS_6VectorINS_5Rect_IiEEEE+0xc9): undefined reference to `XftDrawDestroy'
/home/nick/.upp/_out/trunk/CtrlCore/GCC.Ac.Client_Mit.Headless.Mt.Nogtk.Ocoe.Pro.Rainbow.Shared.Skeleton/CtrlCore.a(X11Wnd.o): In function `Upp::ViewDraw::ViewDraw(Upp::Ctrl*)':
X11Wnd.cpp:(.text._ZN3Upp8ViewDrawC2EPNS_4CtrlE+0xff): undefined reference to `XftDrawCreate'
collect2: error: ld returned 1 exit status
There were errors. (0:02.49)
It's entirely possible that I don't really understand what Skeleton is designed to do. I am trying to use it to take a GUI app and enable it to run in batch mode on cloud nodes which do not have video cards merely by replacing GUI_APP_MAIN with CONSOLE_APP_MAIN.
Can I still call TopWindow constructors and member functions in the code? Does Skeleton make these harmless or do I need to do more to make my code Skeleton friendly?
I took a look at uppweb but I don't really get what it is doing. It is very different to my starting point.
Cheers,
Nick
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 14:43:35 CEST 2025
Total time taken to generate the page: 0.00920 seconds
|
|
|