POV-Ray : Newsgroups : povray.general : qtpovray-3.80.1 for Linux Server Time
25 Apr 2024 18:56:38 EDT (-0400)
  qtpovray-3.80.1 for Linux (Message 28 to 37 of 37)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 04:33:08
Message: <5b617044$1@news.povray.org>
Am 31.07.2018 um 23:49 schrieb hugo giulietti:
> 
> Confirmed using /usr/share/qtpovray-3.8/include/colors.inc
> 
> The message does appear and say :
> 
>   Statistics Stream to console....On 
>   Warning Stream to console.......On 
> version in colors.inc is 3,00

So you currently have

    #version 3.5;
    #debug concat("version in colors.inc is ",str(version,0,2),"\n")

in that `colors.inc`, right?

Then that's certainly a bug. Somehow the `#version` statement fails to
set the correct effective language version.


I also notice that the debug message says `3,00`, rather than `3.00`. Is
that a typo, or is that in the actual message?

In the latter case, that's another bug.


Oh, can you please try the following in an empty .pov file:

    #declare Foo = 3.14;
    #declare Bar = 314/100;
    #debug concat("Foo is ", str(Foo,0,2), "\n")
    #debug concat("Bar is ", str(Bar,0,2), "\n")

This /should/ output

    Foo is 3.14
    Bar is 3.14

but I have a hunch that it might output

    Foo is 3,00
    Bar is 3,14

in which case I guess I know what the problem may be.


Say, your name sounds italian, and in Italy they normally use commas as
decimal separators (just as they do here in Germany), right?


@dick: Are you actively changing the C/C++ locale in qtpovray, or do you
happen to know whether Qt does so by default? (buzzword `setlocale`)


Post a reply to this message

From: clipka
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 05:02:40
Message: <5b617730$1@news.povray.org>
Am 01.08.2018 um 10:33 schrieb clipka:

> @dick: Are you actively changing the C/C++ locale in qtpovray, or do you
> happen to know whether Qt does so by default? (buzzword `setlocale`)

Never mind that question. According to StackOverflow, QCoreApplication
(on Unix/Linux) does indeed invoke

    setlocale(LC_ALL,"")

which screws up things. The suggested solution is to invoke

    setlocale(LC_ALL,"C")

right after initialization of QCoreApplication or QApplication. See here:

https://stackoverflow.com/questions/25661295/why-does-qcoreapplication-call-setlocalelc-all-by-default-on-unix-linux


Unfortunately there is no portable way to fix this in POV-Ray itself,
short of completely re-writing all code that currently depends on the
C/C++ locale setting. At the moment, there is probably a host of such
locale-dependent sections in the POV-Ray source code, only very few of
which have already been identified as such.

The C and C++ standards guarantee that at program startup the locale is
set to the "C" locale, and all locale-dependent code in POV-Ray relies
on this remaining unchanged.


Post a reply to this message

From: dick balaska
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 05:33:20
Message: <5b617e60$1@news.povray.org>
On 07/31/2018 06:03 AM, hugo giulietti wrote:
> Hello,
> 
> I installed qtpovray in my lubuntu 16.04 using the ppa for automatic updates.
> After my first test using "optics.pov" i got this parse error from the povray's
output:
> 
> "Parse Error: Macros require #version 3.1 or later but #version 3.00 is set.
> at File: colors.inc Line: 167 Col: 2"
> 
> Very rare message. The colors.inc file is standard; i have not touched in any way. I
don't know how to fix this because the #version directive was not modified at all.
> 

Do you have other versions of POV-Ray installed?

Where did you get optics.pov from?

I assume you are trying optics.pov from
file:///usr/share/qtpovray-3.8/scenes/advanced/optics.pov

I assume you installed qtpovray-includes and qtpovray-extras
since you have colors.inc and optics.pov

What happens if you try "Basic scene 01 - Checkered plane" from the
insert menu?

I just tried it on two machines and it was fine.
ubuntu 16.04, which is my primary workstation
and
mint 18.3 which is a clean "install from the ppa" machine (no compiling,
no multiple working versions)

