shared_ptr.hpp & Intel C++ error

I'm routinely testing Boost.Python compilation with Intel C++ under Fedora 3 (64-bit). Today I tried Fedora 5, 6, 9, and I'm getting the error below. It can be reproduced by simply including boost/shared_ptr.hpp. I tried adding -pthread but it didn't make a difference. Is this a known problem? Is there a trick to get around it? Ralf P.S.: Intel C++ 9.1 behaves the same way. boost trunk svn revision 46049 % cat include_boost_shared.cpp #include <boost/shared_ptr.hpp> % icpc -V Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 10.1 Build 20080312 Package ID: l_cc_p_10.1.015 Copyright (C) 1985-2008 Intel Corporation. All rights reserved. FOR NON-COMMERCIAL USE ONLY % icpc -I/net/rosie/scratch1/rwgk/hot/boost -c include_boost_shared.cpp /net/rosie/scratch1/rwgk/hot/boost/boost/detail/spinlock_sync.hpp(36): error: identifier "__sync_lock_test_and_set" is undefined int r = __sync_lock_test_and_set( &v_, 1 ); ^ /net/rosie/scratch1/rwgk/hot/boost/boost/detail/spinlock_sync.hpp(50): error: identifier "__sync_lock_release" is undefined __sync_lock_release( &v_ ); ^ compilation aborted for include_boost_shared.cpp (code 2)

Ralf W. Grosse-Kunstleve:
% icpc -I/net/rosie/scratch1/rwgk/hot/boost -c include_boost_shared.cpp /net/rosie/scratch1/rwgk/hot/boost/boost/detail/spinlock_sync.hpp(36): error: identifier "__sync_lock_test_and_set" is undefined int r = __sync_lock_test_and_set( &v_, 1 ); ^
This is a bug in spinlock_sync.hpp; the problem is described in http://svn.boost.org/trac/boost/ticket/1938 I've added the same fix to spinlock_sync.hpp (in revision 46055). Thanks for pointing it out. Have you considered running the smart_ptr and bind tests on a regular basis and uploading the results ;-)

I'm routinely testing Boost.Python compilation with Intel C++ under Fedora >3 (64-bit). Today I tried Fedora 5, 6, 9, and I'm getting the error below. It can be reproduced by simply including boost/shared_ptr.hpp. I tried adding -pthread but it didn't make a difference. Is this a known problem? Is
Ralf wrote: there
a trick to get around it?
P.S.: Intel C++ 9.1 behaves the same way.
Ralf, I tried to reproduce your problem and was unable to:
cat test3.cpp #include <boost/shared_ptr.hpp> int main() { return 0;} //so that I don't get main undefined error /usr/intel/pkgs/icc/10.0.026/bin/icc -I ~/30days/boost-trunk test3.cpp sysname -cpu x86-64
It also works with icc 9.0
/usr/intel/pkgs/icc/9.0.030/bin/icc -I ~/30days/boost-trunk test3.cpp
Note: no compiler errors. That was from the boost trunk from when I checked it out on May 22nd. I also tried it with the top of trunk boost as of today this minute:
/usr/intel/pkgs/icc/9.0.030/bin/icc -I ~/30days/boost-trunk test3.cpp /usr/intel/pkgs/icc/10.0.026/bin/icc -I ~/30days/boost-trunk test3.cpp
Again, no compiler errors. I can't tell you why you get errors, while I don't. It could be that I'm being dense and didn't understand your problem. I'm not using Fedora, but I don't see why that would matter. Happy hunting. (I am not in the compiler group at Intel, I work in a different group.) Luke
participants (3)
-
Peter Dimov
-
Ralf W. Grosse-Kunstleve
-
Simonson, Lucanus J