Opened 13 years ago

Closed 12 years ago

#31459 closed defect (fixed)

libffi: headers are merged improperly by muniversal portgroup

Reported by: herzog@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: muniversal Cc: ryandesign (Ryan Carsten Schmidt), k.polezhaiev@…
Port: libffi

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Installation of libffi via 'sudo port -svk install libffi +universal' creates a header file '/opt/local/lib/libffi-3.0.10/include/ffi.h' whose number of #if statements does not match the number of #endif's. For example, 'sudo port -svk install py27-gobject +universal' results in the following error code:

In file included from ffi-marshaller.c:24:
/opt/local/lib/libffi-3.0.10/include/ffi.h:53:1: error: unterminated #ifndef

This looks very similar to Ticket #25439 concerning an older version of this library.

Attachments (4)

ffi.h (11.4 KB) - added by herzog@… 13 years ago.
ffitarget.h (6.5 KB) - added by herzog@… 13 years ago.
InstallationLog.zip (1.5 MB) - added by herzog@… 13 years ago.
include.zip (14.0 KB) - added by herzog@… 12 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

It builds fine for me for i386 x86_64 on Snow Leopard. Please let us know your OS version, your Xcode version, and your universal_archs, and please attach the problematic ffi.h. Thanks.

Changed 13 years ago by herzog@…

Attachment: ffi.h added

Changed 13 years ago by herzog@…

Attachment: ffitarget.h added

Changed 13 years ago by herzog@…

Attachment: InstallationLog.zip added

comment:3 Changed 13 years ago by herzog@…

Here are the data you asked for and further items that may be helpfull:

Mac OS version:         Mac OS X 10.5.8
Xcode version:          Xcode 3.1.4
UNIVERSAL_ARCHS='i386 ppc' (as defined in ~/MacPorts/MacPortBuild/MacPorts-2.0.3/config.log )

The attached zip archive contains the installation logs from a completely fresh MacPorts system to the state when the problem occured.

Changed 12 years ago by herzog@…

Attachment: include.zip added

comment:4 in reply to:  description Changed 12 years ago by herzog@…

The description of the problem is not quite correct: The header files for the ppc and i386 plattforms of libffi are completely okay.

The problem is the mechanism which glues together the headers for the different plattforms into a single universal header file.

For example, everything works well, if the files

  • /opt/local/lib/libffi-3.0.10/include/ffi.h
  • /opt/local/lib/libffi-3.0.10/include/ffitarget.h

are replaced by headers which include the appropriate headers from

  • ...libffi/work/destroot-ppc and
  • ...libffi/work/destroot-i386

respectively. Too see this, replace the directory

  • /opt/local/lib/libffi-3.0.10/include

with the directory contained in the attachment 'include.zip'.

Replying to herzog@…:

Installation of libffi via 'sudo port -svk install libffi +universal' creates a header file '/opt/local/lib/libffi-3.0.10/include/ffi.h' whose number of #if statements does not match the number of #endif's. For example, 'sudo port -svk install py27-gobject +universal' results in the following error code:

In file included from ffi-marshaller.c:24:
/opt/local/lib/libffi-3.0.10/include/ffi.h:53:1: error: unterminated #ifndef

This looks very similar to Ticket #25439 concerning an older version of this library.

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: muniversal added; C preprocessor removed
Summary: A bug already fixed with libffi@3.0.9_0+universal has reappeared in version 3.0.10libffi: headers are merged improperly by muniversal portgroup

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: k.polezhaiev@… added

Has duplicate #32257.

comment:7 Changed 12 years ago by k.polezhaiev@…

Cc: k.polezhaiev@… removed

Cc Me!

comment:8 Changed 12 years ago by k.polezhaiev@…

Cc: k.polezhaiev@… added

Cc Me!

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Now that I've had a chance to try this out on a Tiger machine, it looks like this is a reprise of an issue that was avoided when the universal variant was first introduced in r46771. The port says not to use the merger for ffitarget.h, but the headers have changed their location since then and the port wasn't updated accordingly, and now ffi.h is affected as well. Fixed in r87572.

Note: See TracTickets for help on using tickets.