cornell.pov worked for me too.
file:///usr/share/qtpovray-3.8/scenes/radiosity/cornell.pov

---------------------------------------------------------------
What cpu are you using?

You don't have the "Dynamic optimizations:" in the banner. i.e.

Support libraries used by POV-Ray:
  ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
  LibPNG 1.2.54, Copyright 1998-2012 Glenn Randers-Pehrson
  LibJPEG 8, Copyright 1991-2016 Thomas G. Lane, Guido Vollbeding
  LibTIFF 4.0.6, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
  Boost 1.58, http://www.boost.org/
  OpenEXR 2.2.0 and IlmBase 2.2.0, Copyright (c) 2002-2011 Industrial
Light &
 Magic.

Dynamic optimizations:
  CPU detected: Intel,SSE2,AVX,AVX2,FMA3
  Noise generator: avx2fma3-intel (hand-optimized by Intel)

Parser Options
  Input file: cornell.pov
  Remove bounds........On
  Split unions.........Off
  Library paths:
    /usr/share/qtpovray-3.8/include
  Clock value:    0.000  (Animation off)
  ...

-------------------------------------------------------------------

This is a really strange problem. It's like the parser is broken.
Like clipka said, in your colors.inc problem, the version is set at line
#13, yet is reporting something different at line #167.  This makes no
sense (so far).
https://github.com/dickbalaska/qtpovray/blob/qtpovray/distribution/include/colors.inc

-- 
dik
Rendered 328976 of 330000 (99%)


Post a reply to this message

From: dick balaska
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 05:53:41
Message: <5b618325$1@news.povray.org>
On 08/01/2018 05:02 AM, clipka wrote:
> Am 01.08.2018 um 10:33 schrieb clipka:
> 
>> @dick: Are you actively changing the C/C++ locale in qtpovray, or do you
>> happen to know whether Qt does so by default? (buzzword `setlocale`)
> 
> Never mind that question. According to StackOverflow, QCoreApplication
> (on Unix/Linux) does indeed invoke
> 
>     setlocale(LC_ALL,"")
> 
> which screws up things. The suggested solution is to invoke
> 
>     setlocale(LC_ALL,"C")
> 
> right after initialization of QCoreApplication or QApplication. See here:
> 
>
https://stackoverflow.com/questions/25661295/why-does-qcoreapplication-call-setlocalelc-all-by-default-on-unix-linux
> 

Reading that, it seems that I need to wrap POV-Ray with
setlocale(LC_ALL,"C") and let Qt be Qt. Like, call setlocale when
creating a session. Hmm, that will be messy; when getting a message from
POV-Ray I would have to setlocale(LC_ALL, "") and then set it back to
"C" after processing the message.

But, iirc, the povray parser doesn't like umlauted characters ("C"
locale) so maybe I should just force "C" all through the program and
abandon hope of spiffy translations.

> 
> Unfortunately there is no portable way to fix this in POV-Ray itself,
> short of completely re-writing all code that currently depends on the
> C/C++ locale setting. At the moment, there is probably a host of such
> locale-dependent sections in the POV-Ray source code, only very few of
> which have already been identified as such.
> 
> The C and C++ standards guarantee that at program startup the locale is
> set to the "C" locale, and all locale-dependent code in POV-Ray relies
> on this remaining unchanged.
> 


-- 
dik
Rendered 328976 of 330000 (99%)


Post a reply to this message

