Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with arm-none-eabi Newlib toolchain #451

Closed
Legimet opened this issue Apr 2, 2017 · 11 comments
Closed

Fails to build with arm-none-eabi Newlib toolchain #451

Legimet opened this issue Apr 2, 2017 · 11 comments

Comments

@Legimet
Copy link

Legimet commented Apr 2, 2017

I am using an arm-none-eabi toolchain (GCC 6.3.0 with Newlib 2.5.0). This is where the build fails:

  CXX      libharfbuzz_la-hb-buffer-serialize.lo
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh: In static member function ‘static hb_bool_t hb_unicode_funcs_t::is_variation_selector(hb_codepoint_t)’:
hb-unicode-private.hh:131:26: error: no matching function for call to ‘hb_in_ranges(hb_codepoint_t&, unsigned int, unsigned int, unsigned int, unsigned int)’
        0xE0100u, 0xE01EFu));  /* VARIATION SELECTOR-17..256 */
                          ^
hb-private.hh:78:34: note: in definition of macro ‘_HB_BOOLEAN_EXPR’
 #define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
                                  ^~~~
hb-unicode-private.hh:129:12: note: in expansion of macro ‘unlikely’
     return unlikely (hb_in_ranges (unicode,
            ^~~~~~~~
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:898:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2)
 ^~~~~~~~~~~~
hb-private.hh:898:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:131:26: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
        0xE0100u, 0xE01EFu));  /* VARIATION SELECTOR-17..256 */
                          ^
hb-private.hh:78:34: note: in definition of macro ‘_HB_BOOLEAN_EXPR’
 #define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
                                  ^~~~
hb-unicode-private.hh:129:12: note: in expansion of macro ‘unlikely’
     return unlikely (hb_in_ranges (unicode,
            ^~~~~~~~
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:904:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
 ^~~~~~~~~~~~
hb-private.hh:904:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:131:26: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
        0xE0100u, 0xE01EFu));  /* VARIATION SELECTOR-17..256 */
                          ^
hb-private.hh:78:34: note: in definition of macro ‘_HB_BOOLEAN_EXPR’
 #define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
                                  ^~~~
hb-unicode-private.hh:129:12: note: in expansion of macro ‘unlikely’
     return unlikely (hb_in_ranges (unicode,
            ^~~~~~~~
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh: In static member function ‘static hb_bool_t hb_unicode_funcs_t::is_default_ignorable(hb_codepoint_t)’:
hb-unicode-private.hh:182:53: error: no matching function for call to ‘hb_in_range(hb_codepoint_t&, unsigned int, unsigned int)’
  case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u);
                                                     ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:883:1: note: candidate: template<class T> bool hb_in_range(T, T, T)
 hb_in_range (T u, T lo, T hi)
 ^~~~~~~~~~~
hb-private.hh:883:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:182:53: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
  case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u);
                                                     ^
hb-unicode-private.hh:183:53: error: no matching function for call to ‘hb_in_range(hb_codepoint_t&, unsigned int, unsigned int)’
  case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu);
                                                     ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:883:1: note: candidate: template<class T> bool hb_in_range(T, T, T)
 hb_in_range (T u, T lo, T hi)
 ^~~~~~~~~~~
hb-private.hh:883:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:183:53: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
  case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu);
                                                     ^
hb-unicode-private.hh:186:26: error: no matching function for call to ‘hb_in_ranges(hb_codepoint_t&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)’
          0x2060u, 0x206Fu);
                          ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:898:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2)
 ^~~~~~~~~~~~
hb-private.hh:898:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:186:26: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
          0x2060u, 0x206Fu);
                          ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:904:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
 ^~~~~~~~~~~~
hb-private.hh:904:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:186:26: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
          0x2060u, 0x206Fu);
                          ^
hb-unicode-private.hh:187:53: error: no matching function for call to ‘hb_in_range(hb_codepoint_t&, unsigned int, unsigned int)’
  case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu;
                                                     ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:883:1: note: candidate: template<class T> bool hb_in_range(T, T, T)
 hb_in_range (T u, T lo, T hi)
 ^~~~~~~~~~~
hb-private.hh:883:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:187:53: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
  case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu;
                                                     ^
hb-unicode-private.hh:188:53: error: no matching function for call to ‘hb_in_range(hb_codepoint_t&, unsigned int, unsigned int)’
  case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u);
                                                     ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:883:1: note: candidate: template<class T> bool hb_in_range(T, T, T)
 hb_in_range (T u, T lo, T hi)
 ^~~~~~~~~~~
hb-private.hh:883:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:188:53: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
  case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u);
                                                     ^
hb-unicode-private.hh:197:28: error: no matching function for call to ‘hb_in_ranges(hb_codepoint_t&, unsigned int, unsigned int, unsigned int, unsigned int)’
          0x1D173u, 0x1D17Au);
                            ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:898:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2)
 ^~~~~~~~~~~~
hb-private.hh:898:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:197:28: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
          0x1D173u, 0x1D17Au);
                            ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:904:1: note: candidate: template<class T> bool hb_in_ranges(T, T, T, T, T, T, T)
 hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3)
 ^~~~~~~~~~~~
hb-private.hh:904:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:197:28: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
          0x1D173u, 0x1D17Au);
                            ^
hb-unicode-private.hh:198:55: error: no matching function for call to ‘hb_in_range(hb_codepoint_t&, unsigned int, unsigned int)’
  case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu);
                                                       ^
In file included from hb-buffer-private.hh:33:0,
                 from hb-buffer-serialize.cc:27:
hb-private.hh:883:1: note: candidate: template<class T> bool hb_in_range(T, T, T)
 hb_in_range (T u, T lo, T hi)
 ^~~~~~~~~~~
hb-private.hh:883:1: note:   template argument deduction/substitution failed:
In file included from hb-buffer-private.hh:35:0,
                 from hb-buffer-serialize.cc:27:
hb-unicode-private.hh:198:55: note:   deduced conflicting types for parameter ‘T’ (‘long unsigned int’ and ‘unsigned int’)
  case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu);
                                                       ^
Makefile:1938: recipe for target 'libharfbuzz_la-hb-buffer-serialize.lo' failed
@behdad
Copy link
Member

behdad commented Apr 4, 2017

So, what's the sizeof(int) on this architecture?

@Legimet
Copy link
Author

Legimet commented Apr 4, 2017

It is 4.

@behdad
Copy link
Member

behdad commented Apr 5, 2017

Can you test with same version of gcc and a more common abi? Like GNU Linux?

@Legimet
Copy link
Author

Legimet commented Apr 5, 2017

Yes, it works with arm-linux-gnueabi-gcc (6.3.0) and glibc.

@behdad
Copy link
Member

behdad commented Apr 5, 2017

I have no idea then. Can you bring up with gcc? The template in question is:

template <typename T> static inline bool 
hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2) 
{ 
  return hb_in_range (u, lo1, hi1) || hb_in_range (u, lo2, hi2); 
} 

The failing argument types are uint32_t, unsigned, unsigned, unsigned, unsigned.

@Legimet
Copy link
Author

Legimet commented Apr 5, 2017

Apparently uint32_t is typedef'ed as unsigned long. Once I changed sys-include/machine/_default_types.h to typedef uint32_t as unsigned int and int32_t as int, it worked. But unsigned long and unsigned are the same size, so why is this happening?

@behdad
Copy link
Member

behdad commented Apr 5, 2017

Sure long is not 8?

@Legimet
Copy link
Author

Legimet commented Apr 5, 2017

Yes, long is 4.

@behdad
Copy link
Member

behdad commented Apr 14, 2017

Not sure how to proceed. Contact gcc?

ebraminio added a commit to ebraminio/harfbuzz that referenced this issue Jun 13, 2017
ebraminio added a commit to ebraminio/harfbuzz that referenced this issue Jun 13, 2017
ebraminio added a commit to ebraminio/harfbuzz that referenced this issue Jun 13, 2017
@ebraminio
Copy link
Collaborator

Hi @Legimet, can you have a look to the patch available on #496 and check if it fixes your issue? Thanks

@Legimet
Copy link
Author

Legimet commented Jun 13, 2017

Yes, it fixes the issue for me! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants