Has anyone successfully built boost/thread on Linux using g++ ?. I am getting two compilation errors. Seb.
In file included from libs/thread/build/../src/thread.cpp:23: libs/thread/build/../src/timeconv.inl: In function `void {anonymous}::to_time(unsigned int, boost::xtime &)': libs/thread/build/../src/timeconv.inl:26: warning: comparison between signed and unsigned gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/tss.o gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o libs/thread/build/../src/xtime.cpp:47: #error "xtime_get implementation undefined" g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-inline - I"libs/thread/build" -I"/home/smarc/boost_1_25_0" - o "libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o" "libs/thread/build/../src/xtime.cpp" ...failed gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o ... gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/once.o libs/thread/build/../src/once.cpp: In function `void do_once(...)': libs/thread/build/../src/once.cpp:41: ANSI C++ forbids casting between pointers to functions and objects I fixed the xtime_get error by defining BOOST_HAS_GETTIMEOFDAY. It would be nice if it could get enabled by default though. For the second one, i replaced the reinterpret_cast with a C-style cast. I'm not sure that's the best way to fix it though. Seb. --- In Boost-Users@y..., williamkempf@h... wrote:
--- In Boost-Users@y..., sebmarc@y... wrote:
Has anyone successfully built boost/thread on Linux using g++ ?.
I am getting two compilation errors.
Seb.
Please post the errors you're getting.
Bill Kempf
--- In Boost-Users@y..., sebmarc@y... wrote:
In file included from libs/thread/build/../src/thread.cpp:23: libs/thread/build/../src/timeconv.inl: In function `void {anonymous}::to_time(unsigned int, boost::xtime &)': libs/thread/build/../src/timeconv.inl:26: warning: comparison between signed and unsigned gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/tss.o gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o libs/thread/build/../src/xtime.cpp:47: #error "xtime_get implementation undefined"
g++ -c -Wall -ftemplate-depth-100 -g -O0 -fno-inline - I"libs/thread/build" -I"/home/smarc/boost_1_25_0" - o "libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o" "libs/thread/build/../src/xtime.cpp"
...failed gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/xtime.o ... gcc-C++-action libs/thread/build/bin/libboost_thread/gcc/debug/runtime-link- dynamic/once.o libs/thread/build/../src/once.cpp: In function `void do_once(...)': libs/thread/build/../src/once.cpp:41: ANSI C++ forbids casting between pointers to functions and objects
I fixed the xtime_get error by defining BOOST_HAS_GETTIMEOFDAY. It would be nice if it could get enabled by default though.
This is a problem with the new config system that will be worked out before the next release.
For the second one, i replaced the reinterpret_cast with a C-style cast. I'm not sure that's the best way to fix it though.
I may have introduced a bug here. I'll look into in more detail when I get a chance and it will be fixed before the next release. Thanks for the report. Bill Kempf
I fixed the xtime_get error by defining BOOST_HAS_GETTIMEOFDAY. It would be nice if it could get enabled by default though.
Thanks, that got it working for me. The examples and tests worked with the default kernel pthreads. However, when compiled with the MIT patched user pthreads library, multiple programs aborted. I have no need to use user level threads, but thought I'd mention it, in case any one else had a similar problem or wanted to look into the source of the problem. E
--- In Boost-Users@y..., "Eric Ford"
I fixed the xtime_get error by defining BOOST_HAS_GETTIMEOFDAY. It would be nice if it could get enabled by default though.
Thanks, that got it working for me. The examples and tests worked with the default kernel pthreads. However, when compiled with the MIT patched user pthreads library, multiple programs aborted. I have no need to use user level threads, but thought I'd mention it, in case any one else had a similar problem or wanted to look into the source of the problem.
E
As the primary developer I'd greatly appreciate any patches required for various platforms (which would include the above user level problems). I'm a Windows developer and only really have access to a Windows box. The pthread implementation was done on pthreads-win32, and thanks to a good standard works on most of the platforms that people have tried it on, but I suspect there's going to be several things that need adjusting and there's no way for me to do it. I'm posting this here instead of the main Boost list mostly as a heads up for users that expect full cross platform support from Boost.Threads. It's going to be there, and hopefully very soon now that it's accepted into Boost, but expect a few bumps along the way. Bill Kempf
participants (3)
-
Eric Ford
-
sebmarc@yahoo.com
-
williamkempf@hotmail.com