Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#44656 closed defect (fixed)

wxWidgets-3.0: configure fails on Leopard

Reported by: tenomoto (Takeshi Enomoto) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc: jyrkiwahlstedt, jeremyhu (Jeremy Huddleston Sequoia)
Port: wxWidgets-3.0

Description

gcc-4.2 on Leopard does not accept -stdlib option. I was able to install wxWidgets-3.0 on Leopard (ppc) if -stdlib is not used in configure-ldflags.

#configure.ldflags-append \
#                    -stdlib=${configure.cxx_stdlib}

Attachments (1)

wxWidgets-stdlib.diff (576 bytes) - added by mojca (Mojca Miklavec) 10 years ago.
A patch to avoid using stdlib with gcc (on Leopard)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: jwa@… jeremyhu@… added; mojca@… removed
Keywords: leopard added
Owner: changed from jwa@… to mojca@…
Version: 2.3.1

Dear Jeremy, I would like to ask you for help with this one. I know for a workaround: for example testing whether OS version is at least 10.6, else don't bother adding -stdlib to LDFLAGS.

But what would be the "official"/suggested way to deal with apparently unsupported stdlib flag on old OSes? The existence of the flag is probably related to compiler choice, not so much on OS version?

comment:2 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

That's only relevant for clang. Look in other ports for examples. Many such ports do things like:

set cxx_stdlibflags {}
if {[string match *clang* ${configure.cxx}]} {
    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

Changed 10 years ago by mojca (Mojca Miklavec)

Attachment: wxWidgets-stdlib.diff added

A patch to avoid using stdlib with gcc (on Leopard)

comment:3 Changed 10 years ago by mojca (Mojca Miklavec)

Thank you very much for the hint.

Takeshi, can you please try the attached patch?

  • Portfile

     
    110110                    --enable-graphics_ctx \
    111111                    --with-macosx-sdk=no \
    112112                    --with-macosx-version-min=no
    113 configure.ldflags-append \
     113if {[string match *clang* ${configure.cxx}]} {
     114    configure.ldflags-append \
    114115                    -stdlib=${configure.cxx_stdlib}
     116}
    115117
    116118if {${subport} eq "wxPython-3.0"} {
    117119    set wxpythonsubset      wxPython-${wxpython_ver}-MacPorts-subset

In case it works for you, feel free to commit it.

comment:4 Changed 10 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

Thanks for the patch. Done in r124083. I have a buildbot error for Snow Leopard, but it seems that the binary is created and I don't have configure error on a Snow Leopard machine, I close the ticket.

comment:5 Changed 10 years ago by mojca (Mojca Miklavec)

Oh, don't worry. The failure comes from wxWidgets-3.0-libcxx which is just a weird workaround for ports requiring C++11. I should blacklist some compilers based on stdlib choice, but I'm not yet sure which ones (maybe clang is the only acceptable compiler).

comment:6 Changed 10 years ago by mojca (Mojca Miklavec)

Also: the binary wasn't created this time. The binary still comes from an old compilation (binary found, not building again).

Note: See TracTickets for help on using tickets.