Opened 19 months ago

Last modified 17 months ago

#67268 assigned defect

gtk3 fails on 10.5 - missing type_traits

Reported by: rmottola (Riccardo) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard legacy Cc: Cebtenzzre, cooljeanius (Eric Gallager)
Port: gtk3

Description

using clang 7.0

In file included from autotestkeywords.cc:1:
In file included from ../../gtk/gtk.h:30:
In file included from ../../gdk/gdk.h:30:
In file included from ../../gdk/gdkconfig.h:13:
In file included from /opt/local/include/glib-2.0/glib.h:32:
In file included from /opt/local/include/glib-2.0/glib/gasyncqueue.h:32:
In file included from /opt/local/include/glib-2.0/glib/gthread.h:32:
In file included from /opt/local/include/glib-2.0/glib/gatomic.h:28:
/opt/local/include/glib-2.0/glib/glib-typeof.h:39:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^~~~~~~~~~~~~
1 error generated.
make[4]: *** [autotestkeywords-autotestkeywords.o] Error 1

Change History (8)

comment:1 Changed 19 months ago by rmottola (Riccardo)

I actually wonder if the issue is not in glib where the file is actually included, but only manifests when using gtk3?

comment:2 Changed 19 months ago by kencu (Ken)

might need to be forced to a c++ standard >= c++11

comment:3 Changed 19 months ago by rmottola (Riccardo)

what's the best way to do it, kencu? A portgroup to add it?

Or should I add one of the many C++11 options into cflags, -std=c++11 ?

Last edited 19 months ago by rmottola (Riccardo) (previous) (diff)

comment:4 Changed 19 months ago by kencu (Ken)

I don't see the full the full log of your build, so I don't really know if the software is already setting some standard that is incorrect, etc, etc, etc. -- that's why we always like the log, even for seemignly trivial questions... because there is usually more to it.

For this exact scenario, to see if the c++ standard is the issue, you would add this to the gtk3 Portfile:

configure.cxxflags-append -std=c++11

if that fixes the issue, then we know where we stand.

Then there is a broader question to answer about whether all software that builds against glib2 will need to be similarly forced to such a standard, etc. But that can come later.

comment:5 Changed 18 months ago by Cebtenzzre

Cc: Cebtenzzre added

comment:6 Changed 18 months ago by Christopher Nielsen <mascguy@…>

In e3fa93d6b5e621b1d407219b887e2cc601258546/macports-ports (master):

gtk3*: set cxx_standard to 2011
See: #67268

comment:7 Changed 18 months ago by jmroot (Joshua Root)

Seems like kind of overkill given that C++ is only needed to compile that one test program.

comment:8 Changed 17 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.