[oe] Boost 1.36.0 'improvements' and wesnoth 1.6a

GNUtoo GNUtoo at no-log.org
Sun Apr 5 14:02:49 UTC 2009


Hello,
I have:
*An improved but not commitable yet boost 1.36.0 recipe
*A wesnoth(1.6a) recipe that I'll commit when the improved boost recipe
hit the tree
What is for review here is the improved boost 1.36.0(I need it for the
new(as 1.6a) wesnoth recipe).
I send it for review because it's a dependency used by others
packages.(even if it's not the default I heard that this version was
needed for packages like GNU radio)

The Main problem is that the *new* wesnoth recipe doesn't work on arm <
armv6 that lack ldrex and strex instructions...that's a boost problem.
I've (cross)compiled boost and wesnoth for the bug device(armv6) and it
cross compiled fine with minor issues such as:
ERROR: QA Issue: No GNU_HASH in the elf binary for each boost library
and:
NOTE: Not creating empty archive for boost-1.36.0-r5
NOTE: Not creating empty archive for boost-doc-1.36.0-r5
NOTE: Not creating empty archive for boost-locale-1.36.0-r5
NOTE: Not creating empty archive for boost-graph-1.36.0-r5
This is because in the install dir there are no doc or locales files and
no graph library...
I should fix it.

The big problem is that I couldn't test it(my bug device had a defect
and will be replaced,it's replacement is coming soon)
But according to:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/22228/focus=22369
Packages can be commited even if they are not tested(even in stable) but
they must compile fine...(I've tested every other package I commited but
here I'm in the impossibility to test it until my device arrive)

Here the explanation of the main problem:
Fisrt I'd like to say that it was there before and is not specific to
this boost version(boost 1.36.0)...for instance it was observed on boost
1.33.1 with the new wesnoth(the old compiles and runs fine)
The error is attached boost_error.txt
The Documentation is here:
http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Atomic-Builtins.html
The important part is:
"Not all operations are supported by all target processors. If a
particular operation cannot be implemented on the target processor, a
warning will be generated and a call an external function will be
generated. The external function will carry the same name as the
builtin, with an additional suffix `_n' where n is the size of the data
type. "
So an external function must be written such as the one in the
arm-intrinsics.patch (attached)
The function written in the arm-intrinsics.patch only work for
architecture >= armv6
Question:
According to the manual(14128.pdf : ARM Architecture Reference Manual)
the ldrex and strex function are avaliable since ARMv6 and here there
is: 
+#if __ARM_ARCH_7A__
which doesn't work for my bug device because it's an armv6 so can
will the fact of changing it to:
+#ifdef __ARM_ARCH_6J__
break arm > v6
(or is there something defined like __HAVE_LDREX__? )

Then I tried something for not having to write the function:
*echo '#define BOOST_SP_USE_PTHREADS' >> ${S}/boost/config/user.hpp
in the recipe
that added it to the user.hpp file but there still was the same
compilation error
There was also -DBOOST_SP_USE_PTHREADS defined in the original recipe:
echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS
-I${includedir} linkflags -L${libdir} ;' >>
${S}/tools/build/v2/user-config.jam

none of them worked.

Before that I was told to steal the function somewhere but I didn't find
it in GCC nor looked deeply at the possible licensing issues


So the last option remaining is to write this function...
On IRC woglinde pointed me to that article:
http://lwn.net/Articles/314235/
The interresting part is at Posted Jan 12, 2009 19:58 UTC (Mon) by
npitre (subscriber, #5680)
But there are things that I didn't understand yet(but I understood the
bare assembly part) such as:
what is r0 in:
subs r3, r3, r0 @ compare with oldval
what is #TASK_SIZE ?
why is r3 assigned to 0xffff0fff in : 
mov r3, #0xffff0fff ?
what is add 0xffff0fc0 - 0xffff0fff in :
add pc, r3, #(0xffff0fc0 - 0xffff0fff)

So I won't use,modify and commit what I dont' understand...it could have
disastrous results...who knows...

PS: I've a stupid question:
what's the simpliest way to put a default preference = "-1" only to
certain arm arch such as:
armv4 armv4t armv5te
DEFAULT_PREFERENCE_armv4 = "-1" 
DEFAULT_PREFERENCE_armv4t = "-1"
DEFAULT_PREFERENCE_armv5te = "-1"
?

I'll attach the git diff

Denis.

-------------- next part --------------
| [ 97%] Building CXX object src/CMakeFiles/wesnoth.dir/editor2/mouse_action.o
| Linking CXX executable ../wesnoth
| CMakeFiles/wesnoth.dir/formula_ai.o: In function `boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >::release() const':
| 
formula_ai.cpp:(.text._ZNK5boost16exception_detail15exception_cloneINS0_19error_info_injectorINS_16bad_lexical_castEEEE7releaseEv[boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> 
>::release() const]+0x18): undefined reference to `__sync_add_and_fetch_4'
| CMakeFiles/wesnoth.dir/formula_ai.o: In function `boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >::add_ref() const':
| 
formula_ai.cpp:(.text._ZNK5boost16exception_detail15exception_cloneINS0_19error_info_injectorINS_16bad_lexical_castEEEE7add_refEv[boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> 
>::add_ref() const]+0x18): undefined reference to `__sync_add_and_fetch_4'
| CMakeFiles/wesnoth.dir/gui/dialogs/editor_settings.o: In function `boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_function_call> >::release() const':
| 
editor_settings.cpp:(.text._ZNK5boost16exception_detail15exception_cloneINS0_19error_info_injectorINS_17bad_function_callEEEE7releaseEv[boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_function_call> 
>::release() const]+0x18): undefined reference to `__sync_add_and_fetch_4'
| CMakeFiles/wesnoth.dir/gui/dialogs/editor_settings.o: In function `boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_function_call> >::add_ref() const':
| 
editor_settings.cpp:(.text._ZNK5boost16exception_detail15exception_cloneINS0_19error_info_injectorINS_17bad_function_callEEEE7add_refEv[boost::exception_detail::exception_clone<boost::exception_detail::error_info_injector<boost::bad_function_call> 
>::add_ref() const]+0x18): undefined reference to `__sync_add_and_fetch_4'
| collect2: ld returned 1 exit status
| make[2]: *** [wesnoth] Error 1
| make[1]: *** [src/CMakeFiles/wesnoth.dir/all] Error 2
| make: *** [all] Error 2
| FATAL: oe_runmake failed
NOTE: Task failed: /home/embedded/oetmp_openmoko/work/armv4t-angstrom-linux-gnueabi/wesnoth-1.6a-r0/temp/log.do_compile.19287
NOTE: package wesnoth-1.6a-r0: task do_compile: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/embedded/oe/local_recipes/recipes/westnoth/wesnoth_1.6a.bb do_compile failed
ERROR: Task 7 (/home/embedded/oe/local_recipes/recipes/westnoth/wesnoth_1.6a.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 772 tasks of which 771 didn't need to be rerun and 1 failed.
ERROR: '/home/embedded/oe/local_recipes/recipes/westnoth/wesnoth_1.6a.bb' failed
NOTE: build 200903281458: completed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-intrinsics.patch
Type: text/x-patch
Size: 1692 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090405/166c3214/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boost_1.36.0.diff
Type: text/x-patch
Size: 13768 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090405/166c3214/attachment-0005.bin>


More information about the Openembedded-devel mailing list