Page 1 of 1

openexr build problem with scons mingw

Posted: Mon Jan 22, 2007 10:17 pm
by adrian
For a while now i have not been able to compile openexr with scons/mingw.
Win xp pro, athlon64 3200(used as 32bit).
I have all the libraries.
I had to change my user-config.py to shown below(crashed on render with previous config file and sse ets flags):-

"
WITH_BF_OPENAL = 'false'
WITH_BF_GAMEENGINE='false'
WITH_BF_BULLET = 'false'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_ODE = 'false'
WITH_BF_OPENEXR = 'false'
WITH_BF_FTGL = 'false'
WITH_BF_FMOD = 'false'
WITH_BF_SDL = 'false'
WITH_BF_FFMPEG = 'false'
WITH_BF_QUICKTIME = 'false'
BF_PYTHON_VERSION = '2.4'
WITH_BF_YAFRAY = 'false'

CCFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = [ '-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing']

CCFLAGS.extend( ['-O3', '-march=athlon', '-fomit-frame-pointer', '-ffast-math','-mmmx'])
CXXFLAGS.extend( ['-O3', '-march=athlon', '-fomit-frame-pointer', '-ffast-math','-mmmx'])
"

Any suggestions re openexr and optimized flags that work?

Adrian.

Posted: Mon Jan 22, 2007 10:43 pm
by stiv
Any suggestions re openexr and optimized flags that work?
Are you having trouble compiling or running?

if compiling, tell us the error msg. the first one.

if running, change -O3 to -O2 and get rid of -ffast-math.

Posted: Tue Jan 23, 2007 2:25 am
by adrian
Yes its a compiling problem i have, dumps these errors at the end.
Appreciate your suggestions:


