error with using %lld in Genode::printf or sprintf and including sstream

Christian Helmuth christian.helmuth at ...1...
Tue Jul 10 21:34:46 CEST 2012


Hello 정복득,

thanks for reporting. I gave both issues a go.

On Tue, Jul 10, 2012 at 11:57:51AM +0000, 정복득 wrote:
> I have two problems with compiling my program. One is that I cannot
> get correct output with Genode::printf or sprintf for (unsigend)
> long long values.

I could not reproduce this with current Genode master. The code [1]
produces the expected output:

  [init -> test-ll_var] result of test_buf:1234567801234
  [init -> test-ll_var] llu_var:1234567801234

Could you please test again with my test branch/the attached patch?

> Another one is that I get compilation errors as below:
> 
> error message:
> /usr/local/genode-gcc/bin/../lib/gcc/arm-elf-eabi/4.6.1/../../../../arm-elf-eabi/lib/libstdc++.a(eh_catch.o): In function '__cxa_begin_catch':
> (.text.__cxa_begin_catch+0xc0): undefined reference to '__Unwind_Complete'
> /usr/local/genode-gcc/bin/../lib/gcc/arm-elf-eabi/4.6.1/../../../../arm-elf-eabi/lib/libstdc++.a(eh_catch.o): In function '__cxa_end_catch':
> (.text.__cxa_end_catch+0x30): undefined reference to '__Unwind_DeleteException'
> /usr/local/genode-gcc/bin/../lib/gcc/arm-elf-eabi/4.6.1/../../../../arm-elf-eabi/lib/libstdc++.a(eh_catch.o): In function '__cxa_end_catch':
> (.text.__cxa_end_catch+0xdc): undefined reference to '__Unwind_DeleteException'
> collect2: ld returned 1 exit status
> make[2]: *** [mytest] Error 1

This indeed seems to be a bug in Genode and I opened a new issue
https://github.com/genodelabs/genode/issues/275 using this code [2].
We will investigate this further and report here.

[1] https://github.com/chelmuth/genode/tree/test-ll_var  or
    attachment test-ll_var.patch
[2] https://github.com/chelmuth/genode/tree/test-sstream  or
    attachment test-sstream.patch

Regards
-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/ · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-ll_var.patch
Type: text/x-diff
Size: 1681 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20120710/b559f61b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-sstream.patch
Type: text/x-diff
Size: 1846 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20120710/b559f61b/attachment-0001.patch>


More information about the users mailing list