Line 129 title std::chronos (Feb-Aug/Seth22)

So std::chronos compile errors on my Arch, Line 129 change to c+±17 lambda functions inducting #define OF_USE_GST_GL, graddle experimental 0.9.3, then #define GST_USE_UNSTABLE_API, #include <gst/gl/gl.h>, #include <gst/gl/gl.h>.

yay -S openframeworks-nightly
:: Checking for conflicts…
:: Checking for inner conflicts…
[Aur:1] openframeworks-nightly-20191119-1

:: (1/1) Downloaded PKGBUILD: openframeworks-nightly
1 openframeworks-nightly (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)

Lines 129

ifeq ("$(GCC_MAJOR_GT_4)","1")
	PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
	# PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++17 -DGCC_HAS_REGEX
endif

else
ifeq ($(CXX),g+±5)
# PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++17 -DGCC_HAS_REGEX
else
ifeq ($(CXX),g+±4.9)
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
else
ifeq ($(CXX),g+±4.8)
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++21
else
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++21
endif
endif
endif
endif

Chronos

-Wl,-rpath=./libs:./bin/libs -Wl,–as-needed -Wl,–gc-sections -fuse-ld=gold -lrt -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lpulse-simple -lpulse -pthread -lasound -lGLEW -lGL -lX11 -lGLU -lOpenGL -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama
11.2/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofFileUtils.o):ofFileUtils.cpp:function ofDirectory::isDirectoryEmpty(boost::filesystem::path const&, bool): error: undefined reference to ‘boost::filesystem::detail::dir_itr_close(void*&, void*&)’
11.2/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofFileUtils.o):ofFileUtils.cpp:function void boost::sp_adl_block::intrusive_ptr_release<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter> const*): error: undefined reference to ‘boost::filesystem::detail::dir_itr_close(void*&, void*&)’
collect2: error: ld returned 1 exit status
make[1]: *** [11.2/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: bin/Error 1
make[1]: Leaving directory ‘11.2’
make: *** [11.2/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

from threading import Thread

import gi

gi.require_version(“Gst”, “1.0”)

from gi.repository import Gst, GLib

Gst.init()

main_loop = GLib.MainLoop()
thread = Thread(target=main_loop.run)
thread.start()

pipeline = Gst.parse_launch(“ksvideosrc ! decodebin ! videoconvert ! autovideosink”)

pipeline = Gst.parse_launch(“v4l2src ! decodebin ! videoconvert ! autovideosink”)
pipeline.set_state(Gst.State.PLAYING)

try:
while True:
sleep(0.1)
except KeyboardInterrupt:
pass

pipeline.set_state(Gst.State.NULL)
main_loop.quit()

Raw

// ### Todo 19 liner

################################################################################

CONFIGURE CORE PLATFORM MAKEFILE

This file has linux common rules for all the platforms (x86_64, i386,armv6l

and armv7l)

################################################################################

################################################################################

PLATFORM SPECIFIC CHECKS

This is a platform defined section to create internal flags to enable or

disable the addition of various features within this makefile. For

instance, on Linux, we check to see if there GTK±2.0 is defined, allowing

us to include that library and generate DEFINES that are interpreted as

ifdefs within the openFrameworks core source code.

################################################################################

ifeq ($(PLATFORM_ARCH),armv6l)
LINUX_ARM=1
endif

ifeq ($(PLATFORM_ARCH),armv7l)
LINUX_ARM=1
endif

#check if gtk exists and add it
ifeq ($(CROSS_COMPILING),1)
HAS_SYSTEM_GTK3 = $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gtk±3.0 --exists; echo $$?)
HAS_SYSTEM_GTK2 = $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gtk±2.0 --exists; echo $$?)
else
HAS_SYSTEM_GTK3 = $(shell pkg-config gtk±3.0 --exists; echo $$?)
HAS_SYSTEM_GTK2 = $(shell pkg-config gtk±2.0 --exists; echo $$?)
endif

#check if mpg123 exists and add it
ifeq ($(CROSS_COMPILING),1)
HAS_SYSTEM_MPG123 = $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config libmpg123 --exists; echo $$?)
else
HAS_SYSTEM_MPG123 = $(shell pkg-config libmpg123 --exists; echo $$?)
endif

#check gstreamer version
ifndef GST_VERSION
ifeq ($(CROSS_COMPILING),1)
ifeq ($(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?),0)
GST_VERSION = 1.0
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
endif
else
GST_VERSION = 0.10
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
$(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?))
endif
endif
else
ifeq ($(shell pkg-config gstreamer-1.0 --exists; echo $$?),0)
GST_VERSION = 1.0
else
GST_VERSION = 0.10
endif
endif
endif

################################################################################

PLATFORM DEFINES

Create a list of DEFINES for this platform. The list will be converted into

CFLAGS with the “-D” flag later in the makefile. An example of fully

qualified flag might look something like this: -DTARGET_OPENGLES2

DEFINES are used throughout the openFrameworks code, especially when making

#ifdef decisions for cross-platform compatibility. For instance, when

choosing a video playback framework, the openFrameworks base classes look at

the DEFINES to determine what source files to include or what default player

to use.

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_DEFINES =

add OF_USING_GTK define IF we have it defined as a system library

ifeq ($(HAS_SYSTEM_GTK2),0)
PLATFORM_DEFINES += OF_USING_GTK
endif
ifeq ($(HAS_SYSTEM_GTK3),0)
PLATFORM_DEFINES += OF_USING_GTK
endif

add OF_USING_MPG123 define IF we have it defined as a system library

ifeq ($(HAS_SYSTEM_MPG123),0)
PLATFORM_DEFINES += OF_USING_MPG123
endif

add OF_USE_GST_GL if requested

ifdef USE_GST_GL
PLATFORM_DEFINES += OF_USE_GST_GL
endif

ifdef OF_USING_STD_FS
PLATFORM_DEFINES += “OF_USING_STD_FS=1”
endif

################################################################################

PLATFORM REQUIRED ADDON

This is a list of addons required for this platform. This list is used to

EXCLUDE addon source files when compiling projects, while INCLUDING their

header files. During core library compilation, this is used to include

required addon header files as needed within the core.

For instance, if you are compiling for Android, you would add ofxAndroid

here. If you are compiling for Raspberry Pi, you would add ofxRaspberryPi

here.

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_REQUIRED_ADDONS =

################################################################################

PLATFORM CFLAGS

This is a list of fully qualified CFLAGS required when compiling for this

platform. These flags will always be added when compiling a project or the

core library. These flags are presented to the compiler AFTER the

PLATFORM_OPTIMIZATION_CFLAGS below.

Note: Leave a leading space when adding list items with the += operator

################################################################################

Code Generation Option Flags (Code Gen Options (Using the GNU Compiler Collection (GCC)))

find out version of gcc:

< 4.7.x c++0x

>= 4.7.x c++11

>= 4.9.x c++14

other compilers c++11 by now

PLATFORM_CXXFLAGS = -Wall -Werror=return-type
PLATFORM_CXXVER = -std=c++17

GCC_MAJOR := $(shell expr gcc -dumpversion | cut -f1 -d.)
GCC_MINOR := $(shell expr gcc -dumpversion | cut -f2 -d.)

ifeq ("$(GCC_MAJOR)",“4”)
ifeq ($(shell expr $(GCC_MINOR) < 7), 1)
PLATFORM_CXXVER = -std=c++0x
PLATFORM_CXXFLAGS += -DHAS_TLS=0
else
ifeq ("$(GCC_MINOR)",“9”)
PLATFORM_CXXVER = -std=c++14
PLATFORM_CFLAGS += DGCC_HAS_REGEX
else
PLATFORM_CXXVER = -std=c++11
endif
endif
else
ifeq ($(shell expr $(GCC_MAJOR) >= 8), 1)
# c++17 for gcc 8 and newer
PLATFORM_CXXVER = -std=c++17
else
# c++14 for gcc 4 and newer
PLATFORM_CXXVER = -std=c++14
endif
PLATFORM_CXXFLAGS += -DGCC_HAS_REGEX
endif

PLATFORM_CFLAGS = $(PLATFORM_CXXFLAGS)
PLATFORM_CXXFLAGS += $(PLATFORM_CXXVER)

################################################################################

PLATFORM LDFLAGS

This is a list of fully qualified LDFLAGS required when linking for this

platform. These flags will always be added when linking a project.

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_LDFLAGS = -Wl,-rpath=./libs:./bin/libs -Wl,–as-needed -Wl,–gc-sections

ifeq ($(OF_USING_STD_FS),1)
# gcc 8 need special file system linking with -lstdc++fs. gcc 9 onwards doesn’t
ifeq ("$(GCC_MAJOR)",“8”)
PLATFORM_LDFLAGS += -lstdc++fs
endif
endif

################################################################################

PLATFORM OPTIMIZATION CFLAGS

These are lists of CFLAGS that are target-specific. While any flags could

be conditionally added, they are usually limited to optimization flags.

These flags are added BEFORE the PLATFORM_CFLAGS.

PLATFORM_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to

RELEASE targets.

PLATFORM_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to

DEBUG targets.

Note: Leave a leading space when adding list items with the += operator

################################################################################

ifndef PROJECT_OPTIMIZATION_CFLAGS_RELEASE
# RELEASE Debugging options (Debugging Options (Using the GNU Compiler Collection (GCC)))
PLATFORM_OPTIMIZATION_CFLAGS_RELEASE = -O3

#ifneq ($(LINUX_ARM),1)
#    PLATFORM_OPTIMIZATION_CFLAGS_RELEASE += -march=native -mtune=native
#endif

else
PLATFORM_OPTIMIZATION_CFLAGS_RELEASE = $(PROJECT_OPTIMIZATION_CFLAGS_RELEASE)
endif

ifndef PROJECT_OPTIMIZATION_CFLAGS_DEBUG
# DEBUG Debugging options (Debugging Options (Using the GNU Compiler Collection (GCC)))
PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g3
endif

################################################################################

PLATFORM CORE EXCLUSIONS

During compilation, these makefiles will generate lists of sources, headers

and third party libraries to be compiled and linked into a program or core

library. The PLATFORM_CORE_EXCLUSIONS is a list of fully qualified file

paths that will be used to exclude matching paths and files during list

generation.

Each item in the PLATFORM_CORE_EXCLUSIONS list will be treated as a complete

string unless teh user adds a wildcard (%) operator to match subdirectories.

GNU make only allows one wildcard for matching. The second wildcard (%) is

treated literally.

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_CORE_EXCLUSIONS =

core sources

PLATFORM_CORE_EXCLUSIONS += %.mm
PLATFORM_CORE_EXCLUSIONS += %.m
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofQtUtils.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofQuickTimeGrabber.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofQuickTimePlayer.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowGrabber.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowPlayer.cpp

ifeq ($(LINUX_ARM),1)
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/app/ofAppGlutWindow.cpp
else
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/app/ofAppEGLWindow.cpp
endif

third party

PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glew/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/cairo/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/videoInput/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/freetype/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/FreeImage/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/assimp/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/rtAudio/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openssl/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/boost/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/curl/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/uriparser/%

ifeq ($(USE_FMOD),0)
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/fmod/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp
endif

################################################################################

PLATFORM HEADER SEARCH PATHS

These are header search paths that are platform specific and are specified

using fully-qualified paths. The include flag (i.e. -I) is prefixed

automatically. These are usually not required, but may be required by some

experimental platforms such as the raspberry pi or other other embedded

architectures.

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_HEADER_SEARCH_PATHS =

################################################################################

PLATFORM LIBRARIES

These are library names/paths that are platform specific and are specified

using names or paths. The library flag (i.e. -l) is prefixed automatically.

PLATFORM_LIBRARIES are libraries that can be found in the library search

paths.

PLATFORM_STATIC_LIBRARIES is a list of required static libraries.

PLATFORM_SHARED_LIBRARIES is a list of required shared libraries.

PLATFORM_PKG_CONFIG_LIBRARIES is a list of required libraries that are

under system control and are easily accesible via the package

configuration utility (i.e. pkg-config)

See the helpfile for the -l flag here for more information:

Link Options (Using the GNU Compiler Collection (GCC))

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_LIBRARIES =

ifneq ($(LINUX_ARM),1)
PLATFORM_LIBRARIES += glut

#PLATFORM_LIBRARIES += gstgl-1.0
#PLATFORM_LIBRARIES += SM
#PLATFORM_LIBRARIES += ICE

endif
ifneq ($(PLATFORM_ARCH),armv6l)
PLATFORM_LIBRARIES += X11
PLATFORM_LIBRARIES += Xrandr
PLATFORM_LIBRARIES += Xxf86vm
PLATFORM_LIBRARIES += Xi
PLATFORM_LIBRARIES += Xcursor
PLATFORM_LIBRARIES += dl
PLATFORM_LIBRARIES += pthread
endif

PLATFORM_LIBRARIES += freeimage
ifeq ($(OF_USING_STD_FS),1)
PLATFORM_LIBRARIES += stdc++fs
else
PLATFORM_LIBRARIES += boost_filesystem
PLATFORM_LIBRARIES += boost_system
endif
PLATFORM_LIBRARIES += pugixml
PLATFORM_LIBRARIES += uriparser

#static libraries (fully qualified paths)
PLATFORM_STATIC_LIBRARIES =

shared libraries

PLATFORM_SHARED_LIBRARIES =

#openframeworks core third party

PLATFORM_PKG_CONFIG_LIBRARIES =
PLATFORM_PKG_CONFIG_LIBRARIES += cairo
PLATFORM_PKG_CONFIG_LIBRARIES += zlib
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-app-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-video-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-base-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += libudev
PLATFORM_PKG_CONFIG_LIBRARIES += freetype2
PLATFORM_PKG_CONFIG_LIBRARIES += fontconfig
PLATFORM_PKG_CONFIG_LIBRARIES += sndfile
PLATFORM_PKG_CONFIG_LIBRARIES += openal

PLATFORM_PKG_CONFIG_LIBRARIES += openssl

PLATFORM_PKG_CONFIG_LIBRARIES += libcurl

ifeq ($(CROSS_COMPILING),1)
ifeq “$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)” “1”
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
PLATFORM_LIBRARIES += Xinerama
endif
else
ifeq “$(shell pkg-config --exists glfw3 && echo 1)” “1”
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
PLATFORM_LIBRARIES += Xinerama
endif
endif

ifeq ($(CROSS_COMPILING),1)
ifeq “$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists rtaudio && echo 1)” “1”
PLATFORM_PKG_CONFIG_LIBRARIES += rtaudio
else
PLATFORM_LIBRARIES += rtaudio
endif
else
ifeq “$(shell pkg-config --exists rtaudio && echo 1)” “1”
PLATFORM_PKG_CONFIG_LIBRARIES += rtaudio
else
PLATFORM_LIBRARIES += rtaudio
endif
endif

ifneq ($(LINUX_ARM),1)
PLATFORM_PKG_CONFIG_LIBRARIES += libpulse-simple
PLATFORM_PKG_CONFIG_LIBRARIES += alsa
PLATFORM_PKG_CONFIG_LIBRARIES += gl
PLATFORM_PKG_CONFIG_LIBRARIES += glu
PLATFORM_PKG_CONFIG_LIBRARIES += glew
endif

conditionally add GTK

ifeq ($(HAS_SYSTEM_GTK3),0)
PLATFORM_PKG_CONFIG_LIBRARIES += gtk±3.0
else
ifeq ($(HAS_SYSTEM_GTK2),0)
PLATFORM_PKG_CONFIG_LIBRARIES += gtk±2.0
endif
endif

conditionally add mpg123

ifeq ($(HAS_SYSTEM_MPG123),0)
PLATFORM_PKG_CONFIG_LIBRARIES += libmpg123
endif

conditionally add gstreamer-gl

ifdef USE_GST_GL
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-gl-$(GST_VERSION)
endif

################################################################################

PLATFORM LIBRARY SEARCH PATHS

These are library search paths that are platform specific and are specified

using fully-qualified paths. The lib search flag (i.e. -L) is prefixed

automatically. The -L paths are used to find libraries defined above with

the -l flag.

See the the following link for more information on the -L flag:

Directory Options (Using the GNU Compiler Collection (GCC))

Note: Leave a leading space when adding list items with the += operator

################################################################################

PLATFORM_LIBRARY_SEARCH_PATHS =

################################################################################

PLATFORM FRAMEWORKS

These are a list of platform frameworks.

These are used exclusively with Darwin/OSX.

Note: Leave a leading space when adding list items with the += operator

################################################################################
#PLATFORM_FRAMEWORKS =

################################################################################

PLATFORM FRAMEWORK SEARCH PATHS

These are a list of platform framework search paths.

These are used exclusively with Darwin/OSX.

Note: Leave a leading space when adding list items with the += operator

################################################################################
#PLATFORM_FRAMEWORKS_SEARCH_PATHS =

################################################################################

LOW LEVEL CONFIGURATION BELOW

The following sections should only rarely be modified. They are meant for

developers who need fine control when, for instance, creating a platform

specific makefile for a new openFrameworks platform, such as raspberry pi.

################################################################################

################################################################################

PLATFORM CONFIGURATIONS

These will override the architecture vars generated by configure.platform.mk

################################################################################
#PLATFORM_ARCH =
#PLATFORM_OS =
#PLATFORM_LIBS_PATH =

################################################################################

PLATFORM CXX

Don’t want to use a default compiler?

################################################################################
#PLATFORM_CXX=

afterplatform: after
@echo

Echo

$ make -j40 1>&0 | grep error

11.2/libs/openFrameworks/gl/ofLight.cpp
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (GCC)

apply plugin: ‘com.android.model.library’

#include <glib-object.h>
#include <glib.h>
#include
#include “ofVideoPlayer.h”

11.2/libs/tess2/lib/linux64/libtess2.a -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lpulse-simple -lpulse -pthread -lasound -lGLEW -lGL -lX11 -lGLU -lOpenGL -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama
11.2/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofFileUtils.o):ofFileUtils.cpp:function ofDirectory::isDirectoryEmpty(boost::filesystem::path const&, bool): error: undefined reference to ‘boost::filesystem::detail::dir_itr_close(void*&, void*&)’
11.2/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofFileUtils.o):ofFileUtils.cpp:function void boost::sp_adl_block::intrusive_ptr_release<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter> const*): error: undefined reference to ‘boost::filesystem::detail::dir_itr_close(void*&, void*&)’
collect2: error: ld returned 1 exit status
make[1]: *** [11.2/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: ] Error 1
make[1]: Leaving directory ‘11.2/apps/’
make: *** [11.2/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

0

patching AI for speed control

struct aiScene;
struct aiNode;

class ofxAssimpModelLoader{

public:

	void setSpeed(float s){
		if(scene){
			for (int i = 0; i< animations.size(); i++) {
				animations[i].setSpeed(s);
			}
		}
	}

class ofxAssimpAnimation {
float aispeed;
void setSpeed(float speed);

this->scene = scene;
this->animation = animation;
animationCurrTime = 0;
animationPrevTime = 0;
bPlay = false;
bPause = false;
loopType = OF_LOOP_NONE;
progress = 0;
progressInSeconds = 0;
progressInMilliSeconds = 0;
durationInSeconds = 0;
durationInMilliSeconds = 0;
AIspeed = 1;

if(!bPlay || bPause) {
return;
}

    float duration = getDurationInSeconds();
    float timeStep = animationCurrTime - animationPrevTime;
    // float positionStep = timeStep / (float)duration;
    float positionStep = (timeStep / (float)duration) * speed; // // //
    float position = getPosition() + positionStep;

    if(position > 1.0 && loopType == OF_LOOP_NONE) {
        position = 1.0;
        stop();
    } // negative speeds
	else if(position < 0.0 && loopType == OF_LOOP_NONE) {
        position = 0.0;
        stop();

    } else if(position > 1.0 && loopType == OF_LOOP_NORMAL) {
        position = fmod(position, 1.0f);
    } else if(position < 0.0 && loopType == OF_LOOP_NORMAL) {
        position += 1.0;
    }

	else if(position > 1.0 && loopType == OF_LOOP_PALINDROME) {
        // TODO.
		position = 1.0;
		speed = -ABS(speed);


    } else if(position < 0.0 && loopType == OF_LOOP_PALINDROME) {
        // TODO.
		position = 0.0;
		speed = ABS(speed);
    }

    setPosition(position);

Doesn’t solve messing with std::chronos
intrusive_ptr_release
thread_safe_counter
thread_safe_counter> const*): error: undefined reference to ‘boost::filesystem::detail::dir_itr_close(void*&, void*&)’

/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration

ifeq ("$(GCC_MAJOR_GT_4)","1")
	# PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
	PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++17 -DGCC_HAS_REGEX
endif

Solving Chronos for radioactive decay with negative mass still doesn’t solve the issue. IRL it will. Date before the time of formation of the Solar System. These 34 are known as primordial half-life

#include “ofMain.h”
#include “RadioactiveDecay.h”

class ofApp : public ofBaseApp {

public:
		// RadioactiveDecay ra(10 , 0.998761);
		RadioactiveDecay ra;//(10 , 0.998761);
		vector<float> vals;
		int idx = 0;

		void setup(){
			ra.setup(10 , -0.998761);
			ra.setup(100 , -0.998761, 1, 90, 2);
			vals.assign(ofGetWidth(),0.0f);
		}

		void keyPressed(int k){
			if(k=='b') ra.boundmode = (ra.boundmode +1)%3;
		}

		void update(){
			if(ofGetMousePressed()){
				ra.x = ofMap(ofGetMouseY(), 0, ofGetHeight(),100,0);
				float w2 = ofGetWidth()/2;
				mouseX < w2 ?
				ra.k = ofMap(mouseX, 0,w2,-0.8,-1.1) :
				ra.k = ofMap(mouseX, w2,ofGetWidth(),1.1,0.8) ;
				// ra.k = ofMap(ofGetMouseX(), 0, ofGetWidth(),-0.8,-1);
			}
			vals[idx] = ra.update();
			// cout << "ra.x " << ra.x << " " <<vals[idx]<< endl;
			idx = (idx+1)%ofGetWidth();
		}

		void draw(){
			glColor3f(0,1,0);
			ofLine(ofGetWidth()/2, 0,ofGetWidth()/2, ofGetHeight());
			float a = fmodf(ofGetElapsedTimef()/5.0, 1);
			glColor3f(a,a*2.16,a);
			for(size_t i=0; i<ofGetWidth();i++)
			{
				float v = ofMap(vals[i], 0, 100, ofGetHeight()/2, 0);
				ofDrawRectangle(i, v, 2, 2);
			}

			glColor3f(a*1.61,a,a*2.16);
			string info = "RadioactiveDecay\n\n k: "+ofToString(ra.k)+
			"\n x: "+ofToString(ra.x)+"\n min: "+ofToString(ra.min)+
			"\n max: "+ofToString(ra.max)+"\n bm: "+ofToString(ra.boundmode);
			ofDrawBitmapString(info,10,20);
			ofDrawBitmapString("Positive Mass",ofGetWidth()/4,20);
			ofDrawBitmapString("Negative Mass",ofGetWidth()-ofGetWidth()/4,20);
		}

};

//========================================================================
int main( ){
ofSetupOpenGL(1024,512*1.375, OF_WINDOW); // <-------- setup the GL context

// this kicks ooff the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp(new ofApp());

}

// Radioactive Decay
// f(x) = -kx
// Created on 20151021.

#pragma once

struct RadioactiveDecay {

public:

	float x=1.0,k=-0.987;
	float min=0.0,max=1.0;
	int boundmode=0;

	RadioactiveDecay(){}
	RadioactiveDecay(float x, float k){setup(x,k);}
	~RadioactiveDecay(){}

	void setup(float x, float k, float min=0, float max=1,int bm=0){
		this->x = x;
		this->k = k;
		this->min = min;
		this->max = max;
		this->boundmode = bm;
	}
	inline float update(){
		// x = x - k*x;
		x = -k*x;
		bound(x);
		return x;
	}
	inline void bound(float &x){
		switch(boundmode){
			case 0: default: break;
			case 1: x = CLAMP(x,min,max); break;
			case 2: x > max ? x = min : x < min ? x = max: x; break;
		}
	}

};

1 Like

It is great to see @opseidon trying to solve the errors of Chronos, your father in mythology.

In other hand, about potential filesystem issues, there is a proposal to maybe use a separate namespace than std::filesystem to uniformize in OF.
there is a sketch here that can someday become a draft pull request

and some discussion here

@dimitre Thanks for sharing, next full tide, will have a look.

In the meantime, the machine doeds not compile off. Others do, this doesnt

You mean Khronos. Chronos I can handle fine.-

Chronos ticking ticking ticking

#pragma once
#include <chrono>
#include <ctime>
#include <string>
#include <iostream>
#include <math.h>

struct MiniKronos {

	std::chrono::time_point<
	std::chrono::high_resolution_clock> alpha;

	float elapsed=0.0, dt=0.0, fps=0.0, fpss=0.0;
	int  years,months,days,hours,minutes,seconds,millis;
	float beatframe=0.0f;

	MiniKronos(){
		alpha = std::chrono::high_resolution_clock::now();
	}

	inline int tickYear() {

		auto t0 = std::chrono::high_resolution_clock::now();
		auto kronoelapsed =  t0 - alpha;
		auto elapsedkf = std::chrono::duration_cast<std::chrono::duration<float>>(kronoelapsed);
		auto dt = elapsedkf.count() - elapsed;
		auto elapsed = elapsedkf.count();

		calcYMDHMSM();

		// return dt;
		return years;

	}



	void calcYMDHMSM(){
		seconds = (int) (elapsed) % 60;
		minutes = (int) (elapsed/60.0) % 60;
		hours = (int) (elapsed/3600.0) % 24;
		days = (int) (elapsed/86400.0) % 30;
		months = (int) (elapsed/2592000.0) % 12;
		years = (int) (elapsed/31104000.0); // adjust
		float rm = (elapsed-(float)seconds);
		millis = (int) ( rm * 1000 ) % 1000 ;
		// 1 bpm ~3600 seconds
		int elapsed10 = ( (int)elapsed % 3600 ); // 10
		beatframe = elapsed10 + 0.001 * (float) millis;
	}



};


Hello dear programmers.

Still issues, this machine, c+±14 some errors, c+±17 chronos errors.

Doesn’t matter how many threads I throw at it, even at 96k solid.

Is it what in machine, you may know?

Machine says errors at /usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:52:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration
/usr/include/c++/12.1.0/bits/chrono.h:1326:13: error: ‘namespace std::filesystem { }’ conflicts with a previous declaration

bug testing example code, save as timex.cpp

#include "Kronos.h"
#include "ofMain.h"

class ofApp : public ofBaseApp{
public:

	Kronos audiokronos;
	Kronos updatekronos;
	Kronos keykronos;
	Kronos mousekronos;
	ofSoundStream sound;
	Kronos *kronosptr=NULL;
	float bpm=60;

	void setup(){
		ofSetFrameRate(60);
		ofSetVerticalSync(0);
		kronosptr = &audiokronos;

		// sound.setup(this, 2, 0, 44100, 512, 4); // adt 0.01 afps 86.3
		// sound.setup(this, 2, 0, 44100, 128, 4); // adt 0.002 afps 350
		ofSoundStreamSettings settings;
		// settings.setInListener(this);
		settings.setOutListener(this);
		settings.sampleRate = 44100;
		settings.sampleRate = 96000;
		settings.bufferSize = 64;
		settings.numOutputChannels = 1;
		// settings.numInputChannels = 2;
		// settings.numInputChannels = 0; // turn off mic, works snd if no perms
		// use PULSE to use other snds
		settings.setApi(ofSoundDevice::PULSE);

		// etc..
		kronosptr = &audiokronos;
		kronosptr = &updatekronos;
		kronosptr = &keykronos;
		kronosptr = &mousekronos;

		sound.setup(settings);
	}

	void keyPressed(int k){
		keykronos.tick();

		if(k=='b') bpm /= 2;
		if(k=='B') bpm *= 2;
		if(k=='n') bpm *= 0.91;
		if(k=='N') bpm *= 1.21;
		if(k=='m') bpm -= 1;
		if(k=='M') bpm += 1;

		if(k=='a') kronosptr = &audiokronos;
		if(k=='s') kronosptr = &updatekronos;
		if(k=='d') kronosptr = &keykronos;
		if(k=='f') kronosptr = &mousekronos;
		if(k=='g') kronosptr = &audiokronos;
	}

	// void audioOut(float * outpt, int bufferSize, int nChannels){
	void audioOut(ofSoundBuffer &b){
		audiokronos.tick();
	}

	void update(){
		updatekronos.tick();
		kronosTick();

		// cout << updatekronos.millis <<" " << audiokronos.millis << endl;
	}

	void draw(){
		// f32 bpm = 120;//60;
		// f32 a = audiokronos.getSequgetElapsedTimeMinutesSecondsencer(bpm, 3);
		f32 a = kronosptr->getSequencer(bpm, 3);
		f32 b = kronosptr->getSequencer(bpm, 4);
		f32 c = kronosptr->getSequencer(bpm, 16);
		f32 d = kronosptr->getSequencer(bpm, 1);

		// cout << updatekronos.millis <<" " << audiokronos.millis << "   " << a << " " << b << " " << c <<endl;

		string inf = "Kronos Example\n\noffps: "+ofToString(ofGetFrameRate())+"\n"+"ofelapsed: "+ofToString(ofGetElapsedTimef())+"\n\n";

		inf += "kdt: "+ofToString(updatekronos.getDt())+"\n";
		inf += "kelapsed: "+ofToString(updatekronos.getElapsed())+"\n";
		inf += "kfps: "+ofToString(updatekronos.getFps())+"\n";
		inf += "\n";
		inf += "adt: "+ofToString(audiokronos.getDt())+"\n";
		inf += "aelapsed: "+ofToString(audiokronos.getElapsed())+"\n";
		inf += "afps: "+ofToString(audiokronos.getFps())+"\n\n";
		inf += "kfpsraw: "+ofToString(keykronos.getFpsRaw())+"\n";
		inf += "catfpsraw: "+ofToString(mousekronos.getFpsRaw())+"\n";
		inf += "\n";
		inf += "dt: "+ofToString(  getKronosDt()  )+"\n";
		inf += "elapsed: "+ofToString(  getKronosElapsed())+"\n";
		inf += "fps: "+ofToString( getKronosFps())+"\n";
		inf += "\n";
		inf += updatekronos.getElapsedTimeMinutesSeconds() +" millis 0."+ofToString(updatekronos.millis)  +"  beatframe "+ofToString(updatekronos.beatframe);//+" brmax "+ofToString(updatekronos.brmax);
		inf += "\n";
		inf += updatekronos.getUptime()+"\n";
		inf += "date "+updatekronos.getDate()+"\n";
		inf += "time "+updatekronos.getTime()+"\n";
		inf += "\n";
		inf += "bpm "+ofToString(bpm)+"\n";
		inf +=  ofToString(d) +"\n" + ofToString(a) +"\n"+ ofToString(b)+"\n" + ofToString(c);
		{
			float x = kronosptr->getSequencer( bpm, ofGetWidth() );
			ofDrawCircle(x, ofGetHeight()/2, 25);
			x = (int) kronosptr->getSequencer( bpm, 16 ) * ofGetWidth()/16;
			ofDrawCircle(x, ofGetHeight()/3, 25);
			x = (int) kronosptr->getSequencer( bpm, 4 ) * ofGetWidth()/4;
			ofDrawCircle(x, ofGetHeight()/4, 25);
			x = (int) kronosptr->getSequencer( bpm, 3 ) * ofGetWidth()/3;
			ofDrawCircle(x, ofGetHeight()/8, 25);
			x = (int) kronosptr->getSequencer( bpm, 7 ) * ofGetWidth()/7;
			ofDrawCircle(x, ofGetHeight()/16, 25);
			// 4x4
			x = (int) kronosptr->getSequencer( bpm, 4 ) * ofGetWidth()/4;
			ofDrawCircle(x, ofGetHeight()/1.5, 25);
			x = (int) kronosptr->getSequencer( bpm, 16 ) * ofGetWidth()/16;
			ofDrawCircle(x, ofGetHeight()/1.55, 25);
		}

		ofDrawBitmapString(inf, 2, 10);
	}


	// mouse etc
	// void mouseMoved(int x, int y ){ mousekronos.tick(); }
	// void mouseDragged(int x, int y, int button){ mousekronos.tick(); }
	void mousePressed(int x, int y, int button){ mousekronos.tick(); }
	// void mouseReleased(int x, int y, int button){ mousekronos.tick(); }
	// void mouseEntered(int x, int y){ mousekronos.tick(); }
	// void mouseExited(int x, int y){ mousekronos.tick(); }

};

int main(){
	ofSetupOpenGL(400, 500, OF_WINDOW);
	ofRunApp(new ofApp());
}