Boost logo

Boost :

From: Alkis Evlogimenos (alkis_at_[hidden])
Date: 2002-10-04 02:21:50


Hi all,

I have been running the regression tests of the 1.29 branch as part of
building boost for use with gcc 2.95.1 and gcc 2.96-112, both with STLport
4.5.3.

Because in the ios_state_tests I was getting the following link errors:

/usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a(_eh.o): In function
`eh_threads_initialize':
/usr/src/build/122589-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x231):
undefined reference to `pthread_key_create'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a(_eh.o): In function
`eh_context_specific':
/usr/src/build/122589-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x38b):
undefined reference to `pthread_getspecific'
/usr/src/build/122589-i386/BUILD/gcc-2.96-20000731/obj-i386-redhat-linux/gcc/../../gcc/libgcc2.c(.text+0x3ab):
undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status

I modified tools/build/gcc-stlport-tools.jam as follows:

diff -r1.6 gcc-stlport-tools.jam
40,43c40,43
< flags gcc-stlport FINDLIBS <runtime-link>static/<runtime-build>debug :
stlport_$(GCC_STLPORT_LIB_ID)_stldebug ;
< flags gcc-stlport FINDLIBS <runtime-link>static/<runtime-build>release :
stlport_$(GCC_STLPORT_LIB_ID) ;
< flags gcc-stlport FINDLIBS <runtime-link>dynamic/<runtime-build>debug :
stlport_$(GCC_STLPORT_LIB_ID)_stldebug ;
< flags gcc-stlport FINDLIBS <runtime-link>dynamic/<runtime-build>release :
stlport_$(GCC_STLPORT_LIB_ID) ;

---
> flags gcc-stlport FINDLIBS <runtime-link>static/<runtime-build>debug    : 
stlport_$(GCC_STLPORT_LIB_ID)_stldebug pthread ;
> flags gcc-stlport FINDLIBS <runtime-link>static/<runtime-build>release  : 
stlport_$(GCC_STLPORT_LIB_ID) pthread ;
> flags gcc-stlport FINDLIBS <runtime-link>dynamic/<runtime-build>debug    : 
stlport_$(GCC_STLPORT_LIB_ID)_stldebug pthread ;
> flags gcc-stlport FINDLIBS <runtime-link>dynamic/<runtime-build>release  : 
stlport_$(GCC_STLPORT_LIB_ID) pthread ;
I am not sure this is an appropriate fix but it prevents the pthread relevant 
link errors (it seems that STLport uses some pthread functions but doesn't 
add the pthread relevant code in the static library nor it dynamically links 
it to the shared one). All tests were run using the above patch. Here are the 
test cases that failed:
(I put the error line first even though it says "failed above test: ..." :-) )
***************** failed above test: bind_test  ********************
/n/build/alkise/boost/libs/bind/bind_test.cpp:193: template argument 1 is 
invalid
relevant code:
    bind<void>(Y(), i, _1, 9, 4)(k);
    BOOST_TEST( global_result == 4938 );
