Re: [coral-app] Building Coral

305 views
Skip to first unread message

Dorian FEVRIER

unread,
Aug 9, 2012, 8:50:58 AM8/9/12
to cora...@googlegroups.com
I'm sorry, I can't help you but I'm adding my voice to ask for a step to step explanation to compile coral on windows.


De : Constantine Tarasenkov <iam...@gmail.com>
À : cora...@googlegroups.com
Envoyé le : Jeudi 9 août 2012 14h07
Objet : [coral-app] Building Coral

Hi, list! My name is Constantine Tarasenkov, I'm a freelancer and Softimage ICE specialist for two years now. I want to thank all those people and Andrea especially for making Coral! I never saw so clean and full of advanced techniques code in one application! Great work, guys. From now on I will contribute high level nodes for Coral as much as possible.

But before that, can someone help me with build Coral for windows? My first attempt was failed because of lack of knowledge of building process (scons especially)

For example, does scons build program with MinGW? Can it compile Coral for x64 system? Does all libraries should be x64? Because what I can say from the dependencies list scons is x86 only, so it can be installed on python x86 only, - is it means that not all of them should be x64?

Procedural Insight guys, are you here also? :)

Any suggestions would be helpful, thanks!


Sveinbjörn J. Tryggvason

unread,
Aug 9, 2012, 9:47:46 AM8/9/12
to cora...@googlegroups.com
Hey, I managed to get it building on an x64 windows system with visual
studio 10 express. It took a while and I'm sad to say I don't remember
all the steps I took (I tried a lot of things and some worked and some
didn't and I'm not really clear anymore what did and didn't) but you
need to have all the libs compiled for x64. I built boost myself,
ilmbase, tbb and glew are available as 64-bit binaries if I remember
correctly. But the thing that was the biggest fix for me was to change
the SConstruct files within 'coral', 'coralUi' and 'imath' (I didn't
build coral for maya) to point explicitly to the correct compiler,
adding to the section:

elif sys.platform.startswith("win"):
...
env["CC"] = r'"C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\bin\amd64\cl.exe"'
...

and removing the '/openmp' flag from CXXFLAGS (I am not really clear
if this is something that I should do - but it worked for me).

I hope this is of some help, disorganized as it is.

-Svenni

Dorian FEVRIER

unread,
Aug 9, 2012, 10:17:01 AM8/9/12
to cora...@googlegroups.com
Thanks a lot Svenni!

I remember I had give up while I had to compile boost on x64...

So yes, really Constantine, I you are able to write a step by step "How to build coral for Windows", it could really help and I could put it in the wiki. :)

Regards,

Dorian


De : Constantine Tarasenkov <iam...@gmail.com>
À : cora...@googlegroups.com
Envoyé le : Jeudi 9 août 2012 15h59
Objet : Re: [coral-app] Building Coral

Thank you, Svenni! I'll try that, thank you very much for the explanation!

Narann, I'll describe all little steps if I manage to build it :)

Sveinbjörn J. Tryggvason

unread,
Aug 9, 2012, 11:07:07 AM8/9/12
to cora...@googlegroups.com
I would also try to find OpenimageIO from someone who has built it
before. Building it is not nice.

-Svenni

On Thu, Aug 9, 2012 at 2:58 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:
> I'll probably use this boost library for win64 from blender's trunk:
> https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/boost/

Dorian FEVRIER

unread,
Aug 9, 2012, 11:29:04 AM8/9/12
to cora...@googlegroups.com
Blender seems to have x64 build of OpenImagIO too:

http://projects.blender.org/scm/viewvc.php/trunk/lib/win64/openimageio/?root=bf-blender



De : Sveinbjörn J. Tryggvason <s...@sjt.is>
À : cora...@googlegroups.com
Envoyé le : Jeudi 9 août 2012 17h07

Hiroshi Chiyama

unread,
Aug 9, 2012, 11:52:33 AM8/9/12
to cora...@googlegroups.com
Hello,

coral depends on many 3rd party libs. It's very difficult to compile
64bit version.
Blender has x64 binaries for them. we used it to build coral. you can
download here:

https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64

one only thing, you have to build boost by own for multidhreaded DLL,
python version compatibility.


this is little old info though, I'm happy If this helps you.

Hiroshi Chiyama

unread,
Aug 9, 2012, 12:08:40 PM8/9/12
to cora...@googlegroups.com
I did following steps:

1. build bjam with bootstrap.bat

2. build boost using bjam

>bjam link=shared threading=multi address-model=64

that's it :-)

If you success to create python environment, boost-python will built same time.



On Thu, Aug 9, 2012 at 9:04 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:
> Hi, Hiroshi! Thanks, yes, any kind of info for building would be helpful
> since I don't know how to do it. Is there an info how can I build boost with
> multithreading support?
>
>
> 2012/8/9 Hiroshi Chiyama <hchi...@gmail.com>
> --
> Constantine Tarasenkov
>
> http://procedural.tumblr.com/
>
>

Dorian FEVRIER

unread,
Aug 10, 2012, 8:42:21 AM8/10/12
to cora...@googlegroups.com

De : Constantine Tarasenkov <iam...@gmail.com>
À : cora...@googlegroups.com
Envoyé le : Vendredi 10 août 2012 14h29

Objet : Re: [coral-app] Building Coral

I like the names of the files so far, "libboost_thread-vc100-mt-1_46_1.lib", they're identical to .dll files in coral 0.0.2 build, so I gues "mt" stands there for multithreading

2012/8/10 Constantine Tarasenkov <iam...@gmail.com>
Yep, I guess it should be there. Here is one more site with boost libraries for VC:  http://boost.teeks99.com/
I wonder if they are multithreaded... I hope they are at least


2012/8/10 Constantine Tarasenkov <iam...@gmail.com>
https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/boost/vc2010/lib/ 
Is it me or there is no boost_python .lib file?


2012/8/9 Constantine Tarasenkov <iam...@gmail.com>
So I finally read the user guide of scons... As I understand, it works only within Visual Studio and use VS compiler? What if I want to build program with use of MinGW-w64? I should use command prompt somehow I guess?


2012/8/9 Constantine Tarasenkov <iam...@gmail.com>
Ok. Ok. ... Can someone share a build of Coral?


2012/8/9 Hiroshi Chiyama <hchi...@gmail.com>

Sachin Shrestha

unread,
Aug 11, 2012, 11:58:52 AM8/11/12
to cora...@googlegroups.com

Thank you Constantine for your efforts!

On Aug 11, 2012 8:42 PM, "Constantine Tarasenkov" <iam...@gmail.com> wrote:
Oh, guys :D There is so many tweaks this and there to compile it properly, but I'm glad that internet is full of useful information. I'll write a step-by-step guide for x32 & x64 systems of windows and share binaries in next few days.

Just wrote it so you guys knew that I'll not drop the ball

Dorian FEVRIER

unread,
Aug 11, 2012, 2:22:22 PM8/11/12
to cora...@googlegroups.com
Yes thanks a lot Constantine! :)



De : Sachin Shrestha <noizf...@gmail.com>
À : cora...@googlegroups.com
Envoyé le : Samedi 11 août 2012 17h58

Objet : Re: [coral-app] Building Coral

Мешалкин Юрий

unread,
Aug 11, 2012, 5:42:25 PM8/11/12
to cora...@googlegroups.com
Hello, Constantine

If you are using VisualStudio, then you should start scons from 
StartMenu->MicrosoftVisualStudio->VisualStudioTools->VisualStudio x64 Command Prompt.
Or just run "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64 from windows
shell window.
In this case all environment variables (INCLUDES,LIB,PATH,...etc) will be correctly setup for compiling
and linking from command prompt by MSVC. 


On Aug 12, 2012, at 12:01 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:

Thanks, Svenni! It's helped me today, but now I have problems with linker - I don't know how to get Scons to see the file.
I tried env["LINK"] = r'"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe"' , but it's causes a syntax error, I don't know what to do now   (´・_・`)

Мешалкин Юрий

unread,
Aug 12, 2012, 6:02:32 AM8/12/12
to cora...@googlegroups.com
Constantine,
are you using 64-bit version of Python?

Hint: For different purposes, I keep 2 version of Python installed on my Windows system:
C:\Python26
C:\Python26-x64
Which one is current, depends of pathname order in PATH variable.

Scons, also has to be installed for x64 version.

On Aug 12, 2012, at 1:05 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:

Спасибо, Юрий! :)

2012/8/12 Мешалкин Юрий <yuri.me...@gmail.com>

Мешалкин Юрий

unread,
Aug 12, 2012, 7:45:58 AM8/12/12
to cora...@googlegroups.com
I suppose, that there's just one step procedure (described in SCons readme.txt)...

#python setup.py install

Certainly, again -- python.exe must be called from x64 version location.




On Aug 12, 2012, at 2:34 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:

Thanks, Yuri (again ;) )! It builds properly now. Is there a documentation that would describe steps for compiling scons for python x64?

2012/8/12 Мешалкин Юрий <yuri.me...@gmail.com>

Мешалкин Юрий

unread,
Aug 12, 2012, 10:17:30 AM8/12/12
to cora...@googlegroups.com
Are you using dynamic version of OpenEXR?
In my case, I've linked with static version of Iex.lib and Imath.lib on Windows.

e.g. in buildEnv.py I have:
os.environ["CORAL_IMATH_LIBS_PATH"]="c:/tools/OpenEXR/lib/x64/static"

On Aug 12, 2012, at 4:16 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:

msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic
_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@?$basi
c_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in Iex.lib(
IexBaseExc.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic
_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@?$ba
sic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in Iex.li
b(IexBaseExc.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic
_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@?$basi
c_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in Iex.lib(
IexBaseExc.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic
_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@?$ba
sic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in Iex.li
b(IexBaseExc.obj)
msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic
_streambuf<char,struct std::char_traits<char> >::pbase(void)const " (?pbase@?$ba
sic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ) already defined in Iex.li
b(IexBaseExc.obj)
   Creating library coral\_coral.lib and object coral\_coral.exp
coral\_coral.pyd : fatal error LNK1169: one or more multiply defined symbols fou
nd
scons: *** [coral\_coral.pyd] Error 1169
scons: building terminated because of errors.

"What seems to be the officer, problem?"

I can't just put "/nodefaultlib:msvcprt" as a linker flag, but also I can't exclude Iex library...

Мешалкин Юрий

unread,
Aug 12, 2012, 11:54:13 AM8/12/12
to cora...@googlegroups.com
As my goal was to build coral plugin for Maya, I've used tbb, that ships with Maya.

os.environ["CORAL_TBB_INCLUDE_PATH"]="C:/Autodesk/Maya2012/include"
os.environ["CORAL_TBB_LIBS_PATH"]="C:/Autodesk/Maya2012/lib"
os.environ["CORAL_TBB_LIB"]="tbb"

On Aug 12, 2012, at 6:45 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:


tbb40_20110809oss\lib\intel64\vc10\
 
Intel scares me. I've used amd64 all over the place. Is it normal or it should be recompiled?

2012/8/12 Constantine Tarasenkov <iam...@gmail.com>
Ok, I'll do dynamic linking by specifiing "/MDd" as a CXXFLAGS flag. It seems works too


2012/8/12 Constantine Tarasenkov <iam...@gmail.com>
Yes, I guess it's a dynamic libraries. I've use those:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/openexr/vc2010/ 

I found mention on the internet of LNK2005 error:

The library being linked against is expecting a /MT build. If this is a release build, try using /MT instead of /MD for compilation

I'm not compiled it so I guess /MD was used. Oh, well...


2012/8/12 Мешалкин Юрий <yuri.me...@gmail.com>
--
Constantine Tarasenkov



--
Constantine Tarasenkov

Мешалкин Юрий

unread,
Aug 12, 2012, 11:58:38 AM8/12/12
to cora...@googlegroups.com

On Aug 12, 2012, at 6:45 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:

amd64

It's just a nice name for x64 architecture on Windows, to distinguish it from x86.
Here is no scary connection to AMD processors. 

Yuri Meshalkin

unread,
Aug 12, 2012, 3:59:15 PM8/12/12
to cora...@googlegroups.com
I think, that building SDK is not very necessary (it seems that this step was not tested on Windows)
Try to run buildStandalone.py with flag build-sdk=0

#scons -f  buildStandalone.py build-sdk=0

And it looks, that you already have compiled coral standalone.


On Aug 12, 2012, at 9:50 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:

LOL

AttributeError: 'module' object has no attribute 'symlink'

scons: building terminated because of errors.

 buildStandalone.py, line 121:

    os.symlink(os.path.join(os.pardir, os.pardir, os.pardir, "coral", sourceCoralLibName), os.path.join(coralLibsDir, targetCoralLibName))
    os.symlink(os.path.join(os.pardir, os.pardir, os.pardir, "coral", "coralUi", sourceCoralUiLibName), os.path.join(coralUiLibsDir, targetCoralUiLibName))


os.symlink is only available on Unix and Unix-like operating systems (including the Mac), not Windows.


Dorian FEVRIER

unread,
Aug 12, 2012, 4:36:25 PM8/12/12
to cora...@googlegroups.com
Very good game Constantine! :)


De : Constantine Tarasenkov <iam...@gmail.com>
À : cora...@googlegroups.com
Envoyé le : Dimanche 12 août 2012 22h31

Objet : Re: [coral-app] Building Coral

Yep. Now I'll have to reproduce all those steps on another machine, this time to write a description for compiling user guide that I promised to make. Then I have to collect all the libraries for x86 version. Then I'll take a break because for five days straight I sit in front of a computer

2012/8/12 Yuri Meshalkin <yuri.me...@gmail.com>

Yuri Meshalkin

unread,
Aug 12, 2012, 6:11:15 PM8/12/12
to cora...@googlegroups.com

On Aug 13, 2012, at 12:34 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:

Where I can change it to release mode?

#scons -f buildStandalone.py build-sdk=0 mode=release

should work.

"Sveinbjörn J. Tryggvason"

unread,
Aug 13, 2012, 3:13:53 AM8/13/12
to cora...@googlegroups.com
You could also try using something like this:


I have used it and found it somewhat helpful.


-Svenni

On 13.8.2012, at 06:41, Constantine Tarasenkov wrote:

DLL load failed: The specified procedure could not be found.
 
Very informative, Python, thank you :D
Is there a way to determine which exactly he looking for?

Message has been deleted

Yuri Meshalkin

unread,
Aug 14, 2012, 5:53:42 PM8/14/12
to cora...@googlegroups.com

On Aug 15, 2012, at 12:48 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:

It's so frustrating, when you don't know where your mistake is and how to debug it.

1. Doublecheck your PATH and PYTHONPATH environment variables.
2. Collect all .dll, in folder accessible by PATH, .pyd by PYTHONPATH

Andrea Interguglielmi

unread,
Aug 14, 2012, 5:54:57 PM8/14/12
to cora...@googlegroups.com
Hi Constantine,

Not sure where you stand with this right now, but the build-sdk=1 flag is only necessary when you need to build a new c++ node, all it's supposed to do is copy some headers and dlls over to a convenient folder.
You should first try and compile coral standalone without any flag.

During this process you are required to have some good windows dll linking understanding, I sure had some head hakes myself when compiling coral on Os X.

Hope it helps a bit,
Andrea

On Tue, Aug 14, 2012 at 2:48 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:
It's so frustrating, when you don't know where your mistake is and how to debug it.

Still doesn't run. It can't find libraries that already in place. The most strange thing is that in main or SDK folders there is no .lib files, only .pyd.
Here is the log after "successful" building:

c:\coral-repo>scons -f buildStandalone.py build-sdk=1
scons: Reading SConscript files ...
* Coral Build: imported buildEnv.py
* Building standalone dev tree in debug mode
* Install Dir = c:\coral-repo\build\coralStandaloneBuild
* Build Sdk = true
* Sdk Install Dir = c:\coral-repo\build\coralStandaloneBuild\sdk
* Using parallel computation:  CORAL_PARALLEL_TBB
scons: done reading SConscript files.
scons: Building targets ...
postBuildAction(["postBuildTarget"], ["coral\_coral.pyd""coralUi\_coralUi.pyd"
"imath\Imath.pyd"])
* Building sdk...
scons: done building targets.

If someone built standalone before, - is it should be so? I just don't know what to think

Yuri Meshalkin

unread,
Aug 15, 2012, 8:39:36 AM8/15/12
to cora...@googlegroups.com

On Aug 15, 2012, at 3:25 PM, Constantine Tarasenkov <iam...@gmail.com> wrote:

Well, I guess the only way here is statically compile libraries, one by one, and check if it's help...

Yet another suggestion...
Try to use http://www.dependencywalker.com (as mentioned before) with _coral.pyd from several
directories where it is located. (Result can be differ...)

...yet 10000 buckets,  and golden key will be in our pocket! ;)
If it has compiled on your system -- it should run.

Message has been deleted

renatopolimeno

unread,
Oct 27, 2012, 2:31:03 PM10/27/12
to Мешалкин Юрий, cora...@googlegroups.com, dorian....@gmail.com
Hey guys,
first off I´ve been following coral for a while and I must confess I´m
a huge fan :)

I´m willing to restart my personal project (http://renatopolimeno.com/
m-a-r-s) using coral inside maya and maybe come up with a few rig
compounds.. However, I´ve tried to build coralStandalone by doing
everything described on repo wiki page but unfortunately I could not
complete the installation..
I don´t know what is going on, here is my screen:
https://dl.dropbox.com/u/32713116/build_coral_rp_problem.jpg

Would someone mind helping me out?

.ps
This is my first time doing such thing (cloning repo, running command
lines from git..)

Thanks in advance,

On Aug 12, 8:02 am, "Мешалкин Юрий" <yuri.meshal...@gmail.com> wrote:
> Constantine,
> are you using 64-bit version of Python?
>
> Hint: For different purposes, I keep 2 version of Python installed on my Windows system:
> C:\Python26
> C:\Python26-x64
> Which one is current, depends of pathname order in PATH variable.
>
> Scons, also has to be installed for x64 version.
>
> On Aug 12, 2012, at 1:05 AM, Constantine Tarasenkov <iam...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Спасибо, Юрий! :)
>
> > 2012/8/12 Мешалкин Юрий <yuri.meshal...@gmail.com>

Andrea Interguglielmi

unread,
Oct 27, 2012, 6:19:15 PM10/27/12
to cora...@googlegroups.com, Мешалкин Юрий, dorian....@gmail.com
Hi Renato,

For as much as it hurts saying that, I would steer away from using coral as the base for your project, simply because nobody is actively maintaining it.

Andrea

Renato Polimeno

unread,
Oct 29, 2012, 1:19:18 PM10/29/12
to cora...@googlegroups.com
Oh.. that is sad :(
--
______________________________
 
-> Renato Polimeno
facebook. renato.polimeno
twitter. @renatopolimeno
skype. renatopolimeno

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages