I am attempting to upgrade to visualboyadvance-m-2.0.0b2_4 using the default clang compiler. Here is my system, running on amd64: FreeBSD Lahan.xeno 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug 9 11:55:48 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 Clang version: FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) Target: x86_64-unknown-freebsd11.1 Thread model: posix InstalledDir: /usr/bin All of the clang compiler errors are related to various /usr/local/include/glibmm-2.4/glibmm/ header files, and occur whether I attempt to "make reinstall" using Ports or to upgrade using portmaster: FAILED: src/gtk/CMakeFiles/gvbam.dir/configfile.cpp.o /usr/bin/c++ -DBKPT_SUPPORT -DC_CORE -DENABLE_NLS -DFINAL_VERSION -DGBA_LOGGING -DHAVE_ARPA_INET_H -DHAVE_NETINET_IN_H -DHAVE_SEM_TIMEDWAIT -DHAVE_ZLIB_H -DNO_ASM -DSDL -DUSE_OPENGL -I/usr/local/include -Ifex -I/usr/local/include/SDL -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/giomm-2.4 -I/usr/local/lib/giomm-2.4/include -I/usr/local/include/gtkmm-2.4 -I/usr/local/lib/gtkmm-2.4/include -I/usr/local/include/atkmm-1.6 -I/usr/local/include/atk-1.0 -I/usr/local/include/pangomm-1.4 -I/usr/local/lib/pangomm-1.4/include -I/usr/local/include/cairomm-1.0 -I/usr/local/lib/cairomm-1.0/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/libdrm -I/usr/local/include/pango-1.0 -I/usr/local/inc lude/harfbuzz -I/usr/local/include/gtk-2.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gtk-unix-print-2.0 -I/usr/local/include/gdkmm-2.4 -I/usr/local/lib/gdkmm-2.4/include -I/usr/local/include/gtkglextmm-1.2 -I/usr/local/lib/gtkglextmm-1.2/include -I/usr/local/include/gtkglext-1.0 -I/usr/local/lib/gtkglext-1.0/include -O2 -pipe -fstack-protector -fno-strict-aliasing -O3 -DSYSCONFDIR='"/usr/local/etc"' -DWITH_LIRC='0' -DVERSION='"2.0.0b2"' -DPKGDATADIR='"/usr/local/share/vbam"' -DPACKAGE='' -DLOCALEDIR=\"/usr/local/share/locale\" -MD -MT src/gtk/CMakeFiles/gvbam.dir/configfile.cpp.o -MF src/gtk/CMakeFiles/gvbam.dir/configfile.cpp.o.d -o src/gtk/CMakeFiles/gvbam.dir/configfile.cpp.o -c src/gtk/configfile.cpp In file included from src/gtk/configfile.cpp:23: In file included from /usr/local/include/glibmm-2.4/glibmm/fileutils.h:28: In file included from /usr/local/include/glibmm-2.4/glibmm/error.h:23: In file included from /usr/local/include/glibmm-2.4/glibmm/exception.h:25: /usr/local/include/glibmm-2.4/glibmm/ustring.h:102:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using iterator_category = std::bidirectional_iterator_tag; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:103:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using value_type = gunichar; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:104:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using difference_type = std::string::difference_type; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:105:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using reference = value_type; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:106:19: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using pointer = void; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:217:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using size_type = std::string::size_type; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:218:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using difference_type = std::string::difference_type; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:220:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using value_type = gunichar; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:221:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using reference = gunichar&; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:222:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using const_reference = const gunichar&; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:224:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using iterator = ustring_Iterator<std::string::iterator>; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:225:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using const_iterator = ustring_Iterator<std::string::const_iterator>; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:229:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using reverse_iterator = std::reverse_iterator<iterator>; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:230:34: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using const_reverse_iterator = std::reverse_iterator<const_iterator>; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:256:13: error: expected ';' at end of declaration list ~ustring() noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/ustring.h:266:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions] ustring(ustring&& other); ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:276:29: warning: rvalue references are a C++11 extension [-Wc++11-extensions] ustring& operator=(ustring&& other); ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:291:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions] ustring(std::string&& src); ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:334:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions] ustring& operator=(std::string&& src); ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:340:26: warning: rvalue references are a C++11 extension [-Wc++11-extensions] ustring& assign(ustring&& src); /usr/local/include/glibmm-2.4/glibmm/ustring.h:861:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] FormatStream(const ustring::FormatStream&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:862:59: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] FormatStream& operator=(const ustring::FormatStream&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:866:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using StreamType = std::wostringstream; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:874:18: error: expected ';' at end of declaration list ~FormatStream() noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/ustring.h:1260:45: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify(const ustring::Stringify<T>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1261:59: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify<T>& operator=(const ustring::Stringify<T>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1277:51: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify(const ustring::Stringify<ustring>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1278:71: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify<ustring>& operator=(const ustring::Stringify<ustring>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1296:55: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify(const ustring::Stringify<const char*>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1297:75: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify<ustring>& operator=(const ustring::Stringify<const char*>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1315:51: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify(const ustring::Stringify<char[N]>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1316:71: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify<ustring>& operator=(const ustring::Stringify<char[N]>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1335:57: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify(const ustring::Stringify<const char[N]>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1336:77: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Stringify<ustring>& operator=(const ustring::Stringify<const char[N]>&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1634:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator==(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1635:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator==(int lhs, const ustring& rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1636:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator!=(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1637:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator!=(int lhs, const ustring& rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1638:47: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator<(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1639:47: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator<(int lhs, const ustring& rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1640:47: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator>(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1641:47: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator>(int lhs, const ustring& rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1642:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator<=(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1643:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator<=(int lhs, const ustring& rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1644:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator>=(const ustring& lhs, int rhs) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/ustring.h:1645:48: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] bool operator>=(int lhs, const ustring& rhs) = delete; ^ In file included from src/gtk/configfile.cpp:23: In file included from /usr/local/include/glibmm-2.4/glibmm/fileutils.h:28: In file included from /usr/local/include/glibmm-2.4/glibmm/error.h:23: /usr/local/include/glibmm-2.4/glibmm/exception.h:33:23: error: expected ';' at end of declaration list virtual ~Exception() noexcept = 0; ^ ; In file included from src/gtk/configfile.cpp:23: In file included from /usr/local/include/glibmm-2.4/glibmm/fileutils.h:28: /usr/local/include/glibmm-2.4/glibmm/error.h:39:11: error: expected ';' at end of declaration list ~Error() noexcept override; ^ ; /usr/local/include/glibmm-2.4/glibmm/error.h:43:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions] Glib::ustring what() const override; ^ /usr/local/include/glibmm-2.4/glibmm/error.h:54:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using ThrowFunc = void(*)(GError*); ^ In file included from src/gtk/configfile.cpp:23: /usr/local/include/glibmm-2.4/glibmm/fileutils.h:488:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using iterator = DirIterator; ^ /usr/local/include/glibmm-2.4/glibmm/fileutils.h:489:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using const_iterator = DirIterator; ^ /usr/local/include/glibmm-2.4/glibmm/fileutils.h:502:21: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Dir(const Dir&) = delete; ^ /usr/local/include/glibmm-2.4/glibmm/fileutils.h:503:32: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] Dir& operator=(const Dir&) = delete; ^ In file included from src/gtk/configfile.cpp:24: In file included from /usr/local/include/glibmm-2.4/glibmm/iochannel.h:27: /usr/local/include/glibmm-2.4/glibmm/refptr.h:93:18: error: expected ';' at end of declaration list inline RefPtr() noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:96:19: error: expected ';' at end of declaration list inline ~RefPtr() noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:99:50: error: expected ';' at end of declaration list explicit inline RefPtr(T_CppObject* pCppObject) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:105:35: error: expected ';' at end of declaration list inline RefPtr(const RefPtr& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:109:23: warning: rvalue references are a C++11 extension [-Wc++11-extensions] inline RefPtr(RefPtr&& src) noexcept; ^ /usr/local/include/glibmm-2.4/glibmm/refptr.h:109:30: error: expected ';' at end of declaration list inline RefPtr(RefPtr&& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:114:35: warning: rvalue references are a C++11 extension [-Wc++11-extensions] inline RefPtr(RefPtr<T_CastFrom>&& src) noexcept; ^ /usr/local/include/glibmm-2.4/glibmm/refptr.h:114:42: error: expected ';' at end of declaration list inline RefPtr(RefPtr<T_CastFrom>&& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:121:47: error: expected ';' at end of declaration list inline RefPtr(const RefPtr<T_CastFrom>& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:128:34: error: expected ';' at end of declaration list inline void swap(RefPtr& other) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:131:46: error: expected ';' at end of declaration list inline RefPtr& operator=(const RefPtr& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:134:34: warning: rvalue references are a C++11 extension [-Wc++11-extensions] inline RefPtr& operator=(RefPtr&& src) noexcept; ^ /usr/local/include/glibmm-2.4/glibmm/refptr.h:134:41: error: expected ';' at end of declaration list inline RefPtr& operator=(RefPtr&& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:138:46: warning: rvalue references are a C++11 extension [-Wc++11-extensions] inline RefPtr& operator=(RefPtr<T_CastFrom>&& src) noexcept; ^ /usr/local/include/glibmm-2.4/glibmm/refptr.h:138:53: error: expected ';' at end of declaration list inline RefPtr& operator=(RefPtr<T_CastFrom>&& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:145:58: error: expected ';' at end of declaration list inline RefPtr& operator=(const RefPtr<T_CastFrom>& src) noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:148:50: error: expected ';' at end of declaration list inline bool operator==(const RefPtr& src) const noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:151:50: error: expected ';' at end of declaration list inline bool operator!=(const RefPtr& src) const noexcept; ^ ; /usr/local/include/glibmm-2.4/glibmm/refptr.h:158:41: error: expected ';' at end of declaration list inline T_CppObject* operator->() const noexcept; ^ /usr/local/include/glibmm-2.4/glibmm/refptr.h:168:10: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions] inline explicit operator bool() const noexcept; ^~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 55 warnings and 20 errors generated. ninja: build stopped: subcommand failed. *** Error code 1 Stop. make[2]: stopped in /usr/ports/emulators/visualboyadvance-m *** Error code 1 Stop. make[1]: stopped in /usr/ports/emulators/visualboyadvance-m *** Error code 1 Stop. make: stopped in /usr/ports/emulators/visualboyadvance-m
Created attachment 187908 [details] log of build failure using 'script' command I created a log of the visualboyadvance-m build failure using 'script'. This attachment might be a little easier to review that my ugly copy+paste job in the initial bug report.
I'm also running into this problem with (at least) one of the ports I maintain. The GNOME repo[1] for glibmm has several newer versions, and looking over the source, it appears version 2.6 will overcome at least most of the greif endured in this version. I suppose another option would be to pass C(PP)FLAGS eg; -Wc++11-extensions -Wc++11-long-long . But this is only masking the problem with duct tape. devel/glibmm is no longer maintainable with the toolchains in FreeBSD. If this doesn't get updated to at least 2.6. I'm simply going to have to drop some ports I maintain. 1. https://github.com/GNOME/glibmm/tree/glibmm-2-6 --Chris
Kevin, Here are some hints that may get you closer to where you're trying to go... The following assumes you have made no attempt to make your port c++11 compliant. add (at least) the following to USES compiler:c++11-lang and (at least) the following to USE_CXXSTD c++11 and (at least) the following to CXXFLAGS -stdlib=libc++ -Wc++11-extensions You have a boat load of warnings, and errors! But you have been given the hints by the compiler. You will *likely* need to add most, if not all of them to the CXXFLAGS line, mentioned above. It's ugly, and it's dirty. But until the supporting libraries (headers) are updated. This is as good as it gets. Good luck! --Chris
Hi Chris, Sorry for the very long lag time replying to you. I tried adding those flags to both the Makefile for emulators/visualboyadvance-m, and later, /etc/make.conf to make my compiler c++11 compliant, but ran into the same issues. Happy to retry with gcc5 or gcc6, both of which I have installed. (But I normally just let clang do its thing unless a Port specifically requires gcc). It still coughs up the same errors, from glibmm-2.4, which I'm a little loathe to mess around with. (I know my limits, and they are many!) Given the very minor version change, I'm rather content to just leave visualboyadvance-m at its current version, and exclude it from portmaster upgrades with an -x flag, until glibmm is updated to at least 2.6. I don't know when the timeline is for that but it seems that would be the better long-term fix if we're to maintain any level of "parity" with popular GNU/Linux apps built around newer toolkits. Sorry for the trouble. I hope you're not forced to drop support for the ports you maintain. I rather love FreeBSD, and have never found a Linux distro that hit the sweet spot the same way for me. I even had a brief love affair with OpenSolaris until Oracle killed that. Then back to FreeBSD because it's just more fun.
As of ports r484102 it is now marked as broken.
Version 2.56.0 is in the port. No BROKEN statement in the Makefile. Compiles fine. Close here with overcome by events.
(In reply to w.schwarzenfeld from comment #6) > Version 2.56.0 is in the port. No BROKEN statement in the Makefile. > Compiles fine. > Close here with overcome by events. Look again. https://www.freshports.org/emulators/visualboyadvance-m is at 2.0.0b2_6 and still marked as BROKEN.
Created attachment 201911 [details] svn-diff-visualboyadvance Sorry, I only looked at glibmm.
A commit references this bug: Author: tobik Date: Mon Feb 11 08:59:01 UTC 2019 New revision: 492675 URL: https://svnweb.freebsd.org/changeset/ports/492675 Log: Unbreak emulators/visualboyadvance-m fex/fex/File_Extractor.h:181:58: error: cannot initialize return object of type 'blargg_err_t' (aka 'const char *') with an lvalue of type 'const int' inline blargg_err_t File_Extractor::rewind_v() { return blargg_ok; } PR: 223538 Submitted by: w.schwarzenfeld@utanet.at (based on) Changes: head/emulators/visualboyadvance-m/Makefile head/emulators/visualboyadvance-m/files/patch-fex_fex_blargg__common.h head/emulators/visualboyadvance-m/files/patch-src_gba_Cheats.cpp