This happens in both gcc 2.95.1 and gcc 2.96-112. Is this supposed to work in 
any of the two compilers?
***************** failed above test: testtime_resolution_traits  
********************
/n/build/alkise/boost/boost/libs/date_time/test/testtime_resolution_traits.cpp: 
In function `int main()':
/n/build/alkise/boost/boost/libs/date_time/test/testtime_resolution_traits.cpp:46: 
integer constant out of range
/n/build/alkise/boost/boost/libs/date_time/test/testtime_resolution_traits.cpp:46: 
warning: decimal integer constant is so large that it is unsigned
This fails on gcc2.95.1. Applying the following patch makes the test succeed:
diff -r1.4 testtime_resolution_traits.cpp
46c46
<         nano_res::to_tick_count(0,1,0,0) == 60000000000);
---
>         nano_res::to_tick_count(0,1,0,0) == 60000000000LL);
***************** failed above test: ios_state_test  ********************
The original data is:
        Hello world
        -16
        34.5679
        true
Exception in "call_test_main": std::runtime_error: locale error
*** Test case "call_test_main" is aborted due to uncaught exception or fatal 
error
Both compilers fail this one. I wonder if this is an STLport configuration 
issue...
***************** failed above test: exception_test  ********************
gcc-C++-action 
../status/bin/exception_test.test/gcc-stlport/debug/runtime-link-dynamic/exception_test.o
In file included from 
/home/alkis/projects/imported/boost/libs/lambda/test/exception_test.cpp:6:
/home/alkis/projects/imported/boost/boost/lambda/exceptions.hpp: In method 
`RET boost::lambda::lambda_functor_base<boost::lambda::action<3,
boost::lambda::try_catch_action<boost::lambda::catch_action<boost::lambda::detail::catch_block<Catch1>,
boost::lambda::detail::catch_block<Catch2>, boost::tuples::null_type, 
boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >, Args>::call (A &, B 
&, C &, Env &) const':
/home/alkis/projects/imported/boost/boost/lambda/exceptions.hpp:821: Internal 
error #92.
/home/alkis/projects/imported/boost/boost/lambda/exceptions.hpp:821: confused 
by earlier errors,
bailing out
only gcc2.96 is failed this one... It seems that prerelease versions of gcc3.0 
had some issues with catch clauses, too. The problem looks similar enough: 
http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00713.html
***************** failed above test: quaternion_test  ********************
***************** failed above test: octonion_test  ********************
Both failed this one. Judging from compiler status for 1.28 I guess this was 
expected.
***************** failed above test: common_factor_test  ********************
**************** failed above test: test_pool_alloc  ********************
Both common_factor and test_pool fail on the same error:
gcc-C++-action 
../status/bin/common_factor_test.test/gcc-stlport/debug/runtime-link-dynamic/common_factor_test.o
/home/alkis/projects/imported/boost/boost/math/common_factor_ct.hpp:46: sorry, 
not implemented: `
static_cast_expr' not supported by dump_expr
/home/alkis/projects/imported/boost/boost/math/common_factor_ct.hpp:46: sorry, 
not implemented: `
static_cast_expr' not supported by dump_expr
/home/alkis/projects/imported/boost/boost/math/common_factor_ct.hpp:46: sorry, 
not implemented: `
static_cast_expr' not supported by dump_expr
/home/alkis/projects/imported/boost/boost/math/common_factor_ct.hpp:46: sorry, 
not implemented: `
static_cast_expr' not supported by dump_expr
***************** failed above test: wide_posix_api_check  
********************
gcc-C++-action 
../status/bin/wide_posix_api_check.test/gcc-stlport/debug/runtime-link-dynamic/wide_posix_api_check.o
/home/alkis/projects/imported/boost/libs/regex/test/c_compiler_checks/wide_posix_api_check.cpp: 
In
function `int main ()':                                                         
/home/alkis/projects/imported/boost/libs/regex/test/c_compiler_checks/wide_posix
_api_check.cpp:52: `wprintf'                                                    
undeclared (first use this function)
/home/alkis/projects/imported/boost/libs/regex/test/c_compiler_checks/wide_posix_api_check.cpp:52: 
(Each
undeclared identifier is reported only once for each function it appears in.)
This looks more like a glibc issue. It failed on both compilers.
***************** failed above test: wide_posix_api_check_c  
*******************
gcc-Link-action 
../status/bin/wide_posix_api_check_c.test/gcc-stlport/debug/runtime-link-dynamic/wide_posix_api_check_c
../status/bin/wide_posix_api_check_c.test/gcc-stlport/debug/runtime-link-dynamic/wide_posix_api_check.o: 
In function `main':
/n/build/alkise/boost/boost/libs/regex/test/c_compiler_checks/wide_posix_api_check.c:52: 
undefined reference to `wprintf'
/n/build/alkise/boost/boost/libs/regex/test/c_compiler_checks/wide_posix_api_check.c:63: 
undefined reference to `wprintf'
collect2: ld returned 1 exit status
Ok now I am confused... This one failed only on gcc2.95.1
***************** failed above test: numeric_traits_test  ********************
gcc-C++-action 
../status/bin/numeric_traits_test.test/gcc-stlport/debug/runtime-link-dynamic/numeric_traits_test.o                                              
/n/build/alkise/boost/boost/libs/utility/numeric_traits_test.cpp: In function 
`void test_aux<__wchar_t>(unsigned_tag, __wchar_t * = 0)':                        
/n/build/alkise/boost/boost/libs/utility/numeric_traits_test.cpp:361:   
instantiated from `test<__wchar_t>(__wchar_t *)'                                        
/n/build/alkise/boost/boost/libs/utility/numeric_traits_test.cpp:370:   
instantiated from here                                                                  
/n/build/alkise/boost/boost/libs/utility/numeric_traits_test.cpp:226: 
`sizeof' applied to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>'
gcc2.95.1 again
***************** failed above test: iterators  ********************
gcc-C++-action 
../status/bin/iterators.test/gcc-stlport/debug/runtime-link-dynamic/iterators.o                                                                  
/n/build/alkise/trunk/include/stlport/stl/_num_put.c: In method `class 
_STL::ostreambuf_iterator<char,_STL::char_traits<char> > 
_STL::num_put<char,_STL::ostreambuf_iterator<char,_STL::char_traits<char> > 
>::do_put(_STL::ostreambuf_iterator<char,_STL::char_traits<char> >, 
_STL::ios_base &, char, long unsigned int) const':                                                                              
/n/build/alkise/trunk/include/stlport/stl/_num_put.h:68:   instantiated from 
`_STL::num_put<char,_STL::ostreambuf_iterator<char,_STL::char_traits<char> > 
>::put(_STL::ostreambuf_iterator<char,_STL::char_traits<char> >, 
_STL::ios_base &, char, long unsigned int) const'                                                    
/n/build/alkise/trunk/include/stlport/stl/_ostream.c:198:   instantiated from 
`_STL::_M_put_num<char, _STL::char_traits<char>, long unsigned 
int>(_STL::basic_ostream<char,_STL::char_traits<char> > &, long unsigned 
int)'                     
/n/build/alkise/trunk/include/stlport/stl/_ostream.h:101:   instantiated from 
here                                                                              
/n/build/alkise/trunk/include/stlport/stl/_num_put.c:468: Internal compiler 
error in `assign_stack_temp_for_type', at function.c:937                            
Please submit a full bug report.                                                
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for 
instructions.
gcc2.95.1 failed again. Seems like a sign of a need to upgrade :-)
Any suggestions on workarounds? I understand that 2.95.1 is a little bit 
prehestoric, but any help is appreciated.
Thanks,
-- 
Alkis

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk