set merger_configure_env question

Marcus Calhoun-Lopez mcalhoun at macports.org
Sat Dec 30 17:20:54 UTC 2017


> # Required when cross-compiling.
> foreach arch ${configure.universal_archs} {
>     lappend merger_configure_env(${arch})  libIDL_cv_long_long_format=ll
> }
This is almost certainly not what we want.
As much as possible, we want the configure script to determine proper settings.
Also, the code somewhat conflicts with the comment.

> # 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….
The configure script for libidl runs a program to determine the value
of libIDL_cv_long_long_format.
If the configure script thinks it is cross-compiling [1], then it will
not bother trying to run the test program because it thinks it can't.
That is the error you are getting.
For example, if os.arch is i386 and one of the
configure.universal_archs is ppc64, then the test program can be built
but can not be run.
That is why libIDL_cv_long_long_format must be set manually.

> Am I missing something? Are all those blocks in all those Portfiles
> incorrect?
They are probably correct just not exhaustive.
Without main.log, it is difficult to diagnose the problem.
Just a guess, but what is the value of "sysctl hw.cpu64bit_capable" on
the machine you are trying to build on?

-Marcus

[1] https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html


More information about the macports-dev mailing list