[Fuego] [PATCH v2] Benchmark.iperf: fixed build error of redefine

Li Xiaoming lixm.fnst at cn.fujitsu.com
Mon Aug 20 11:40:29 UTC 2018


Hi Tim

Sorry for this late reply of iperf's patch.

I have found a more acceptable method to repair the build error.

when building iperf 2.0.0.5, it reports following errors:

>In file included from /opt/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/cmath:42:0,
>                 from /opt/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/math.h:36,
>                 from ../include/headers.h:85,
>                 from ../include/Timestamp.hpp:63,
>                 from delay.cpp:53:
>/opt/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/bits/cpp_type_traits.h:205:12: error: redefinition of 'struct >std::__is_integer<int>'
>     struct __is_integer<int>
>            ^~~~~~~~~~~~~~~~~
>/opt/sysroots/aarch64-agl-linux/usr/include/c++/6.3.0/bits/cpp_type_traits.h:138:12: error: previous definition of 'struct >std::__is_integer<int>'
>     struct __is_integer<bool>
>            ^~~~~~~~~~~~~~~~~~
>Makefile:273: recipe for target 'delay.o' failed


It is due to the macro def in config.h line 272:
>#define bool int

and the above macro statement is generated by autoconf macro in configure.ac line 170:
>DAST_CHECK_BOOL
(meaning:Checks if bool, true, and false are defined. Defines bool as int, true as 1, false as 0 if not defined. 
 copy from https://webfolder.wirelessleiden.nl/iperf/lib.html)

But the iperf src code use a c++ header file cpp_type_traits.h, which do not need to transfer bool to int, as c++ have already defined bool. Then it caused the redefinition error.

Workaround is to comment  "#define bool int" in generated config.h.

Li Xiaoming (1):
  Benchmark.iperf: fixed build error of redefine

 engine/tests/Benchmark.iperf/fuego_test.sh | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4





More information about the Fuego mailing list