Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

main.log (16.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

Endianness is checked like this in the configure script:

AC_C_BIGENDIAN(, [AC_DEFINE([WORDS_LITTLEENDIAN], 1, [Define to 1 if your processor stores words with the least significant byte
   first (like Intel and VAX, unlike Motorola and SPARC).])])

(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:

AC_C_BIGENDIAN([
  AC_DEFINE([WORDS_BIGENDIAN],[1],[Define to 1 if your processor stores words with the most significant byte first (like PowerPC, unlike Intel).])
  ],[
  AC_DEFINE([WORDS_LITTLEENDIAN],[1],[Define to 1 if your processor stores words with the least significant byte first (like Intel and VAX, unlike Motorola and SPARC).])
])
Version 0, edited 11 years ago by cooljeanius (Eric Gallager) (next)

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: newassigned

comment:4 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

Fixed in r110824, at least for i386/x86_64. i386/PPC should work too, but I have no way of testing.

comment:5 in reply to:  1 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.

comment:6 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… removed

Cc Me!

Note: See TracTickets for help on using tickets.