#40401 closed defect (fixed)
lcdf-typetools: universal variant fails: "Neither WORDS_BIGENDIAN nor WORDS_LITTLEENDIAN is defined!"
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.0 |
Keywords: | Cc: | ||
Port: | lcdf-typetools |
Description
Building lcdf-typetools @2.99 with the +universal variant fails with:
md5.c:117:3: error: "Neither WORDS_BIGENDIAN nor WORDS_LITTLEENDIAN is defined!" # error "Neither WORDS_BIGENDIAN nor WORDS_LITTLEENDIAN is defined!" ^
Building without the universal variant works fine.
lcdf-typetools @2.92_1 did not have any problem building universal so this is a regression.
Attachments (1)
Change History (7)
Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
comment:1 follow-up: 5 Changed 11 years ago by cooljeanius (Eric Gallager)
comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
I would say, as usual, that it is an error for a configure script to attempt to detect endianness and bitness since on OS X it varies. Instead, source code files should use preprocessor directives __BIG_ENDIAN__
and __LP64__
as needed.
comment:3 Changed 11 years ago by larryv (Lawrence Velázquez)
Owner: | changed from macports-tickets@… to larryv@… |
---|---|
Status: | new → assigned |
comment:4 Changed 11 years ago by larryv (Lawrence Velázquez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in r110824, at least for i386/x86_64. i386/PPC should work too, but I have no way of testing.
comment:5 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to egall@…:
I haven't tried this myself yet, but perhaps someone could try patching the configure script to define
WORDS_BIGENDIAN
in the first condition instead of just leaving it blank?
This would not help. The configure script determines (correctly) that the compiler will be building universally and defines neither WORDS_BIGENDIAN nor WORDS_LITTLEENDIAN, but the source assumes that at least one of those is defined.
Endianness is checked like this in the configure script:
(ref)
I haven't tried this myself yet, but perhaps someone could try patching the configure script to define
WORDS_BIGENDIAN
in the first condition instead of just leaving it blank? Like this: