On Oct 19, 2011, at 15:31, [email protected] wrote:
> Revision: 86138
> http://trac.macports.org/changeset/86138
> Author: [email protected]
> Date: 2011-10-19 13:31:18 -0700 (Wed, 19 Oct 2011)
> Log Message:
> -----------
> port wxwidgets-devel, making a universal +universal, fixed license, fixed
> typo in patchfile
> -configure.cppflags-append -arch ${configure.build_arch}
>
> +if {![variant_isset universal]} {
> + set mp_arch_flags "-arch ${configure.build_arch}"
> +} else {
> + set mp_arch_flags "-arch [join ${universal_archs} \ -arch\ ]"
> +}
> +
> +configure.cppflags-append "${mp_arch_flags}"
So, you don't need to manually compute the architectures; the
[get_canonical_archflags] procedure does that for you, provided you define the
universal variant before you try to use it.
However, the universal variant fails for me on Snow Leopard with Xcode 3.2.6:
checking how to run the C preprocessor... /usr/bin/cpp-4.2
configure: error: C preprocessor "/usr/bin/cpp-4.2" fails sanity check
See `config.log' for more details.
And the config.log says:
configure:16976: /usr/bin/cpp-4.2 -I/opt/local/include -arch x86_64 -arch i386
conftest.c
i686-apple-darwin10-cpp-4.2.1: -arch_multiple: linker input file unused because
linking not done
i686-apple-darwin10-cpp-4.2.1: -final_output: linker input file unused because
linking not done
i686-apple-darwin10-cpp-4.2.1: a.out: linker input file unused because linking
not done
i686-apple-darwin10-cpp-4.2.1: -arch_multiple: linker input file unused because
linking not done
i686-apple-darwin10-cpp-4.2.1: -final_output: linker input file unused because
linking not done
i686-apple-darwin10-cpp-4.2.1: a.out: linker input file unused because linking
not done
lipo: can't figure out the architecture type of: /var/tmp//ccvbq4cl.out
What I don't understand is why the portfile is (and was) putting archflags into
CPPFLAGS; MacPorts base doesn't do that, because it hasn't seemed necessary for
any other ports, and indeed doing so here seems to cause problems.
After removing that, I then get problems about the SDK:
configure: WARNING: Enabling default SDK due to --enable-universal_binary.
configure: WARNING: If you don't want this, specify --without-macosx-sdk
checking for universal binary architectures... -arch x86_64 -arch i386
configure: WARNING: Disabling precompiled headers due to universal binary build.
checking for SDK directory /Developer/SDKs/MacOSX10.4u.sdk... exists
checking for sw_vers... sw_vers
checking if C compiler works with SDK/version options... configure: error: no.
Try a different SDK
See `config.log' for more details.
And the config.log says:
configure:19088: checking if C compiler works with SDK/version options
configure:19111: /usr/bin/gcc-4.2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.5 -o conftest -arch x86_64 -arch i386 -pipe -O2 -arch
x86_64 -arch i386 -I/opt/local/include -arch x86_64 -arch i386
-L/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_wxWidgets-devel/wxWidgets-devel/work/wxWidgets-2.9.2/build/lib
-L/opt/local/lib -arch x86_64 -arch i386 conftest.c >&5
ld: warning: directory
'/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_wxWidgets-devel/wxWidgets-devel/work/wxWidgets-2.9.2/build/lib'
following -L not found
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
ld: warning: directory
'/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_wxWidgets-devel/wxWidgets-devel/work/wxWidgets-2.9.2/build/lib'
following -L not found
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
So it's trying to use the 10.4u SDK, just because it found it. Which is dumb.
So I've changed it to always use the proper SDK (or rather, "/" in most cases).
It now builds universal on Snow Leopard.
https://trac.macports.org/changeset/86193
The one remaining thing to test is whether on Lion one really needed to set the
deployment target to 10.6 or whether it would have worked fine with it set to
the default 10.7. Can you remove the platform darwin 11 section and see if it
still works that way, and if so commit that? Thanks.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev