Problems with cpp (in wxWidgets-devel)

Mojca Miklavec mojca.miklavec.lists at gmail.com
Tue May 29 03:51:40 PDT 2012


On Tue, May 29, 2012 at 12:24 PM, Joshua Root wrote:
> On 2012-5-29 19:57 , Mojca Miklavec wrote:
>> Hello,
>>
>> if I try to build wxWidgets with a patch that enables building with
>> clang. But if I try to build +universal, it seems that I hit the
>> problem of "looks like it's using parts of QuickDraw that are gone in
>> Lion", so I need to build with SDK for 10.6.
>
> But wxWidgets doesn't have a universal variant?

I'm sorry, I meant wxWidgets-devel. I also wrote that in Subject, but
failed to be more clear in the body.

>> But then it fails with an equivalent of
>>     > touch a.c
>>     > cpp -isysroot /Developer/SDKs/MacOSX10.6.sdk a.c
>>     i686-apple-darwin11-llvm-gcc-4.2: c: No such file or directory
>> (replacing with /Applications/Xcode.app/.../MacOSX10.6.sdk doesn't
>> solve anything; a.c has some contents, but it doesn't make any
>> difference to cpp either)
>>
>> My question is: does that work for others? I had Xcode 4.2 installed
>> and installed 4.3 on top. Is only my system that is messed up or is
>> there something else that I'm missing? The file /usr/bin/cpp is a
>> shell script.
>
> Looks like /usr/bin/cpp doesn't understand options that take an argument
> that's separated by a space. You're not really meant to use it anyway;
> as the comments say, it's just there for compatibility with really old
> stuff and is deprecated.
>
> You can always achieve the same thing with "$CC -E" (as the cpp script
> itself demonstrates), it just needs to be invoked a little differently.

I just realized that removing
    configure.env-append CPP=${configure.cpp}
    configure.env-append CXXCPP=${configure.cpp}
from Portfile solves the problem and I'm able to build wxWidgets-devel
with clang without any problems. I also discovered another patch that
probably removes the need to build against 10.6 altogether:
    http://trac.wxwidgets.org/changeset/70737

But then I have two questions:
- Why was this explicit setting needed in the first place? (Maybe I
only need to search through tickets)
- Why doesn't configure.cpp return "clang -E" instead of /usr/bin/cpp?

Mojca


More information about the macports-dev mailing list