executing script at terminal command prompt

Discussion forum for contributors and developers who are using the QCAD version 3 ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Postby alf2006x » Wed Oct 26, 2011 10:07 pm

And when I print:
alfus@ubuntu:/opt/qcad/qcad3b$ ldd ./qcad-trial-bin
in appearing list I can see this name
libGL.so.1 => not found

And there is some other not founded names, like
libphonon.so.4 => not found
etc.

How can I found and install that files?
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby andrew » Wed Oct 26, 2011 10:40 pm

alf: that might be a question that is better asked in a Ubuntu Linux forum.

Basically, you have to find out in which package these libraries are and then install those packages. Google might also be helpful (search for library name and Ubuntu).
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Wed Oct 26, 2011 10:55 pm

I found that this is some graphics library. Is it any way to exclude this file from request in "-no-gui" mode of qcad ?
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby andrew » Thu Oct 27, 2011 8:39 am

alf2006x wrote:I found that this is some graphics library. Is it any way to exclude this file from request in "-no-gui" mode of qcad ?


Unfortunately not. That would require a separate binary, linked against a specially built Qt version and various source code adjustments to exclude certain classes of the API which require that library.

Is there any reason why you cannot simply install that package?
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Fri Oct 28, 2011 9:19 pm

I installed requested packages, and qcad begins to work. But there is some strange messages: Image
Can you look at them? Is it an errors or this is all right?

(about QWidget I remember - I will change EAction.js)
[/img]
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby andrew » Fri Oct 28, 2011 9:23 pm

I also get the messages from QPainter here. I haven't quite figured out yet where they come from and despite the warnings everything seems to work as expected.

I will look into this later:
http://www.ribbonsoft.com/bugtracker/in ... ask_id=347
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Fri Oct 28, 2011 10:11 pm

and one more:
after EAction.js was fixed qcad still writes an arror about QWidget

Image

maybe it is because I run qcad under Ubuntu Server 64?
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby andrew » Fri Oct 28, 2011 11:09 pm

Possibly the debugger that wants to show up. This will be improved in the next release (backtrace printed to stdout).

Can you test the script on a machine with GUI before deploying to the server?
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Sun Oct 30, 2011 8:23 am

I did two launch of the same script except path to output pdf file.

First launch was on: Linux ubuntu 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 i686 i686 i386 GNU/Linux
Results shown on left white screen.

Second launch was on: Linux ubuntu 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU/Linux
(it is ubuntu server)
Results shown on right black screen.

Firts one makes PDF file, but Second not makes PDF.
What can be wrong with it?
And on ubuntu server (black screen) in first string I can see message
"Fontconfig error: Cannot load default config file"

Here is comparing:

Image
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby alf2006x » Sun Oct 30, 2011 8:34 am

And if I run the script on ubunty server without "-no-gui" it prints me two messages:
Fontconfig error: Cannot load default config file
qcad-trial-bin: Cannot connect to X server

Last one of course shows because on server do not installed any X server, and I dont want to install it to simulate same condition like my hosting provider.
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby hungerburg » Mon Oct 31, 2011 6:00 pm

Alf, "no-gui" or "headless" may very well include an x-server installed. it just does not require the x-server to be running. To simulate the headless server environment on your developing machine, unsetting DISPLAY really is the only thing you have to do.

The first result of a google search for "Fontconfig error: Cannot load default config file" goes to http://www.stata.com/support/faqs/unix/fontconfig.html - maybe this helps you. Be prepared to only meet the next hurdle after jumping this one.

The easiest of course was, to install some xserver from the package manager, aptitude eg, and let it sort out this "dependency hell". I guess, it will not try to start it automagically.

BTW: even on my system, which is 64bit ubuntu 10 as well, and has a full X, phonon is marked as missing in ldd output. Yet, everything is fine...
User avatar
hungerburg
Senior Member
 
Posts: 125
Joined: Fri May 28, 2010 7:35 pm

Postby andrew » Mon Oct 31, 2011 10:29 pm

QCAD 3 RC1 is now available. If started in -no-gui mode, it shows script exceptions as back trace on the console rather than trying to launch the debugger.
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Tue Nov 01, 2011 8:50 pm

Using QCAD3_RC1 i have this messages. PDF do not appears in destination folder. I think it is because I have some problems wits fonts on my server.

Image
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

Postby andrew » Wed Nov 02, 2011 5:36 pm

The crucial part here is:

Code: Select all
Can't find variable: Print.


This means that "Print.js" was not included, and indeed in QCAD RC1, Print.js moved to scripts/File/Print/Print.js. Please adjust the include accordingly. The API doc / tutorials will be updated.
User avatar
andrew
Site Admin
 
Posts: 2659
Joined: Fri Mar 30, 2007 6:07 am

Postby alf2006x » Sun Nov 06, 2011 12:12 pm

Hello.
I have all turned out. Fontconfig warnings I removed within install fontconfig package and some dependent packages. There is:
- fontconfig-config
- libfontconfig
- libgl1-mesa-swx
- libosmesa
- ttf-dejavu-core

After all was installed i print in command prompt:
$ fc-cache
and warnings disappeared.

Andrew, it is wery confortable to use qcad3-rc1 wich printing script errors in commfnd prompt.

And my another question is: can qcad3-rc1 run several scripts at the same time on the same server?

And one question not about qcad. How can I make my binary file in Linux? I do not want to show my source code to anyone.
That is why I want to compile the binary.
alf2006x
Active Member
 
Posts: 42
Joined: Mon Oct 10, 2011 11:29 am

PreviousNext

Return to QCAD 3 Developers and Contributors

Who is online

Users browsing this forum: No registered users and 1 guest