Opened 6 months ago

Last modified 6 months ago

#56516 assigned defect

bzflag @2.4.14: error: A c++ compiler with C++0x support is required to build BZFlag

Reported by: ryandesign (Ryan Schmidt) Owned by: allejo (Vladimir Jimenez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard snowleopard lion mountainlion Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: bzflag

Description

checking ... p r o g r a m s ... (2 of 9)
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++-4.2 accepts -g... yes
checking dependency style of /usr/bin/g++-4.2... gcc3
checking if /usr/bin/g++-4.2 supports C++0x features without additional flags... no
checking if /usr/bin/g++-4.2 supports C++0x features with -std=c++0x... no
checking if /usr/bin/g++-4.2 supports C++0x features with -std=gnu++0x... no
configure: error: A c++ compiler with C++0x support is required to build BZFlag

Change History (6)

comment:1 Changed 6 months ago by ryandesign (Ryan Schmidt)

Keywords: lion mountainlion added

The above was on 10.6, but the problem extends to 10.7 and 10.8:

./SDL2Window.h:26:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^
1 error generated.

The usual solution is to include the cxx11 1.1 portgroup.

comment:2 Changed 6 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:3 Changed 6 months ago by allejo (Vladimir Jimenez)

Yea, compiling bzflag requires a compiler with c++0x support. Is having two values for PortGroup allowed or how would that work with app 1.0 already being set?

On a somewhat related note, bzflag only officially supports 10.7+. Is there a way this can be added to the Portfile?

Sorry for the noob questions, I'm still new to the macports scene!

comment:4 Changed 6 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Yes, two values of PortGroup is fine.

PortSystem          1.0
PortGroup           app 1.0
PortGroup           cxx11 1.1

name                bzflag
version             2.4.14

If you are sure that bzflag will not work on 10.6 or lower, you could add something like

if {${os.major} < 11} {
    pre-fetch {
        ui_error "${name} requires Mac OS X 10.7 or greater"
        return -code error "incompatible OS version"
    }
}

However, I was about to get bzflag to compile and run on a 10.6 virtual machine.
You might not want to add the above code until you are sure it is needed.
They might have only chosen 10.7 since it was the first OS with libc++.
PortGroup cxx11 1.1 may be able to get around that.

On an unrelated note, the livecheck did not work for me.
However, livecheck.regex {(\d+(?:\.\d+)+)/} did work.

Last edited 6 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:5 in reply to:  3 Changed 6 months ago by ryandesign (Ryan Schmidt)

Replying to allejo:

Is having two values for PortGroup allowed or how would that work with app 1.0 already being set?

Yes, that's fine. PortGroup in MacPorts is basically like #include in C.

Last edited 6 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:6 Changed 6 months ago by kencu (Ken)

I built the last version of bzflag on 10.6.8 without any trouble, but it errored on launch with a complaint about OpenGL. Haven't tried it since the update.

Note: See TracTickets for help on using tickets.