set merger_configure_env question

Ken Cunningham ken.cunningham.webuse at gmail.com
Fri Dec 29 22:10:56 UTC 2017


Trying to build libidl+universal on 10.5 fails. I’m set up to build it universal, with universal_archs as i386 and x86_64. It uses the muniversal portgroup, which I don’t know tons about.

It fails because an environment variable doesn’t get set properly during the x86_64 build:

checking for access... yes
checking size of long long... 8
checking for format to printf and scanf a guint64... configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libidl/libidl/work/libIDL-0.8.14-x86_64':
configure: error: cannot run test program while cross compiling


In the Portfile, there is this block:

# Required when cross-compiling.
if { ${os.arch} eq "i386" } {
    if { ${os.major} >= 10 } {
        set merger_configure_env(ppc) libIDL_cv_long_long_format=ll
    }
    set merger_configure_env(ppc64)   libIDL_cv_long_long_format=ll
} else {
    set merger_configure_env(i386)    libIDL_cv_long_long_format=ll
    set merger_configure_env(x86_64)  libIDL_cv_long_long_format=ll
}


I don’t really understand why this block would do what it’s doing. Doesn’t seem to make sense to me. However, this same block, or variants thereof, are in many Portfiles, so it’s apparently the recommended way….


Anyway, I replaced that block with this, which just seems more like what is meant to be done to me, and it works.

# Required when cross-compiling.
foreach arch ${configure.universal_archs} {
    lappend merger_configure_env(${arch})  libIDL_cv_long_long_format=ll
}



Am I missing something? Are all those blocks in all those Portfiles incorrect?

Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20171229/e28975ee/attachment.html>


More information about the macports-dev mailing list