Re: Compiling OpenShadingLanguage under Windows

Wormszer <worm...@...>

I included the project file for mcpp. I plan to generate a cmake file for it.

I have updated the cmakefiles for osl to hopefully work better on windows.
They assume that there is an thirdpartyhome variable set to the external/dist/windows folder from the OIIO external setup from this page.
Other things need to have some envrionment variables setup, and it looks for the OIIO install path location.
I included the document i was creating on the steps I had to do when I redid everything.
flex, bison, mcpp all assume to be in your path.
There maybe still some issues with the tests and the way they assume where the executables are.
Im not sure if i rolled those into the cmakefiles to handle that. And there is the precision problem.
I haven't cheked out the latest source in the last week or so, so hopefully any new commits won't cause any issues.
Let me know what does or doesnt work for you. And then I can fix it and submit a patch.

On Thu, Jan 28, 2010 at 4:00 PM, Oleg <ode...@...> wrote:

Hi Jeremy,

Sure, you can do it. It would be great.


On 28 Jan., 00:23, Wormszer <wo...@...> wrote:
> Mcpp integrated pretty easily with the existing structure. I can send  
> you the project I made for it. Unfortunatly I wasn't able to get it to  
> build on vs with cpp syntax. I think it assumed some other things  
> would be around that are installed with gcc.
> I was thinking I might send you a patch first and you can apply it to  
> a clean checkout and see if you hit any issues. Then I can submit it  
> to the osl dev.
> I think we are a minority on windows and it might be worth trying it  
> on a second windows machine before saying it works.
> I will be back at home tomorrow and will send you the project file.
> You could look into the print precision issue I mentioned. I'm hoping  
> that's just a simple fix and possibly the last issue.
> Jeremy
> Sent from my iPhone
> On Jan 27, 2010, at 3:48 PM, Oleg <od...@...> wrote:
> > Hi Jeremy,
> > I was trying to use the boost.wave preprocessor, but still have some
> > troubles to integrate it. I was not able to run any tests so far.
> > However, I'm still trying :-) Maybe it would be useful if you submit
> > the project file for the mcpp as well.
> > Regards,
> > Oleg
> > On 27 Jan., 06:41, Wormszer <wo...@...> wrote:
> >> I just checked one failed test file output and the error was
> >> ref:
> >> -5.96046e-08
> >> out:
> >> -5.96046e-008
> >> I wonder if this is due to different default precision on cout  
> >> possibly?
> >> That was the only error so I am not sure.
> >> Any ideas?
> >> I guess the printing is being done in the shader, so maybe ill look  
> >> there at
> >> the printf operator. It was the only value printed using scientific
> >> notation.
> >> I imagine the others will probably be something similiar.
> >> Jeremy
> >> On Wed, Jan 27, 2010 at 12:31 AM, Wormszer <wo...@...>  
> >> wrote:
> >>> I have made some modifications to to allow for the  
> >>> tests to be
> >>> run on windows along with some changes to the cmake files.
> >>> I have redone the everything from scratch and have made changes to  
> >>> cmake
> >>> and the source that should make it easy to build on windows.
> >>> I have some extra instructions for setting up some of the  
> >>> dependencies and
> >>> then modified the cmake routines to find the external libraries as  
> >>> they come
> >>> from installing and building OIIO.
> >>> OIIO cmake routines still need manual help and I may go modify them,
> >>> instead of having to add a bunch of paths to CMAKE_INSTALL_PREFIX.
> >>> I can now run the tests as well but only 35% of them pass.
> >>> I was hoping that through including the flex and bison outputs in  
> >>> the
> >>> project the need for cygwin could be removed, but the testsuite  
> >>> uses diff so
> >>> it maybe here to stay.
> >>> To get around having to modify every test, and having to parse the  
> >>> command
> >>> lines to pull out the output file names and create a stdout to  
> >>> file pipe, i
> >>> decieded to write the command to a batch file and have python call  
> >>> that.
> >>> This worked except that my install folder is C:\program files  
> >>> (x86)\... and
> >>> of course the space was now giving me issues.
> >>> So i was able to parse the command strings and wrap them commands  
> >>> in quotes
> >>> and then write them to the batch file and run it.
> >>> Now of course that wasn't the end of it. The next issue is that  
> >>> windows
> >>> uses cr/lf i guess through > even though the output should be  
> >>> writing just
> >>> lf, so diff was puking on that.
> >>> So on windows the diff command has to take an extra cmd parameter
> >>> --strip-trailing-cr
> >>> So now I can run the tests, I will investigate the errors and then  
> >>> should
> >>> be ready to submit a patch.
> >>> Jeremy
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "OSL Developers" group.
> > To post to this group, send email to osl...@....
> > To unsubscribe from this group, send email to osl...@...
> > .
> > For more options, visit this group at
> > .

You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To post to this group, send email to osl...@....
To unsubscribe from this group, send email to osl...@....
For more options, visit this group at

Join { to automatically receive all group messages.