[Bf-committers] linking error on OS X

Jean-Luc Peurière jlp at nerim.net
Wed Aug 23 20:49:15 CEST 2006


Le 23 août 06 à 10:49, Randall Rickert a écrit :

> I've been trying to build from CVS for the for the past week, for  
> the first time since the 2.42 release. I had no trouble building  
> just before 2.42. All of the objects seem to compile okay, but  
> linking fails. This is the tail of the output from Scons:
> Linking program ==> 'blender'
> /usr/bin/ld: Undefined symbols:
> std::basic_string<char, std::char_traits<char>,  
> std::allocator<char> >::_S_empty_rep_storage
> std::basic_string<char, std::char_traits<char>,  
> std::allocator<char> >::_Rep::_S_create(unsigned long,  
> std::allocator<char> const&)
> __ZNSaIcED4Ev
> __ZNSt15basic_streambufIcSt11char_traitsIcEEC4Ev
> __ZNSt15basic_streambufIcSt11char_traitsIcEED4Ev
> std::__default_alloc_template<true, 0>::deallocate(void*, unsigned  
> long)
> std::__default_alloc_template<true, 0>::_S_force_new
> std::__default_alloc_template<true, 0>::_S_free_list
> std::__default_alloc_template<true, 0>::_S_node_allocator_lock
> __ZNSt24__default_alloc_templateILb1ELi0EE5_LockD4Ev
> std::__default_alloc_template<true, 0>::allocate(unsigned long)
> std::__default_alloc_template<true, 0>::_S_refill(unsigned long)
> __ZNSt24__default_alloc_templateILb1ELi0EE5_LockC4Ev
> collect2: ld returned 1 exit status
> scons: *** [/develop/build/darwin/bin/blender] Error 1
> scons: building terminated because of errors.
>
> Does anyone have some ideas? Maybe it's just a problem on OS X, or  
> maybe my build environment is broken?
>
>

this is gcc4 not finding libc++ on 10.4 when linking C files calling  
a C++ library.


unfortunately,  between gcc4, gcc3.3, 10.3.9, 10.4, version of xcode,  
player and international  options, dynamic or static libc++ and some  
changes
  in the system frameworks, There is not a single patch that will  
insure compilation in all cases with scons. i passed a lot of time  
trying
and failed. I suppose phases of the moon is also a factor.

Thought, usually it is more make than scons which is dificult to  
configure.

First be sure to use the precompiled openal in lib/darwin-8.0.0- 
powerpc and not the one in   darwin-6.1-powerpc
in the same idea, check that your openEXR lib is a 10.4 one.
do a scons clean if it is not the case.


then try to define the following in your user config.py :

CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing',  
'-fpascal-strings', '-fexceptions']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing',  
'-fpascal-strings, '-fexceptions']

lastly try to define LD= 'g++' in your user config file, works in  
many cases



Lukep


More information about the Bf-committers mailing list