osxfuse @3.5.0 build error

Ryan Schmidt ryandesign at macports.org
Sat Sep 24 10:13:44 PDT 2016


> On Sep 24, 2016, at 11:18 AM, Davide Liessi <davide.liessi at gmail.com> wrote:
> 
> I'm trying to install osxfuse @3.5.0 on Mac OS X 10.6.
> 
> I first got an error due to the fact that on my system the kernel is
> 32 bit, but MacPorts tries to build osxfuse 64 bit.
> Indeed on my system `uname -m` outputs `i386`, while
> `get_canonical_archs` returns `x86_64`.
> (The error is the same as in the 10.6 and 10.7 buildbots, thus I
> suspect the same architecture mismatch happens.)
> 
> I then changed line 130 of the Portfile from
> `-a [join [get_canonical_archs] " -a "] \`
> to `-a ${kernel_archs} \`.
> (I had to do something similar also with @2.8.0, namely I had to add
> `configure.build_arch ${kernel_arch}`.)

The intention of the portfile is explained in the comments:

# We will build user-space components for the specified arch, and
# kernel modules for the kernel arch.

It sounds like your changes will cause it to build the user-space components for the kernel arch as well, which was not the intention.

I'm not certain how to tell the build system what arch to build the kernel extension for. It would make sense that it would be able to figure it out on its own, but I don't know if it does.

There is one bug I see in the portfile though:

> # If building for different kernel arch than our buildslaves use, force a build
> # from source. The binary package IDs don't encode the kernel arch.
> if {${kernel_arch} ne "x86_64"} {
>     archive_sites
> }

This assumes all of our buildbot workers have 64-bit kernels, which is not correct. Specifically, the Snow Leopard and earlier workers have 32-bit kernels; I was not able to get VMware to use a 64-bit kernel for Snow Leopard. And the Leopard worker is a Power Mac G5, on which `uname -m` returns "Power Macintosh".

osxfuse is not the only port that install a kernel extension. Maybe the handling of whether to build from source (the knowledge of which kernel archs our buildworkers use), and how to determine the kernel arch, should be moved into a portgroup, so as to avoid duplication of effort.


> The build got further, but I got another error: I copy the relevant
> part of main.log below.
> Do you have any idea how to solve the problem?
> 
> Best wishes.
> Davide
> 
> 
> From main.log:
> ```
> [...]
> :info:build === BUILD NATIVE TARGET OSXFUSE OF PROJECT OSXFUSE WITH
> CONFIGURATION Release ===
> [...]
> :info:build PhaseScriptExecution "BridgeSupport Metadata"
> build/OSXFUSE.build/Release/OSXFUSE.build/Script-28D525C40EA8076400B7CF7B.sh
> :info:build     cd
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-cc7d953/framework
> :info:build     /bin/sh -c
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-cc7d953/framework/build/OSXFUSE.build/Release/OSXFUSE.build/Script-28D525C40EA8076400B7CF7B.sh
> :info:build
> :info:build dyld: Library not loaded: /opt/local/lib/libosxfuse.2.dylib
> :info:build   Referenced from:
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework/OSXFUSE.framework/Versions/A/OSXFUSE
> :info:build   Reason: image not found
> :info:build Can't execute compiled C code... aborting

Is your MacPorts prefix /opt/local?

Does /opt/local/lib/libosxfuse.2.dylib exist? I'm surprised it's looking for that while building osxfuse, since it sounds like something that would be installed by osxfuse.

What's /Volumes/MacPorts/hopeful?

What's /Users/davide/ports-substitution?


> :info:build line was:
> DYLD_FRAMEWORK_PATH="/Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework"
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/.tmp/bin-0-81104
> :info:build binary is
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/.tmp/bin-0-81104
> :info:build Usage: gen_bridge_metadata [options] <headers...>
> :info:build Use the `-h' flag or consult gen_bridge_metadata(1) for help.
> :info:build Command /bin/sh failed with exit code 1
> :info:build Command /bin/sh failed with exit code 1
> :info:build Touch
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework/OSXFUSE.framework
> :info:build     cd
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-cc7d953/framework
> :info:build     /usr/bin/touch -c
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework/OSXFUSE.framework
> :info:build
> :info:build Strip
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework/OSXFUSE.framework/Versions/A/OSXFUSE
> :info:build     cd
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-cc7d953/framework
> :info:build     /Developer/usr/bin/strip -x
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/framework/OSXFUSE.framework/Versions/A/OSXFUSE
> :info:build
> :info:build ** BUILD FAILED **
> :info:build
> :info:build
> :info:build The following build commands failed:
> :info:build OSXFUSE:
> :info:build     PhaseScriptExecution "BridgeSupport Metadata"
> /Volumes/MacPorts/hopeful/build/_Users_davide_ports-substitution_fuse_osxfuse/osxfuse/work/osxfuse-osxfuse-cc7d953/framework/build/OSXFUSE.build/Release/OSXFUSE.build/Script-28D525C40EA8076400B7CF7B.sh
> :info:build (1 failure)




More information about the macports-users mailing list