Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#13693 closed enhancement (fixed)

Fix compilation of gnustep-base

Reported by: fedor@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc:
Port:

Description

ffcall does not work on MacOS X since 10.4, and so gnustep-base should not depend on it. This patch updates the configuration so that libffi is now the default and ffcall is a variant. libffi should be preferred on any platform that it has been ported to.

Attachments (1)

gnustep-base-Portfile.patch (898 bytes) - added by fedor@… 16 years ago.

Download all attachments as: .zip

Change History (10)

Changed 16 years ago by fedor@…

Attachment: gnustep-base-Portfile.patch added

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

Owner: changed from macports-tickets@… to ryandesign@…

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

Thanks for the suggestion! I modified your patch a little: to make it clearer to the user that there's a choice between ffi and ffcall, I made two conflicting variants, ffi and ffcall, with ffi the default. I also added variant descriptions. I don't hold with the "with_foo" variant naming strategy, so they're just called ffi and ffcall. See r32265.

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

comment:4 Changed 16 years ago by yves@…

In what way does ffcall not work since 10.4 ? I had gnustep running better on ffcall than ffi on 10.4.

Talksoup, for instance, will crash on ffi but works great with ffcall.

Also, ffi was never supported for gnustep on x86.

comment:5 Changed 16 years ago by fedor@…

I forgot about x86. It's probably true that ffi doesn't work on that. ffcall doesn't properly handle trampolines, although most other things seems to work, so it's probably OK for most applications. I'll look at TalkSoup to see what the problem is. Perhaps it would be OK to switch back to the ffcall variant until I see what is wrong.

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

I am on an Intel Mac with Mac OS X 10.4.11, Xcode 2.4.1 and MacPorts built from trunk. The gnustep-base port would not install until I applied the changes in r32265. Trying it now with the +ffcall variant, on the first install attempt, it fails like this:

$ sudo port install gnustep-base +ffcall
--->  Fetching gnustep-base
--->  Attempting to fetch gnustep-base-1.14.0.tar.gz from http://ftp.easynet.nl/mirror/GNUstep/pub/gnustep/core
--->  Attempting to fetch gnustep-base-1.14.0.tar.gz from http://ftpmain.gnustep.org/pub/gnustep/core
--->  Verifying checksum(s) for gnustep-base
--->  Extracting gnustep-base
--->  Configuring gnustep-base
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_gnustep_gnustep-base/work/gnustep-base-1.14.0" && ./configure --prefix=/opt/local CC=gcc-mp-4.2 GNUSTEP_MAKEFILES=/opt/local/share/GNUstep/Makefiles --enable-ffcall " returned error 1
Command output: configure: error: cannot find install-sh or install.sh in /opt/local/share/GNUstep/Makefiles "."//opt/local/share/GNUstep/Makefiles

Error: Status 1 encountered during processing.
$

On the next attempt, it fails like this:

$ sudo port clean --work
--->  Cleaning gnustep-base
$ sudo port install gnustep-base +ffcall
--->  Fetching gnustep-base
--->  Verifying checksum(s) for gnustep-base
--->  Extracting gnustep-base
--->  Configuring gnustep-base
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_gnustep_gnustep-base/work/gnustep-base-1.14.0" && ./configure --prefix=/opt/local CC=gcc-mp-4.2 GNUSTEP_MAKEFILES=/opt/local/GNUstep/System/Library/Makefiles --enable-ffcall " returned error 1
Command output: checking use of pass-through arguments... no
checking use of fake-main definition... yes
checking ffi.h usability... yes
checking ffi.h presence... no
configure: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: ffi.h: proceeding with the compiler's result
checking for ffi.h... yes
checking callback.h usability... yes
checking callback.h presence... yes
checking for callback.h... yes
checking for forwarding callback in runtime... yes
checking FFI library usage... ffcall
checking if ffcall trampolines work... no
none

You have ffcall, but it does not work properly. Most likely because
your're system's security policy is blocking some parts of ffcall
we recommend installing libffi instead.
GNUstep requires ffcall or libffi and proper libobjc hooks to do
invocations and DO.
(This does not apply on apple-apple-apple systems where DO is
not compatible with other GNUstep systems.)

You most likely do not want to build base without DO support. Many
things, including all applications, won't work at all without DO.
If you really want to build -base without DO support, add --disable-do
to the configure arguments.
For more information, read the GNUstep build guide, ffcall section:
http://gnustep.made-it.com/BuildGuide/index.html
configure: error: Incomplete support for ffi functionality.

Error: Status 1 encountered during processing.
$

comment:7 Changed 16 years ago by fedor@…

Yes, that's because I added a check in the configure to fail on platforms where the ffcall trampolines did not work. If you take that check out, base would compile properly. I'll try to make a new stable release of gnustep-base where this can happen.

To recap, for now, I think the patch should stay as is, but it should use the ffcall variant on x86. How do you check for x86 platforms?. I could make that patch once I figure that out.

comment:8 Changed 16 years ago by yves@…

you can use platform variants

platform powerpc { patchfiles-append ... }

platform i386 (better check that one) { patchfiles-append ... }

TalkSoup developer (Andrew Ruders I think) is aware of the ffi problem but has got no solution. Runtime bugs are always hard to pinpoint when you are on another platform aren't they ?

comment:9 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

Note: See TracTickets for help on using tickets.