Gentoo Archives: gentoo-alt

From: "Askar Bektassov (Аскар Бектасов)" <askar.bektassov@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] dev-lang/php-5.4.0_rc7 with apache2 flag does not build libphp5.dylib
Date: Fri, 02 Mar 2012 21:08:33
Message-Id: CAJkPO_TEQ-UOEfxVSowpOB5WQx-caCxqGMMB7-f0uqa9GQx=2w@mail.gmail.com
In Reply to: Re: [gentoo-alt] dev-lang/php-5.4.0_rc7 with apache2 flag does not build libphp5.dylib by Fabian Groffen
On Fri, Mar 2, 2012 at 8:50 AM, Fabian Groffen <grobian@g.o> wrote:
> On 02-03-2012 00:30:25 +0100, Askar Bektassov (Аскар Бектасов) wrote: >> I am trying to build dev-lang/php-5.4.0_rc7 with apache2 support on Lion OS >> X, however at installation stage the emerge breaks claiming that it does not >> find >> >> ${WORKDIR}//sapis-build/apache2/.lib/libphp5.dylib >> >> when I went inside ${WORKDIR}//sapis-build/apache2 directory I realised that >> the files that have been compiled at the build stage are different >> >> ${WORKDIR}//sapis-build/apache2/lib/libphp5.bundle >> >> ${WORKDIR}//sapis-build/apache2/lib/libphp5.so >> >> and I did not find any rule in the Makefile to build libphp5.dylib. So my >> question is, does this mean that there is a bug in the ebuild process or >> this is a matter of building process of the php package that does not >> envisage building dylib files for apache2 module? > > It would be interesting to see the output of scanmacho on those two > files.  I'd expect an MH_BUNDLE, and I am affraid an MH_DYLIB for the > .so. > > > -- > Fabian Groffen > Gentoo on a different level
Ciao Fabian, thanks for your assistance. Unfortunately, is not like you expected   $ scanmacho libphp5.*   ARCH   TYPE   FILE   x86_64 MH_BUNDLE libphp5.bundle   x86_64 MH_BUNDLE libphp5.so so, I went through the Makefile   [...]   OVERALL_TARGET = libs/libphp5.bundle   all_targets = $(OVERALL_TARGET) $(PHP_MODULES) $(PHP_ZEND_EX) $(PHP_BINARIES)   [...]   all: $(all_targets)   [...]   libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)      $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS)\      $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o)\      $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@\      && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so seemingly, libphp5.so is just a mere copy of the libphp5.bundle, and apparently this is a correct behavior in accordance with the following statement "Loadable modules are called "bundles" in Mach-O speak. They have the file type MH_BUNDLE. Since no component involved cares about it, they can carry any extension. The extension .bundle is recommended by Apple, but most ported software uses .so for the sake of compatibility". It is not possible to link against bundles as if they were shared libraries. However, it is possible that a bundle is linked against real shared libraries; those will be loaded automatically when the bundle is loaded." http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx If the above is correct, I may update the bug (https://bugs.gentoo.org/show_bug.cgi?id=405967) with the proposed workaround attached herewith. Cheers, -- Askar Bektassov (Аскар Бектасов)

Attachments

File name MIME type
php-5.4.0_rc7.patch application/octet-stream