From: clipka
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 08:40:43
Message: <5b61aa4b$1@news.povray.org>
Am 01.08.2018 um 11:53 schrieb dick balaska:
> On 08/01/2018 05:02 AM, clipka wrote:
>> Am 01.08.2018 um 10:33 schrieb clipka:
>>
>>> @dick: Are you actively changing the C/C++ locale in qtpovray, or do you
>>> happen to know whether Qt does so by default? (buzzword `setlocale`)
>>
>> Never mind that question. According to StackOverflow, QCoreApplication
>> (on Unix/Linux) does indeed invoke
>>
>>     setlocale(LC_ALL,"")
>>
>> which screws up things. The suggested solution is to invoke
>>
>>     setlocale(LC_ALL,"C")
>>
>> right after initialization of QCoreApplication or QApplication. See here:
>>
>>
https://stackoverflow.com/questions/25661295/why-does-qcoreapplication-call-setlocalelc-all-by-default-on-unix-linux
>>
> 
> Reading that, it seems that I need to wrap POV-Ray with
> setlocale(LC_ALL,"C") and let Qt be Qt. Like, call setlocale when
> creating a session. Hmm, that will be messy; when getting a message from
> POV-Ray I would have to setlocale(LC_ALL, "") and then set it back to
> "C" after processing the message.

No, that would just risk screwing up things even more. Unfortunately,
the locale is global to the entire process, not thread-local, so you
can't just tamper with it while there's other threads running and
potentially invoking locale-dependent code.

From what I understand, Qt has its own locale mechanism, and only calls
`setlocale(LC_ALL,"")` for (a) Unix/Linux tradition and (b) to probe a
thing or two during QCoreApplication initialization; it doesn't seem to
need it to /remain/ set to that at all.

So once QApplication or QCoreApplication has been initialized, it should
be safe to just invoke `setlocale(LC_ALL,"C")` once and never touch the
C/C++ locale again afterwards.


There's a potential workaround for GNU/Linux machines in invoking
`uselocale()` during thread initialization, which sets the locale for
the individual thread only. However, this function is not part of the
C/C++ standard.


Post a reply to this message

From: hugo giulietti
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 16:22:48
Message: <20180801172247.61786f61d97daa5f4b503ed0@gmail.com>
My locale is set wide system to spanish. Just for confirm, i added this lines to
cornell.pov:

#version 3.7;
#debug concat("version in cornell.pov is ",str(version,0,2),"\n")
#declare Foo = 3.14;
#declare Bar = 314/100;
#debug concat("Foo is ", str(Foo,0,2), "\n")
#debug concat("Bar is ", str(Bar,0,2), "\n")


and the output result is:


  Render Stream to console........On 
  Statistics Stream to console....On 
  Warning Stream to console.......On 
version in cornell.pov is 3,00
Foo is 3,00
Bar is 3,14
Parse Warning: In POV-Ray v3.5 and later a radiosity{}-block will automatically turn
on radiosity if the output quality is set to 9 or higher. Read the documentation to
find out more about radiosity changes!

It's clear. My decimal separator is a spanish "," (comma) rather the english "."
(point)


On Wed, 1 Aug 2018 10:33:07 +0200
clipka <ano### [at] anonymousorg> wrote:

> Am 31.07.2018 um 23:49 schrieb hugo giulietti:
> > 
> > Confirmed using /usr/share/qtpovray-3.8/include/colors.inc
> > 
> > The message does appear and say :
> > 
> >   Statistics Stream to console....On 
> >   Warning Stream to console.......On 
> > version in colors.inc is 3,00
> 
> So you currently have
> 
>     #version 3.5;
>     #debug concat("version in colors.inc is ",str(version,0,2),"\n")
> 
> in that `colors.inc`, right?
> 
> Then that's certainly a bug. Somehow the `#version` statement fails to
> set the correct effective language version.
> 
> 
> I also notice that the debug message says `3,00`, rather than `3.00`. Is
> that a typo, or is that in the actual message?
> 
> In the latter case, that's another bug.
> 
> 
> Oh, can you please try the following in an empty .pov file:
> 
>     #declare Foo = 3.14;
>     #declare Bar = 314/100;
>     #debug concat("Foo is ", str(Foo,0,2), "\n")
>     #debug concat("Bar is ", str(Bar,0,2), "\n")
> 
> This /should/ output
> 
>     Foo is 3.14
>     Bar is 3.14
> 
> but I have a hunch that it might output
> 
>     Foo is 3,00
>     Bar is 3,14
> 
> in which case I guess I know what the problem may be.
> 
> 
> Say, your name sounds italian, and in Italy they normally use commas as
> decimal separators (just as they do here in Germany), right?
> 
> 
> @dick: Are you actively changing the C/C++ locale in qtpovray, or do you
> happen to know whether Qt does so by default? (buzzword `setlocale`)


