Boost C++ Libraries: Ticket #6831: __sync_lock_test_and_set_4 and illegal instruction https://svn.boost.org/trac10/ticket/6831 <p> In the attachment, I’ve prepared a simple test program verifying a trivial asynchronous read operation using asio sockets. The program compiles and runs fine up to boost version 1.42. In version 1.43, compiling the program fails with a linker error: </p> <pre class="wiki">/tmp/ccQi0dGl.o: In function `boost::asio::detail::gcc_fenced_block::gcc_fenced_block()': main.cpp:(.text._ZN5boost4asio6detail16gcc_fenced_blockC1Ev[boost::asio::detail::gcc_fenced_block::gcc_fenced_block()]+0x4c): undefined reference to `__sync_lock_test_and_set_4' </pre><p> Since version 1.44 up to version 1.49, the linker error is gone and the program compiles fine. However, the program aborts at runtime upon executing “io.run()”, issuing an “Illegal instruction” error message. My assumption is that whatever “_sync_lock_test_and_set_4” was replaced by in version 1.44 represents an illegal operation on my target system. </p> <p> The target system is a MOXA UC-8410 embedded ARM computer: </p> <pre class="wiki">Linux Moxa 2.6.23.1 #1044 Fri May 6 10:25:20 CST 2011 armv5teb GNU/Linux arm-linux-g++ (GCC) 4.2.1 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6831 Trac 1.4.3 Pascal Kesseli <pascal.kesseli@…> Thu, 26 Apr 2012 07:19:14 GMT attachment set https://svn.boost.org/trac10/ticket/6831 https://svn.boost.org/trac10/ticket/6831 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test-program.cpp</span> </li> </ul> <p> Test program with trivial async_read use case. </p> Ticket Pascal Kesseli <pascal.kesseli@…> Thu, 26 Apr 2012 07:25:07 GMT <link>https://svn.boost.org/trac10/ticket/6831#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6831#comment:1</guid> <description> <p> Additional note: The program was compiled with the following command: </p> <pre class="wiki">xscale-linux-g++ -fPIC -DBOOST_ASIO_DISABLE_EPOLL -I/var/lib/c++/boost/boost_1_43_0/target/arm-linux-4.2.1/include -oasync main.cpp -L/var/lib/c++/boost/boost_1_43_0/target/arm-linux-4.2.1/lib/static -pthread -lboost_system -lboost_thread </pre> </description> <category>Ticket</category> </item> </channel> </rss>