""""""Compiling ==> 'buildinfo.c'
Linking program ==> 'blender.exe'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfAttribute.o)(.text$_ZNSt8_Rb
_treeIPKcSt4pairIKS1_PFPN3Imf9AttributeEvEESt10_Select1stIS9_ENS4_32_GLOBAL__N__
ZN3Imf9AttributeC2Ev11NameCompareESaIS9_EE9_M_insertEPSt18_Rb_tree_node_baseSH_R
KS9_[__ZNSt8_Rb_treeIPKcSt4pairIKS1_PFPN3Imf9AttributeEvEESt10_Select1stIS9_ENS4
_32_GLOBAL__N__ZN3Imf9AttributeC2Ev11NameCompareESaIS9_EE9_M_insertEPSt18_Rb_tre
e_node_baseSH_RKS9_]+0x9f):ImfAttribute.cpp: undefined reference to `std::_Rb_tr
ee_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*
, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfAttribute.o)(.text$_ZNSt17_R
b_tree_iteratorISt4pairIKPKcPFPN3Imf9AttributeEvEEEmmEv[__ZNSt17_Rb_tree_iterato
rISt4pairIKPKcPFPN3Imf9AttributeEvEEEmmEv]+0x13):ImfAttribute.cpp: undefined ref
erence to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfAttribute.o)(.text$_ZNSt17_R
b_tree_iteratorISt4pairIKPKcPFPN3Imf9AttributeEvEEEppEi[__ZNSt17_Rb_tree_iterato
rISt4pairIKPKcPFPN3Imf9AttributeEvEEEppEi]+0x1b):ImfAttribute.cpp: undefined ref
erence to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfAttribute.o)(.text$_ZNSt8_Rb
_treeIPKcSt4pairIKS1_PFPN3Imf9AttributeEvEESt10_Select1stIS9_ENS4_32_GLOBAL__N__
ZN3Imf9AttributeC2Ev11NameCompareESaIS9_EE5eraseESt17_Rb_tree_iteratorIS9_E[__ZN
St8_Rb_treeIPKcSt4pairIKS1_PFPN3Imf9AttributeEvEESt10_Select1stIS9_ENS4_32_GLOBA
L__N__ZN3Imf9AttributeC2Ev11NameCompareESaIS9_EE5eraseESt17_Rb_tree_iteratorIS9_
E]+0x17):ImfAttribute.cpp: undefined reference to `std::_Rb_tree_rebalance_for_e
rase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfAttribute.o)(.text$_ZNSt17_R
b_tree_iteratorISt4pairIKPKcPFPN3Imf9AttributeEvEEEppEv[__ZNSt17_Rb_tree_iterato
rISt4pairIKPKcPFPN3Imf9AttributeEvEEEppEv]+0x13):ImfAttribute.cpp: undefined ref
erence to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfInputFile.o)(.text$_ZNSt17_R
b_tree_iteratorISt4pairIKN3Imf4NameENS1_5SliceEEEppEv[__ZNSt17_Rb_tree_iteratorI
St4pairIKN3Imf4NameENS1_5SliceEEEppEv]+0x13):ImfInputFile.cpp: undefined referen
ce to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfInputFile.o)(.text$_ZNSt23_R
b_tree_const_iteratorISt4pairIKN3Imf4NameENS1_5SliceEEEppEv[__ZNSt23_Rb_tree_con
st_iteratorISt4pairIKN3Imf4NameENS1_5SliceEEEppEv]+0x13):ImfInputFile.cpp: undef
ined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfTiledOutputFile.o)(.text$_ZN
St23_Rb_tree_const_iteratorISt4pairIKN3Imf4NameENS1_7ChannelEEEppEv[__ZNSt23_Rb_
tree_const_iteratorISt4pairIKN3Imf4NameENS1_7ChannelEEEppEv]+0x13):ImfTiledOutpu
tFile.cpp: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_ba
se const*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfTiledOutputFile.o)(.text$_ZN
St17_Rb_tree_iteratorISt4pairIKN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfT
iledOutputFile.cpp_3F6EE7DC_4F3E7C8F9TileCoordEPNS2_12BufferedTileEEEppEv[__ZNSt
17_Rb_tree_iteratorISt4pairIKN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTil
edOutputFile.cpp_3F6EE7DC_4F3E7C8F9TileCoordEPNS2_12BufferedTileEEEppEv]+0x13):I
mfTiledOutputFile.cpp: undefined reference to `std::_Rb_tree_increment(std::_Rb_
tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfTiledOutputFile.o)(.text$_ZN
St8_Rb_treeIN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTiledOutputFile.cpp_
3F6EE7DC_4F3E7C8F9TileCoordESt4pairIKS2_PNS1_12BufferedTileEESt10_Select1stIS7_E
St4lessIS2_ESaIS7_EE5eraseESt17_Rb_tree_iteratorIS7_E[__ZNSt8_Rb_treeIN3Imf78_GL
OBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTiledOutputFile.cpp_3F6EE7DC_4F3E7C8F9Tile
CoordESt4pairIKS2_PNS1_12BufferedTileEESt10_Select1stIS7_ESt4lessIS2_ESaIS7_EE5e
raseESt17_Rb_tree_iteratorIS7_E]+0x17):ImfTiledOutputFile.cpp: undefined referen
ce to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree
_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfTiledOutputFile.o)(.text$_ZN
St8_Rb_treeIN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTiledOutputFile.cpp_
3F6EE7DC_4F3E7C8F9TileCoordESt4pairIKS2_PNS1_12BufferedTileEESt10_Select1stIS7_E
St4lessIS2_ESaIS7_EE9_M_insertEPSt18_Rb_tree_node_baseSF_RKS7_[__ZNSt8_Rb_treeIN
3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTiledOutputFile.cpp_3F6EE7DC_4F3E
7C8F9TileCoordESt4pairIKS2_PNS1_12BufferedTileEESt10_Select1stIS7_ESt4lessIS2_ES
aIS7_EE9_M_insertEPSt18_Rb_tree_node_baseSF_RKS7_]+0x99):ImfTiledOutputFile.cpp:
undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_
node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfTiledOutputFile.o)(.text$_ZN
St17_Rb_tree_iteratorISt4pairIKN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfT
iledOutputFile.cpp_3F6EE7DC_4F3E7C8F9TileCoordEPNS2_12BufferedTileEEEmmEv[__ZNSt
17_Rb_tree_iteratorISt4pairIKN3Imf78_GLOBAL__N_.._.._OpenEXR_1.2.2_IlmImf_ImfTil
edOutputFile.cpp_3F6EE7DC_4F3E7C8F9TileCoordEPNS2_12BufferedTileEEEmmEv]+0x13):I
mfTiledOutputFile.cpp: undefined reference to `std::_Rb_tree_decrement(std::_Rb_
tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfChannelList.o)(.text$_ZNSt17
_Rb_tree_iteratorISt4pairIKN3Imf4NameENS1_7ChannelEEEppEv[__ZNSt17_Rb_tree_itera
torISt4pairIKN3Imf4NameENS1_7ChannelEEEppEv]+0x13):ImfChannelList.cpp: undefined
reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfChannelList.o)(.text$_ZNSt8_
Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE9_M_insertEPSt18_Rb_tree_node_base
S7_RKSs[__ZNSt8_Rb_treeISsSsSt9_IdentityISsESt4lessISsESaISsEE9_M_insertEPSt18_R
b_tree_node_baseS7_RKSs]+0x99):ImfChannelList.cpp: undefined reference to `std::
_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node
_base*, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfChannelList.o)(.text$_ZNSt17
_Rb_tree_iteratorISsEmmEv[__ZNSt17_Rb_tree_iteratorISsEmmEv]+0x13):ImfChannelLis
t.cpp: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)
'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfChannelList.o)(.text$_ZNSt8_
Rb_treeIN3Imf4NameESt4pairIKS1_NS0_7ChannelEESt10_Select1stIS5_ESt4lessIS1_ESaIS
5_EE9_M_insertEPSt18_Rb_tree_node_baseSD_RKS5_[__ZNSt8_Rb_treeIN3Imf4NameESt4pai
rIKS1_NS0_7ChannelEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE9_M_insertEPSt18_Rb_t
ree_node_baseSD_RKS5_]+0x99):ImfChannelList.cpp: undefined reference to `std::_R
b_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_b
ase*, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfChannelList.o)(.text$_ZNSt17
_Rb_tree_iteratorISt4pairIKN3Imf4NameENS1_7ChannelEEEmmEv[__ZNSt17_Rb_tree_itera
torISt4pairIKN3Imf4NameENS1_7ChannelEEEmmEv]+0x13):ImfChannelList.cpp: undefined
reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt17_Rb_t
ree_iteratorISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEv[__ZNSt17_Rb_tree_iterato
rISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEv]+0x13):ImfHeader.cpp: undefined ref
erence to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt23_Rb_t
ree_const_iteratorISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEv[__ZNSt23_Rb_tree_c
onst_iteratorISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEv]+0x13):ImfHeader.cpp: u
ndefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt17_Rb_t
ree_iteratorISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEi[__ZNSt17_Rb_tree_iterato
rISt4pairIKN3Imf4NameEPNS1_9AttributeEEEppEi]+0x1b):ImfHeader.cpp: undefined ref
erence to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt8_Rb_tr
eeIN3Imf4NameESt4pairIKS1_PNS0_9AttributeEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_
EE5eraseESt17_Rb_tree_iteratorIS6_E[__ZNSt8_Rb_treeIN3Imf4NameESt4pairIKS1_PNS0_
9AttributeEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE5eraseESt17_Rb_tree_iteratorI
S6_E]+0x17):ImfHeader.cpp: undefined reference to `std::_Rb_tree_rebalance_for_e
rase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt8_Rb_tr
eeIN3Imf4NameESt4pairIKS1_PNS0_9AttributeEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_
EE9_M_insertEPSt18_Rb_tree_node_baseSE_RKS6_[__ZNSt8_Rb_treeIN3Imf4NameESt4pairI
KS1_PNS0_9AttributeEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE9_M_insertEPSt18_Rb_
tree_node_baseSE_RKS6_]+0x99):ImfHeader.cpp: undefined reference to `std::_Rb_tr
ee_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*
, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfHeader.o)(.text$_ZNSt17_Rb_t
ree_iteratorISt4pairIKN3Imf4NameEPNS1_9AttributeEEEmmEv[__ZNSt17_Rb_tree_iterato
rISt4pairIKN3Imf4NameEPNS1_9AttributeEEEmmEv]+0x13):ImfHeader.cpp: undefined ref
erence to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfFrameBuffer.o)(.text$_ZNSt8_
Rb_treeIN3Imf4NameESt4pairIKS1_NS0_5SliceEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_
EE9_M_insertEPSt18_Rb_tree_node_baseSD_RKS5_[__ZNSt8_Rb_treeIN3Imf4NameESt4pairI
KS1_NS0_5SliceEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE9_M_insertEPSt18_Rb_tree_
node_baseSD_RKS5_]+0x99):ImfFrameBuffer.cpp: undefined reference to `std::_Rb_tr
ee_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*
, std::_Rb_tree_node_base&)'
C:\build\lib\windows\gcc\openexr\lib/libIlmImf.a(ImfFrameBuffer.o)(.text$_ZNSt17
_Rb_tree_iteratorISt4pairIKN3Imf4NameENS1_5SliceEEEmmEv[__ZNSt17_Rb_tree_iterato
rISt4pairIKN3Imf4NameENS1_5SliceEEEmmEv]+0x13):ImfFrameBuffer.cpp: undefined ref
erence to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
scons: *** [C:\build\install\bin\blender.exe] Error 1
scons: building terminated because of errors.
C:\build\blender>pause

Posted: Tue Jan 23, 2007 2:39 am
by stiv
The undefined refs to std::_Rb* come from a missing libstdc++ . You need to install it if you don't have it. If you have it, you may need to add it to LLIBS in your scons config file.

Posted: Tue Jan 23, 2007 6:52 am
by jesterKing
Hmm, I think the openexr libs need to be recompiled statically before they are readded to the lib/windows folder. They used to work before they got updated to the current version.

/Nathan

Posted: Wed Mar 07, 2007 3:16 pm
by adrian
I still am unable to ming/scons build blender with openexr, and would really like to.
All the above errors still applicable.

Presumably the libraries that come with the source are ok for building, I did also try the libs found at geneome site.
Do i need to have openexr installed?

Any help please.

Posted: Thu Sep 17, 2009 5:08 am
by psy-fi
Problem persists in beta builds of 2.50
Compilation with WITH_BF_OPENEXR='false' goes smothly but crashes with 'true'.
If anyone finds the cause please notify.

user-config.py

Posted: Thu Sep 17, 2009 9:55 pm
by Zebulon
I used this settings in the user-config.py

Code: Select all

WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
... it did compile

Kind regards,
Zebulon

Posted: Sat Sep 19, 2009 3:54 pm
by psy-fi
Well, thanks but actually '/gcc/openexr' doesn't exist in my compiler or lib/windows/openexr trees so it didn't work..where did you get the exr files from anyway(And where did you place them?)?Thanks again!

edit: Well, I found the files but the lines of code you mention are already in win32-mingw-config.py file..

User-config.py

Posted: Mon Sep 21, 2009 9:20 pm
by Zebulon
psy-fi wrote: edit: Well, I found the files but the lines of code you mention are already in win32-mingw-config.py file..
What I do is - I copy the win32-mingw-config.py to the blender root and rename it to user-config.py

Posted: Tue Sep 22, 2009 9:41 am
by psy-fi
Really thanks for your quick answers but,unfortunately, that did't work either. Guess I 'll have to wait for the official builds..However, any other ideas are very welcome!

Posted: Tue Sep 22, 2009 5:17 pm
by stiv
You need to set the include and lib paths to match what is installed on your system.

Do you have the basics?

Posted: Tue Sep 22, 2009 9:47 pm
by Zebulon
psy-fi wrote:Well, thanks but actually '/gcc/openexr' doesn't exist in my compiler or lib/windows/openexr trees so it didn't work..where did you get the exr files from anyway(And where did you place them?)?Thanks again!

edit: Well, I found the files but the lines of code you mention are already in win32-mingw-config.py file..
Do you have the right setup?
You need the svn checkout for the blender source and also the source for Lib/Windows.

https://svn.blender.org/svnroot/bf-blen ... nk/blender
https://svn.blender.org/svnroot/bf-blen ... ib/windows

- blender
- Lib/Windows

openexr source is in the /lib/windows directory

The svn source is fine and works with mingw and msvc

Posted: Wed Sep 23, 2009 12:23 pm
by psy-fi
@stiv: I don't see how this is relevant since the mingw-config file uses relative paths. Anyway, I tried with no success.

@Zebulon: Yeah, I have downloaded both /blender and /lib/widows and put them in the correct directories(proof is that openexr off compiles). Actually, let me be specific, everything -compiles- but the link phase fails(When linking blender.exe, so everything is compiled)

Today (revision 23433) the errors when using the provided config file are not 100 pages of undefined references to openexr functions, simply linker 'cannot find imath', which is an improvement I guess, and quite normal since libimath.a is indeed not in the lib/windows/gcc/openexr/lib directory but present in the lib\windows\openexr\lib.
My own config file which is simply

Code: Select all

CCFLAGS =   ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = [ '-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]

# Add extra flags
CCFLAGS.extend(   [ '-march=prescott', '-O3', '-fomit-frame-pointer', '-msse3'] )
CXXFLAGS.extend( [ '-march=prescott', '-O3', '-fomit-frame-pointer', '-msse3'] )
and still sports the undefined references however.

I even tried building OpenEXR from source (version 1.6) with msys config-make but link phase fails again with a strange error (Cannot find libstd++.dll.a which should be libstd++.a) which may be a configuration or linker error/bug.

My gcc version is 4.4.0, it may be important since programs compiled require a few extra dll's to run.

Well, building some non-OpenEXR build right now!

Posted: Mon Sep 28, 2009 6:37 pm
by psy-fi
I would like to inform everyone that after release 23543 and an update to gcc 4.4.1, problem is fixed. My assumption is that it was a linker issue since imath is still absent from lib.
Anyway, thanks everyone!