-- 
hugo giulietti <hug### [at] gmailcom>


Post a reply to this message

From: dick balaska
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 17:01:46
Message: <5b621fba$1@news.povray.org>
I will create a "C" locale version and push that out tonight.


On 08/01/2018 04:22 PM, hugo giulietti wrote:
> My locale is set wide system to spanish. Just for confirm, i added this lines to
cornell.pov:
> 
> #version 3.7;
> #debug concat("version in cornell.pov is ",str(version,0,2),"\n")
> #declare Foo = 3.14;
> #declare Bar = 314/100;
> #debug concat("Foo is ", str(Foo,0,2), "\n")
> #debug concat("Bar is ", str(Bar,0,2), "\n")
> 
> 
> and the output result is:
> 
> 
>   Render Stream to console........On 
>   Statistics Stream to console....On 
>   Warning Stream to console.......On 
> version in cornell.pov is 3,00
> Foo is 3,00
> Bar is 3,14
> Parse Warning: In POV-Ray v3.5 and later a radiosity{}-block will automatically turn
on radiosity if the output quality is set to 9 or higher. Read the documentation to
find out more about radiosity changes!
> 
> It's clear. My decimal separator is a spanish "," (comma) rather the english "."
(point)

-- 
dik
Rendered 328976 of 330000 (99%)


Post a reply to this message

From: hugo giulietti
Subject: Re: qtpovray-3.80.1 for Linux
Date: 1 Aug 2018 18:16:00
Message: <20180801191559.5db76ff231ab4eebafc9a2a1@gmail.com>
On Wed, 1 Aug 2018 05:33:20 -0400
dick balaska <dic### [at] buckosoftcom> wrote:

> On 07/31/2018 06:03 AM, hugo giulietti wrote:
> > Hello,
> > 
> > I installed qtpovray in my lubuntu 16.04 using the ppa for automatic updates.
> > After my first test using "optics.pov" i got this parse error from the povray's
output:
> > 
> > "Parse Error: Macros require #version 3.1 or later but #version 3.00 is set.
> > at File: colors.inc Line: 167 Col: 2"
> > 
> > Very rare message. The colors.inc file is standard; i have not touched in any way.
I don't know how to fix this because the #version directive was not modified at all.
> > 
> 
> Do you have other versions of POV-Ray installed?
> 
> Where did you get optics.pov from?
> 
> I assume you are trying optics.pov from
> file:///usr/share/qtpovray-3.8/scenes/advanced/optics.pov
> 
> I assume you installed qtpovray-includes and qtpovray-extras
> since you have colors.inc and optics.pov
> 
  Hi,
  I have installed povray 3.7 from the Ubuntu repos, using the standard software
manager Synaptics. The optics.pov (and all demo scene files) are from this
installation.
  I did not know that there is qtpovray-includes and qtpovray-extras. I have not
installed this packages. I will install these after posting this writing.
  The installation of qtpovray installed a folder with *.inc files in:
/usr/share/qtpovray-3.8/include, so it is using that
folder.


> What happens if you try "Basic scene 01 - Checkered plane" from the
> insert menu?
> 
> I just tried it on two machines and it was fine.
> ubuntu 16.04, which is my primary workstation
> and
> mint 18.3 which is a clean "install from the ppa" machine (no compiling,
> no multiple working versions)
> 
> cornell.pov worked for me too.
> file:///usr/share/qtpovray-3.8/scenes/radiosity/cornell.pov
> 
> ---------------------------------------------------------------
> What cpu are you using?
> 
> You don't have the "Dynamic optimizations:" in the banner. i.e.
> 
> Support libraries used by POV-Ray:
>   ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
>   LibPNG 1.2.54, Copyright 1998-2012 Glenn Randers-Pehrson
>   LibJPEG 8, Copyright 1991-2016 Thomas G. Lane, Guido Vollbeding
>   LibTIFF 4.0.6, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
>   Boost 1.58, http://www.boost.org/
>   OpenEXR 2.2.0 and IlmBase 2.2.0, Copyright (c) 2002-2011 Industrial
> Light &
>  Magic.
> 
> Dynamic optimizations:
>   CPU detected: Intel,SSE2,AVX,AVX2,FMA3
>   Noise generator: avx2fma3-intel (hand-optimized by Intel)
> 
> Parser Options
>   Input file: cornell.pov
>   Remove bounds........On
>   Split unions.........Off
>   Library paths:
>     /usr/share/qtpovray-3.8/include
>   Clock value:    0.000  (Animation off)
>   ...
> 
> -------------------------------------------------------------------
  I'm using an very old 1-core cpu AMD Sempron LE-1150 2.0 Ghz without AVX,AVX2,FMA3
support *but* with SSE2 instructions. I don't know why these was not detected.

> 
> This is a really strange problem. It's like the parser is broken.
> Like clipka said, in your colors.inc problem, the version is set at line
> #13, yet is reporting something different at line #167.  This makes no
> sense (so far).
>
https://github.com/dickbalaska/qtpovray/blob/qtpovray/distribution/include/colors.inc
> 
> -- 
> dik
> Rendered 328976 of 330000 (99%)

I think that the "macro" declaration in line 167 needs a "#version" > 3.1 but the
"detected" version is 3.0. Resolving
the version issue will resolve the macro issue. (I'm guessing)


Post a reply to this message

From: clipka
Subject: Re: qtpovray-3.80.1 for Linux
Date: 2 Aug 2018 03:37:53
Message: <5b62b4d1$1@news.povray.org>
Am 02.08.2018 um 00:15 schrieb hugo giulietti:

>   Hi,
>   I have installed povray 3.7 from the Ubuntu repos, using the standard software
manager Synaptics. The optics.pov (and all demo scene files) are from this
installation.
>   I did not know that there is qtpovray-includes and qtpovray-extras. I have not
installed this packages. I will install these after posting this writing.
>   The installation of qtpovray installed a folder with *.inc files in:
/usr/share/qtpovray-3.8/include, so it is using that
> folder.

The `qtpovray` package probably pulled in the other packages already.

Anyway, the include files are not at fault here. We've nailed down the
culprit to the locale settings.


Post a reply to this message

From: hugo giulietti
Subject: [Solved] Re: qtpovray-3.80.1 for Linux
Date: 2 Aug 2018 12:43:40
Message: <20180802134340.7cec9d13436e13c1f628ee32@gmail.com>
Yeah! Solved.

Now qtpovray is working at 100% after the software actualization! Thanks dick, thanks
clipka!

On Wed, 1 Aug 2018 17:01:46 -0400
dick balaska <dic### [at] buckosoftcom> wrote:

> I will create a "C" locale version and push that out tonight.
> 
> 
> On 08/01/2018 04:22 PM, hugo giulietti wrote:
> > My locale is set wide system to spanish. Just for confirm, i added this lines to
cornell.pov:
> > 
> > #version 3.7;
> > #debug concat("version in cornell.pov is ",str(version,0,2),"\n")
> > #declare Foo = 3.14;
> > #declare Bar = 314/100;
> > #debug concat("Foo is ", str(Foo,0,2), "\n")
> > #debug concat("Bar is ", str(Bar,0,2), "\n")
> > 
> > 
> > and the output result is:
> > 
> > 
> >   Render Stream to console........On 
> >   Statistics Stream to console....On 
> >   Warning Stream to console.......On 
> > version in cornell.pov is 3,00
> > Foo is 3,00
> > Bar is 3,14
> > Parse Warning: In POV-Ray v3.5 and later a radiosity{}-block will automatically
turn on radiosity if the output quality is set to 9 or higher. Read the documentation
to find out more about radiosity changes!
> > 
> > It's clear. My decimal separator is a spanish "," (comma) rather the english "."
(point)
> 
> -- 
> dik
> Rendered 328976 of 330000 (99%)


-- 
hugo giulietti <hug### [at] gmailcom>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.