Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: OwlShmBuffer.m: error: incompatible type for argument 2 of ‘CGContextDrawImage’ #13

Open
barracuda156 opened this issue Nov 27, 2024 · 44 comments

Comments

@barracuda156
Copy link

The first error was OwlKnownClientsManager.m:46: error: ‘for’ loop initial declaration used outside C99 mode; after passing -std=c99, the build proceeded, but failed here:

ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlCompositor.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlCompositor.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlIOSurfaceBuffer.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlRegion.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlRegion.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlShmBuffer.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlSubcompositor.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlSubcompositor.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlSubsurface.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlSubsurface.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlSurface.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlSurface.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m: In function ‘-[OwlIOSurfaceBuffer dealloc]’:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m:38: warning: implicit declaration of function ‘IOSurfaceDecrementUseCount’
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlSurfaceState.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlSurfaceState.o
ccache /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlZowlIOSurfaceManagerV1.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlZowlIOSurfaceManagerV1.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m: In function ‘-[OwlShmBuffer drawInRect:]’:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m:175: error: incompatible type for argument 2 of ‘CGContextDrawImage’
make: *** [Compositor/OwlShmBuffer.o] Error 1
make: *** Waiting for unfinished jobs....
@barracuda156
Copy link
Author

Also fails with gcc14:

ccache /opt/local/bin/gcc-mp-14 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlSurface.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -pipe -Os -arch ppc -c -o Compositor/OwlSurface.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m: In function '-[OwlIOSurfaceBuffer dealloc]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m:38:5: error: implicit declaration of function 'IOSurfaceDecrementUseCount'; did you mean 'IOSurfaceGetPlaneCount'? [-Wimplicit-function-declaration]
   38 |     IOSurfaceDecrementUseCount(_surface);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |     IOSurfaceGetPlaneCount
make: *** [Compositor/OwlIOSurfaceBuffer.o] Error 1
make: *** Waiting for unfinished jobs....
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m: In function '-[OwlShmBuffer drawInRect:]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m:175:33: error: incompatible type for argument 2 of 'CGContextDrawImage'
  175 |     CGContextDrawImage(context, rect, _image);
      |                                 ^~~~
      |                                 |
      |                                 NSRect
In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9,
                 from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
                 from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25,
                 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30,
                 from /System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:8,
                 from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:114,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.h:19,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlShmBuffer.m:19:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:659:58: note: expected 'CGRect' but argument is of type 'NSRect'
  659 | CG_EXTERN void CGContextDrawImage(CGContextRef c, CGRect rect,
      |                                                   ~~~~~~~^~~~
make: *** [Compositor/OwlShmBuffer.o] Error 1

@barracuda156
Copy link
Author

IOSurfaceDecrementUseCount is 10.6+ (and apparently still missing in the early 10.6 on powerpc): https://developer.apple.com/documentation/iosurface/1419377-iosurfacedecrementusecount

The type should be CGRect? Given it is 10.0+, supposed to be identical across all macOS versions: https://developer.apple.com/documentation/coregraphics/1454845-cgcontextdrawimage

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

Indeed, so that takes a CGRect, not an NSRect; I wonder how it built on newer systems. All of IOSurface is 10.6+, so we're going to need to disable it for 10.5.

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

The other thing about IOSurface is I never made a full EGL implementation based on it / OwlIOSurfaceBuffer; if you happen to be proficient in GL, it'd be great if you could work on that.

@barracuda156
Copy link
Author

All of IOSurface is 10.6+, so we're going to need to disable it for 10.5.

On 10.5 there is also no libdispatch (and I could not make it build from source on Leopard either: the port is there, it builds and seems to work fine on 10.6 ppc, but fails on 10.5; perhaps gcc-4.2 lacks something in 10.5.8, even though it is nominally released after the one of 10a190, maybe also Libc if not the kernel needs to be rebuilt to support libdispatch).

The other thing about IOSurface is I never made a full EGL implementation based on it / OwlIOSurfaceBuffer; if you happen to be proficient in GL, it'd be great if you could work on that.

Unfortunately, no, I am not.

@RJVB Tagging you re EGL.

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

On 10.5 there is also no libdispatch

I had to drop most of libdispatch usage when making it build on GNU/Hurd anyway. What's left is some in OwlMIG.m; that should be rewritten anyway.

@barracuda156
Copy link
Author

BTW, a stupid question: how to pass two flags at a time? However I pass those to environment, only the first is actually used and another one discarded.

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

Do you mean the flags for a C compiler? Just the following should work:

$ CFLAGS='-foo -bar' ../configure

only the first is actually used and another one discarded.

At which stage? Do you not end up with CFLAGS = -foo -bar in the generated Makefile?

@barracuda156
Copy link
Author

Thank you, I will try.

By the way, I got this configure failure now:

--->  Extracting owl-91abf02613cd2ddb97be58b5b6703240320233a0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work" && /opt/x86_64/bin/gzip -dc '/opt/local/var/macports/distfiles/owl/owl-91abf02613cd2ddb97be58b5b6703240320233a0.tar.gz' | /opt/x86_64/bin/gnutar --no-same-owner -xf - 
--->  Configuring owl
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0" && /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/configure --prefix=/opt/local 
Owl root directory detected as /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0
Don't know where to put the executable on this platform
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0" && /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/configure --prefix=/opt/local 
Exit code: 1

Configure uses sw_vers -productName, which returns this on 10.6.8:

macmini:~ svacchanda$ sw_vers -productName
Mac OS X Server

Somehow configure does not like this )

@barracuda156
Copy link
Author

Passing flags this way (via configure.cmd-prepend) worked. Rosetta config error I manually patched out for now, but with this we are stuck:

I had to drop most of libdispatch usage when making it build on GNU/Hurd anyway. What's left is some in OwlMIG.m; that should be rewritten anyway.

/opt/local/bin/gcc-mp-14 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat/OwlKeyboard.m -I Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/ -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/App -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Data -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Protocol -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Seat -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Server -I /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Shell -std=c99 -I/opt/local/libexec/dispatch/usr/include -c -o Seat/OwlKeyboard.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach/OwlMIG.m: In function '+[OwlMIG serveOnPort:usingCallback:maxSize:]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach/OwlMIG.m:35:5: error: implicit declaration of function 'dispatch_source_set_event_handler'; did you mean 'dispatch_source_set_event_handler_f'? [-Wimplicit-function-declaration]
   35 |     dispatch_source_set_event_handler(source, ^{
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     dispatch_source_set_event_handler_f
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Mach/OwlMIG.m:35:47: error: expected expression before '^' token
   35 |     dispatch_source_set_event_handler(source, ^{
      |                                               ^

It is not just libdispatch, it is also using blocks – this won’t compile with gcc, any version of it (until its upstream finds time to add support into the compiler).

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@barracuda156
Copy link
Author

I had to drop most of libdispatch usage when making it build on GNU/Hurd anyway. What's left is some in OwlMIG.m; that should be rewritten anyway.
FWIW, I think there is a bug with thread-local storage in the posix/pthreads layer on OS X that leads to memory leaks, but not in libdispatch.

Well, with dispatch there is an issue that we just do not have it on 10.5 (I tried, but it does not compile there, in fact it failed even on 10a190 i386, ironically; it only works on 10.6 ppc), and blocks are out of question until Iain fixes that in gcc.

But pthreads do have issues, I agree with you.

@barracuda156
Copy link
Author

That's a simple ObjC file, not ObjC++ . IIUC that means there should be less risks with going from an Apple Block to an enclosure ("lambda" function) or in this case, a function pointer. You're installing an event handler here, so the handler code is probably called synchronously whenever an event occurs, rather than async on a separate thread.

Do you recall some example where that was done? I just never dealt with this.

The code doesn't compile with Apple's GCC which did have blocks support IIRC?

Hmm, looks like it did actually, at least on 10.6.8, but linking fails:

/usr/bin/gcc-4.2 Protocol/owl-iosurface-unstable-v1.o Protocol/owl-mach-ipc-unstable-v1.o Protocol/wlr-data-control-unstable-v1.o Protocol/xdg-shell-unstable-v6.o Protocol/xdg-shell.o Protocol/owl-iosurface-unstable-v1-mig.o Protocol/owl-mach-ipc-unstable-v1-mig.o App/OwlAppDelegate.o App/OwlKnownClientsManager.o App/OwlPreferences.o Compositor/OwlBuffer.o Compositor/OwlCompositor.o Compositor/OwlIOSurfaceBuffer.o Compositor/OwlRegion.o Compositor/OwlShmBuffer.o Compositor/OwlSubcompositor.o Compositor/OwlSubsurface.o Compositor/OwlSurface.o Compositor/OwlSurfaceState.o Compositor/OwlZowlIOSurfaceManagerV1.o Compositor/OwlZowlIOSurfaceV1.o Data/OwlDataDevice.o Data/OwlDataOffer.o Data/OwlDataSource.o Data/OwlPasteboardDataDevice.o Data/OwlPasteboardDataOffer.o Data/OwlPasteboardDataSource.o Data/OwlPasteboardType.o Data/OwlSelection.o Data/OwlWlDataDevice.o Data/OwlWlDataDeviceManager.o Data/OwlWlDataOffer.o Data/OwlWlDataSource.o Data/OwlZwlrDataControlDeviceV1.o Data/OwlZwlrDataControlManagerV1.o Data/OwlZwlrDataControlOfferV1.o Data/OwlZwlrDataControlSourceV1.o Mach/OwlMIG.o Mach/OwlZowlMachIpcPortV1.o Mach/OwlZowlMachIpcV1.o Seat/OwlKeyboard.o Seat/OwlPointer.o Seat/OwlSeat.o Server/OwlCallback.o Server/OwlRunLoopSource.o Server/OwlServer.o Server/main.o Shell/OwlWindow.o Shell/OwlWindowWrapper.o Shell/OwlWlShell.o Shell/OwlWlShellSurface.o Shell/OwlXdgSurface.o Shell/OwlXdgToplevel.o Shell/OwlXdgWmBase.o Shell/OwlZxdgShellV6.o Shell/OwlZxdgSurfaceV6.o Shell/OwlZxdgToplevelV6.o -Wl,/opt/local/libexec/dispatch/usr/lib/libdispatch.a -l wayland-server -framework Cocoa -framework OpenGL -framework IOSurface -o Owl.app/Contents/MacOS/Owl
ld: warning: in /opt/local/lib/libwayland-server.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_wl_seat_interface", referenced from:
      _wlr_data_control_unstable_v1_types in wlr-data-control-unstable-v1.o
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_types in xdg-shell.o
      _xdg_shell_types in xdg-shell.o
      _xdg_shell_types in xdg-shell.o
      _xdg_shell_types in xdg-shell.o
      _seat_bind in OwlSeat.o
      +[OwlSeat addGlobalToDisplay:] in OwlSeat.o
  "_wl_keyboard_interface", referenced from:
      _seat_get_keyboard in OwlSeat.o
  "_wl_subcompositor_interface", referenced from:
      _subcompositor_bind in OwlSubcompositor.o
      +[OwlSubcompositor addGlobalToDisplay:] in OwlSubcompositor.o
  "_wl_display_get_event_loop", referenced from:
      -[OwlServer init] in OwlServer.o
  "_wl_shm_buffer_get_height", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
      -[OwlShmBuffer size] in OwlShmBuffer.o
  "_wl_event_loop_get_fd", referenced from:
      -[OwlRunLoopSource initWithEventLoop:] in OwlRunLoopSource.o
  "_wl_data_source_interface", referenced from:
      _data_device_manager_create_data_source_handler in OwlWlDataDeviceManager.o
  "_wl_data_device_manager_interface", referenced from:
      _data_device_manager_bind in OwlWlDataDeviceManager.o
      +[OwlWlDataDeviceManager addGlobalToDisplay:] in OwlWlDataDeviceManager.o
  "_wl_resource_set_implementation", referenced from:
      -[OwlBuffer initWithResource:] in OwlBuffer.o
      -[OwlCompositor initWithResource:] in OwlCompositor.o
      -[OwlRegion initWithResource:] in OwlRegion.o
      -[OwlSubcompositor initWithResource:] in OwlSubcompositor.o
      -[OwlSubsurface initWithResource:surface:parent:] in OwlSubsurface.o
      -[OwlSurface initWithResource:] in OwlSurface.o
      -[OwlZowlIOSurfaceManagerV1 initWithResource:] in OwlZowlIOSurfaceManagerV1.o
      -[OwlZowlIOSurfaceV1 initWithResource:] in OwlZowlIOSurfaceV1.o
      -[OwlWlDataDevice initWithResource:] in OwlWlDataDevice.o
      -[OwlWlDataDeviceManager initWithResource:] in OwlWlDataDeviceManager.o
      -[OwlWlDataOffer initWithResource:dataSource:] in OwlWlDataOffer.o
      -[OwlWlDataSource initWithResource:] in OwlWlDataSource.o
      -[OwlZwlrDataControlDeviceV1 initWithResource:] in OwlZwlrDataControlDeviceV1.o
      -[OwlZwlrDataControlManagerV1 initWithResource:] in OwlZwlrDataControlManagerV1.o
      -[OwlZwlrDataControlOfferV1 initWithResource:dataSource:] in OwlZwlrDataControlOfferV1.o
      -[OwlZwlrDataControlSourceV1 initWithResource:] in OwlZwlrDataControlSourceV1.o
      -[OwlZowlMachIpcPortV1 initWithResource:] in OwlZowlMachIpcPortV1.o
      -[OwlZowlMachIpcV1 initWithResource:] in OwlZowlMachIpcV1.o
      -[OwlKeyboard initWithResource:] in OwlKeyboard.o
      -[OwlPointer initWithResource:] in OwlPointer.o
      -[OwlSeat initWithResource:] in OwlSeat.o
      -[OwlCallback initWithResource:] in OwlCallback.o
      -[OwlWlShell initWithResource:] in OwlWlShell.o
      -[OwlWlShellSurface initWithResource:surface:] in OwlWlShellSurface.o
      -[OwlXdgSurface initWithResource:surface:] in OwlXdgSurface.o
      -[OwlXdgToplevel initWithResource:surface:xdgSurface:] in OwlXdgToplevel.o
      -[OwlXdgWmBase initWithResource:] in OwlXdgWmBase.o
      -[OwlZxdgShellV6 initWithResource:] in OwlZxdgShellV6.o
      -[OwlZxdgSurfaceV6 initWithResource:surface:] in OwlZxdgSurfaceV6.o
      -[OwlZxdgToplevelV6 initWithResource:surface:xdgSurface:] in OwlZxdgToplevelV6.o
  "_wl_shell_surface_interface", referenced from:
      _shell_get_shell_surface_handler in OwlWlShell.o
  "_wl_display_create", referenced from:
      -[OwlServer init] in OwlServer.o
  "_wl_compositor_interface", referenced from:
      _compositor_bind in OwlCompositor.o
      +[OwlCompositor addGlobalToDisplay:] in OwlCompositor.o
  "_wl_array_release", referenced from:
      -[OwlKeyboard sendEnterSurface:] in OwlKeyboard.o
      -[OwlXdgToplevel sendConfigureWithSize:] in OwlXdgToplevel.o
      -[OwlZxdgToplevelV6 sendConfigureWithSize:] in OwlZxdgToplevelV6.o
  "_wl_region_interface", referenced from:
      _compositor_create_region_handler in OwlCompositor.o
  "_wl_shm_buffer_get_data", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
  "_wl_event_loop_dispatch", referenced from:
      _socketCallback in OwlRunLoopSource.o
  "_wl_shm_buffer_begin_access", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
  "_wl_shm_buffer_get_format", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
  "_wl_shm_buffer_end_access", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
  "_wl_array_add", referenced from:
      -[OwlXdgToplevel makeStates] in OwlXdgToplevel.o
      -[OwlXdgToplevel makeStates] in OwlXdgToplevel.o
      -[OwlXdgToplevel makeStates] in OwlXdgToplevel.o
      -[OwlXdgToplevel makeStates] in OwlXdgToplevel.o
      -[OwlZxdgToplevelV6 makeStates] in OwlZxdgToplevelV6.o
      -[OwlZxdgToplevelV6 makeStates] in OwlZxdgToplevelV6.o
      -[OwlZxdgToplevelV6 makeStates] in OwlZxdgToplevelV6.o
      -[OwlZxdgToplevelV6 makeStates] in OwlZxdgToplevelV6.o
  "_wl_client_get_display", referenced from:
      -[OwlXdgSurface sendConfigure] in OwlXdgSurface.o
      -[OwlXdgToplevel serial] in OwlXdgToplevel.o
      -[OwlZxdgSurfaceV6 sendConfigure] in OwlZxdgSurfaceV6.o
      -[OwlZxdgToplevelV6 serial] in OwlZxdgToplevelV6.o
  "_wl_shm_buffer_get", referenced from:
      -[OwlShmBuffer initWithResource:] in OwlShmBuffer.o
  "_wl_output_interface", referenced from:
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_types in xdg-shell.o
  "_wl_data_offer_interface", referenced from:
      -[OwlWlDataDevice sendSelection] in OwlWlDataDevice.o
  "_wl_resource_post_event", referenced from:
      _wl_buffer_send_release in OwlBuffer.o
      _wl_data_device_send_data_offer in OwlWlDataDevice.o
      _wl_data_device_send_selection in OwlWlDataDevice.o
      _wl_data_offer_send_offer in OwlWlDataOffer.o
      _wl_data_source_send_send in OwlWlDataSource.o
      _wl_data_source_send_cancelled in OwlWlDataSource.o
      _zwlr_data_control_device_v1_send_selection in OwlZwlrDataControlDeviceV1.o
      _zwlr_data_control_device_v1_send_data_offer in OwlZwlrDataControlDeviceV1.o
      _zwlr_data_control_offer_v1_send_offer in OwlZwlrDataControlOfferV1.o
      _zwlr_data_control_source_v1_send_send in OwlZwlrDataControlSourceV1.o
      _zwlr_data_control_source_v1_send_cancelled in OwlZwlrDataControlSourceV1.o
      _zowl_mach_ipc_port_v1_send_secret in OwlZowlMachIpcPortV1.o
      _zowl_mach_ipc_v1_send_bootstrap_name in OwlZowlMachIpcV1.o
      _wl_keyboard_send_keymap in OwlKeyboard.o
      _wl_keyboard_send_key in OwlKeyboard.o
      _wl_keyboard_send_modifiers in OwlKeyboard.o
      _wl_keyboard_send_enter in OwlKeyboard.o
      _wl_keyboard_send_leave in OwlKeyboard.o
      _wl_pointer_send_enter in OwlPointer.o
      _wl_pointer_send_motion in OwlPointer.o
      _wl_pointer_send_leave in OwlPointer.o
      _wl_pointer_send_axis in OwlPointer.o
      _wl_pointer_send_button in OwlPointer.o
      _wl_seat_send_capabilities in OwlSeat.o
      _wl_seat_send_name in OwlSeat.o
      _wl_callback_send_done in OwlCallback.o
      _xdg_surface_send_configure in OwlXdgSurface.o
      _xdg_toplevel_send_configure in OwlXdgToplevel.o
      _xdg_toplevel_send_close in OwlXdgToplevel.o
      _zxdg_surface_v6_send_configure in OwlZxdgSurfaceV6.o
      _zxdg_toplevel_v6_send_configure in OwlZxdgToplevelV6.o
      _zxdg_toplevel_v6_send_close in OwlZxdgToplevelV6.o
  "_wl_pointer_interface", referenced from:
      _seat_get_pointer in OwlSeat.o
  "_wl_shell_interface", referenced from:
      _shell_bind in OwlWlShell.o
      +[OwlWlShell addGlobalToDisplay:] in OwlWlShell.o
  "_wl_resource_destroy", referenced from:
      _buffer_destroy_handler in OwlBuffer.o
      _region_destroy_handler in OwlRegion.o
      _subcompositor_destroy_handler in OwlSubcompositor.o
      _subsurface_destroy_handler in OwlSubsurface.o
      _surface_destroy_handler in OwlSurface.o
      _iosurface_manager_destroy_handler in OwlZowlIOSurfaceManagerV1.o
      _iosurface_destroy_handler in OwlZowlIOSurfaceV1.o
      _data_device_release_handler in OwlWlDataDevice.o
      _data_offer_destroy_handler in OwlWlDataOffer.o
      _data_source_destroy_handler in OwlWlDataSource.o
      _data_control_device_destroy_handler in OwlZwlrDataControlDeviceV1.o
      _data_control_manager_destroy_handler in OwlZwlrDataControlManagerV1.o
      _data_control_offer_destroy_handler in OwlZwlrDataControlOfferV1.o
      _data_control_source_destroy_handler in OwlZwlrDataControlSourceV1.o
      _mach_ipc_port_destroy_handler in OwlZowlMachIpcPortV1.o
      _mach_ipc_destroy_handler in OwlZowlMachIpcV1.o
      _keyboard_release_handler in OwlKeyboard.o
      -[OwlCallback sendDoneWithData:] in OwlCallback.o
      _xdg_surface_destroy_handler in OwlXdgSurface.o
      _xdg_toplevel_destroy_handler in OwlXdgToplevel.o
      _xdg_wm_base_destroy_handler in OwlXdgWmBase.o
      _xdg_shell_v6_destroy_handler in OwlZxdgShellV6.o
      _xdg_surface_v6_destroy_handler in OwlZxdgSurfaceV6.o
      _xdg_toplevel_v6_destroy_handler in OwlZxdgToplevelV6.o
  "_wl_display_next_serial", referenced from:
      -[OwlServer nextSerial] in OwlServer.o
      -[OwlXdgSurface sendConfigure] in OwlXdgSurface.o
      -[OwlXdgToplevel serial] in OwlXdgToplevel.o
      -[OwlZxdgSurfaceV6 sendConfigure] in OwlZxdgSurfaceV6.o
      -[OwlZxdgToplevelV6 serial] in OwlZxdgToplevelV6.o
  "_wl_resource_get_id", referenced from:
      -[OwlShmBuffer initWithResource:] in OwlShmBuffer.o
  "_wl_resource_create", referenced from:
      _compositor_create_surface_handler in OwlCompositor.o
      _compositor_create_region_handler in OwlCompositor.o
      _compositor_bind in OwlCompositor.o
      _subcompositor_get_subsurface_handler in OwlSubcompositor.o
      _subcompositor_bind in OwlSubcompositor.o
      _surface_frame_handler in OwlSurface.o
      _iosurface_manager_create_surface_handler in OwlZowlIOSurfaceManagerV1.o
      _iosurface_manager_bind in OwlZowlIOSurfaceManagerV1.o
      _iosurface_create_buffer_handler in OwlZowlIOSurfaceV1.o
      -[OwlWlDataDevice sendSelection] in OwlWlDataDevice.o
      _data_device_manager_create_data_source_handler in OwlWlDataDeviceManager.o
      _data_device_manager_get_data_device_handler in OwlWlDataDeviceManager.o
      _data_device_manager_bind in OwlWlDataDeviceManager.o
      -[OwlZwlrDataControlDeviceV1 selectionChanged:] in OwlZwlrDataControlDeviceV1.o
      _data_control_manager_create_data_source_handler in OwlZwlrDataControlManagerV1.o
      _data_control_manager_get_data_device_handler in OwlZwlrDataControlManagerV1.o
      _data_control_manager_bind in OwlZwlrDataControlManagerV1.o
      _mach_ipc_create_port_handler in OwlZowlMachIpcV1.o
      _mach_ipc_bind in OwlZowlMachIpcV1.o
      _seat_get_pointer in OwlSeat.o
      _seat_get_keyboard in OwlSeat.o
      _seat_bind in OwlSeat.o
      _shell_get_shell_surface_handler in OwlWlShell.o
      _shell_bind in OwlWlShell.o
      _xdg_surface_get_xdg_toplevel_handler in OwlXdgSurface.o
      _xdg_wm_base_get_xdg_surface in OwlXdgWmBase.o
      _xdg_wm_base_bind in OwlXdgWmBase.o
      _xdg_shell_v6_get_xdg_surface in OwlZxdgShellV6.o
      _xdg_shell_v6_bind in OwlZxdgShellV6.o
      _xdg_surface_v6_get_xdg_toplevel_handler in OwlZxdgSurfaceV6.o
  "_wl_shm_buffer_get_stride", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
  "_wl_resource_get_client", referenced from:
      -[OwlSurface pointer] in OwlSurface.o
      -[OwlSurface keyboard] in OwlSurface.o
      +[OwlWlDataDevice dataDeviceForClient:] in OwlWlDataDevice.o
      -[OwlWlDataDevice sendSelection] in OwlWlDataDevice.o
      -[OwlZwlrDataControlDeviceV1 selectionChanged:] in OwlZwlrDataControlDeviceV1.o
      +[OwlKeyboard keyboardForClient:] in OwlKeyboard.o
      +[OwlPointer pointerForClient:] in OwlPointer.o
      -[OwlXdgSurface sendConfigure] in OwlXdgSurface.o
      -[OwlXdgToplevel keyboard] in OwlXdgToplevel.o
      -[OwlXdgToplevel dataDevice] in OwlXdgToplevel.o
      -[OwlXdgToplevel serial] in OwlXdgToplevel.o
      -[OwlZxdgSurfaceV6 sendConfigure] in OwlZxdgSurfaceV6.o
      -[OwlZxdgToplevelV6 keyboard] in OwlZxdgToplevelV6.o
      -[OwlZxdgToplevelV6 dataDevice] in OwlZxdgToplevelV6.o
      -[OwlZxdgToplevelV6 serial] in OwlZxdgToplevelV6.o
  "_wl_display_destroy", referenced from:
      -[OwlServer dealloc] in OwlServer.o
  "_wl_surface_interface", referenced from:
      _xdg_shell_unstable_v6_types in xdg-shell-unstable-v6.o
      _xdg_shell_types in xdg-shell.o
      _compositor_create_surface_handler in OwlCompositor.o
  "_wl_display_add_socket_auto", referenced from:
      -[OwlServer setUpSocket] in OwlServer.o
  "_wl_array_init", referenced from:
      -[OwlKeyboard sendEnterSurface:] in OwlKeyboard.o
      -[OwlXdgToplevel makeStates] in OwlXdgToplevel.o
      -[OwlZxdgToplevelV6 makeStates] in OwlZxdgToplevelV6.o
  "_wl_buffer_interface", referenced from:
      _owl_iosurface_unstable_v1_types in owl-iosurface-unstable-v1.o
      _iosurface_create_buffer_handler in OwlZowlIOSurfaceV1.o
  "_wl_display_init_shm", referenced from:
      -[OwlServer init] in OwlServer.o
  "_wl_global_create", referenced from:
      +[OwlCompositor addGlobalToDisplay:] in OwlCompositor.o
      +[OwlSubcompositor addGlobalToDisplay:] in OwlSubcompositor.o
      +[OwlZowlIOSurfaceManagerV1 addGlobalToDisplay:] in OwlZowlIOSurfaceManagerV1.o
      +[OwlWlDataDeviceManager addGlobalToDisplay:] in OwlWlDataDeviceManager.o
      +[OwlZwlrDataControlManagerV1 addGlobalToDisplay:] in OwlZwlrDataControlManagerV1.o
      +[OwlZowlMachIpcV1 addGlobalToDisplay:] in OwlZowlMachIpcV1.o
      +[OwlSeat addGlobalToDisplay:] in OwlSeat.o
      +[OwlWlShell addGlobalToDisplay:] in OwlWlShell.o
      +[OwlXdgWmBase addGlobalToDisplay:] in OwlXdgWmBase.o
      +[OwlZxdgShellV6 addGlobalToDisplay:] in OwlZxdgShellV6.o
  "_wl_resource_get_version", referenced from:
      _compositor_create_surface_handler in OwlCompositor.o
      _compositor_create_region_handler in OwlCompositor.o
      -[OwlZwlrDataControlDeviceV1 selectionChanged:] in OwlZwlrDataControlDeviceV1.o
      _data_control_manager_create_data_source_handler in OwlZwlrDataControlManagerV1.o
      _data_control_manager_get_data_device_handler in OwlZwlrDataControlManagerV1.o
      _seat_get_pointer in OwlSeat.o
      _seat_get_keyboard in OwlSeat.o
      -[OwlSeat initWithResource:] in OwlSeat.o
  "_wl_display_flush_clients", referenced from:
      -[OwlServer flushClients] in OwlServer.o
  "_wl_resource_get_user_data", referenced from:
      _buffer_destroy in OwlBuffer.o
      _compositor_destroy in OwlCompositor.o
      _region_destroy in OwlRegion.o
      _subcompositor_destroy in OwlSubcompositor.o
      _subcompositor_get_subsurface_handler in OwlSubcompositor.o
      _subcompositor_get_subsurface_handler in OwlSubcompositor.o
      _subsurface_destroy in OwlSubsurface.o
      _subsurface_set_position_handler in OwlSubsurface.o
      _subsurface_place_above_handler in OwlSubsurface.o
      _subsurface_place_below_handler in OwlSubsurface.o
      _subsurface_set_sync_handler in OwlSubsurface.o
      _subsurface_set_desync_handler in OwlSubsurface.o
      _surface_destroy in OwlSurface.o
      _surface_attach_handler in OwlSurface.o
      _surface_damage_handler in OwlSurface.o
      _surface_commit_handler in OwlSurface.o
      _surface_frame_handler in OwlSurface.o
      _iosurface_manager_create_surface_handler in OwlZowlIOSurfaceManagerV1.o
      _iosurface_manager_destroy in OwlZowlIOSurfaceManagerV1.o
      _iosurface_destroy in OwlZowlIOSurfaceV1.o
      _iosurface_create_buffer_handler in OwlZowlIOSurfaceV1.o
      _data_device_destroy in OwlWlDataDevice.o
      _data_device_set_selection_handler in OwlWlDataDevice.o
      _data_device_set_selection_handler in OwlWlDataDevice.o
      _data_device_manager_destroy in OwlWlDataDeviceManager.o
      _data_offer_destroy in OwlWlDataOffer.o
      _data_offer_receive_handler in OwlWlDataOffer.o
      _data_source_destroy in OwlWlDataSource.o
      _data_source_offer_handler in OwlWlDataSource.o
      _data_control_device_destroy in OwlZwlrDataControlDeviceV1.o
      _data_control_device_set_selection_handler in OwlZwlrDataControlDeviceV1.o
      _data_control_device_set_selection_handler in OwlZwlrDataControlDeviceV1.o
      _data_control_manager_destroy in OwlZwlrDataControlManagerV1.o
      _data_control_offer_destroy in OwlZwlrDataControlOfferV1.o
      _data_control_offer_receive_handler in OwlZwlrDataControlOfferV1.o
      _data_control_source_destroy in OwlZwlrDataControlSourceV1.o
      _data_control_source_offer_handler in OwlZwlrDataControlSourceV1.o
      _mach_ipc_port_destroy in OwlZowlMachIpcPortV1.o
      _mach_ipc_destroy in OwlZowlMachIpcV1.o
      _keyboard_destroy in OwlKeyboard.o
      _pointer_destroy in OwlPointer.o
      _seat_destroy in OwlSeat.o
      _callback_destroy in OwlCallback.o
      _shell_get_shell_surface_handler in OwlWlShell.o
      _wl_shell_destroy in OwlWlShell.o
      _shell_surface_destroy in OwlWlShellSurface.o
      _shell_surface_move_handler in OwlWlShellSurface.o
      _shell_surface_set_toplevel_handler in OwlWlShellSurface.o
      _shell_surface_set_title_handler in OwlWlShellSurface.o
      _xdg_surface_destroy in OwlXdgSurface.o
      _xdg_surface_get_xdg_toplevel_handler in OwlXdgSurface.o
      _xdg_surface_set_window_geometry_handler in OwlXdgSurface.o
      _xdg_toplevel_destroy in OwlXdgToplevel.o
      _xdg_toplevel_set_title_handler in OwlXdgToplevel.o
      _xdg_toplevel_move_handler in OwlXdgToplevel.o
      _xdg_toplevel_set_minimized_handler in OwlXdgToplevel.o
      _xdg_toplevel_set_maximized_handler in OwlXdgToplevel.o
      _xdg_toplevel_unset_maximized_handler in OwlXdgToplevel.o
      _xdg_wm_base_destroy in OwlXdgWmBase.o
      _xdg_wm_base_get_xdg_surface in OwlXdgWmBase.o
      _xdg_shell_v6_destroy in OwlZxdgShellV6.o
      _xdg_shell_v6_get_xdg_surface in OwlZxdgShellV6.o
      _xdg_surface_v6_destroy in OwlZxdgSurfaceV6.o
      _xdg_surface_v6_get_xdg_toplevel_handler in OwlZxdgSurfaceV6.o
      _xdg_surface_v6_set_window_geometry_handler in OwlZxdgSurfaceV6.o
      _xdg_toplevel_v6_destroy in OwlZxdgToplevelV6.o
      _xdg_toplevel_v6_set_title_handler in OwlZxdgToplevelV6.o
      _xdg_toplevel_v6_move_handler in OwlZxdgToplevelV6.o
      _xdg_toplevel_v6_set_minimized_handler in OwlZxdgToplevelV6.o
      _xdg_toplevel_v6_set_maximized_handler in OwlZxdgToplevelV6.o
      _xdg_toplevel_v6_unset_maximized_handler in OwlZxdgToplevelV6.o
  "_wl_data_device_interface", referenced from:
      _data_device_manager_get_data_device_handler in OwlWlDataDeviceManager.o
  "_wl_callback_interface", referenced from:
      _surface_frame_handler in OwlSurface.o
  "_wl_shm_buffer_get_width", referenced from:
      -[OwlShmBuffer invalidate] in OwlShmBuffer.o
      -[OwlShmBuffer size] in OwlShmBuffer.o
  "_wl_subsurface_interface", referenced from:
      _subcompositor_get_subsurface_handler in OwlSubcompositor.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [Owl.app/Contents/MacOS/Owl] Error 1

I will try passing arch flags explicitly.

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

  1. OwlMIG needs to be rewritten anyway
  2. We should be able to make OwlMIG only use libdispatch when it's available, if at all
  3. Currently all of this is only used for IOSurface, which you should compile out, along with OwlMIG, on 10.5 anyway

if it would be feasible to make a sort of hybrid EGL implementation that uses native OpenGL where possible to get some acceptable performance.
Software/CPU EGL is fine for simple/small-scale UI effects or for remote rendering where you don't expect fluid graphics anyway, but really not ideal as the main engine for all local rendering.

That was my idea with this, yes. Fully native OpenGL.framework, with a custom EGL implementation that does things on top of IOSurface and the owl-iosurface-unstable-v1 Wayland extension (well, a v2 of that rather), to enable sharing GPU buffers between the clients and Owl. I even had a small prototype, though the API was different from EGL.

@barracuda156
Copy link
Author

@RJVB @bugaevc Got it built on Rosetta. This likely means it will also build on 10.6 ppc natively.
10.5.8 won’t work (no blocks support at all, no dispatch).

owl

@bugaevc
Copy link
Member

bugaevc commented Nov 27, 2024

Please test whether PPC Owl and x86 Wayland clients can interact just fine?

10.5.8 won’t work (no blocks support at all, no dispatch).

Again, you're just going to have to build without IOSurface and MIG.

@barracuda156
Copy link
Author

@bugaevc At the moment I know nothing about how this is supposed to work ) Is there something simple I can try?
(I can check documentation, of course, but not tonight already.)

@barracuda156
Copy link
Author

@RJVB BTW can it work in principle if C/C++ compiler is a modern gcc, while ObjC compiler is Xcode gcc? In most cases gcc-4.2 is not a workable option, since ports need C/C++11 or higher. But in Cocoa modules blocks may be used, so modern gcc cannot compile those.

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@barracuda156
Copy link
Author

@bugaevc Looks like Apple documentation is lying here: it claims the function exists in 10.6+, and initially I assumed I got an error on 10.6 ppc due to its pre-release SDK. However, this fails on standard 10.6.8 just as much:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m: In function '-[OwlIOSurfaceBuffer dealloc]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_owl/owl/work/owl-91abf02613cd2ddb97be58b5b6703240320233a0/Sources/Compositor/OwlIOSurfaceBuffer.m:38:5: error: implicit declaration of function 'IOSurfaceDecrementUseCount'; did you mean 'IOSurfaceGetPlaneCount'? [-Wimplicit-function-declaration]
   38 |     IOSurfaceDecrementUseCount(_surface);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |     IOSurfaceGetPlaneCount
make: *** [Compositor/OwlIOSurfaceBuffer.o] Error 1

While it could be that it is present on i386 but missing on ppc, looks like it is not the case that it is just available in 10.6+.

@RJVB
Copy link

RJVB commented Nov 27, 2024 via email

@barracuda156
Copy link
Author

Just in case anyone wants to try this out:

epoll-shim barracuda156/powerpc-ports@7c4bfac
wayland barracuda156/powerpc-ports@73c6409
owl barracuda156/powerpc-ports@856a4de

P. S. This is likely to work on some subset of macOS versions and fail elsewhere.

@barracuda156
Copy link
Author

barracuda156 commented Nov 28, 2024

Natively on 10.6 ppc this is missing:

ccache /usr/bin/gcc-4.2 Protocol/owl-iosurface-unstable-v1.o Protocol/owl-mach-ipc-unstable-v1.o Protocol/wlr-data-control-unstable-v1.o Protocol/xdg-shell-unstable-v6.o Protocol/xdg-shell.o Protocol/owl-iosurface-unstable-v1-mig.o Protocol/owl-mach-ipc-unstable-v1-mig.o App/OwlAppDelegate.o App/OwlKnownClientsManager.o App/OwlPreferences.o Compositor/OwlBuffer.o Compositor/OwlCompositor.o Compositor/OwlIOSurfaceBuffer.o Compositor/OwlRegion.o Compositor/OwlShmBuffer.o Compositor/OwlSubcompositor.o Compositor/OwlSubsurface.o Compositor/OwlSurface.o Compositor/OwlSurfaceState.o Compositor/OwlZowlIOSurfaceManagerV1.o Compositor/OwlZowlIOSurfaceV1.o Data/OwlDataDevice.o Data/OwlDataOffer.o Data/OwlDataSource.o Data/OwlPasteboardDataDevice.o Data/OwlPasteboardDataOffer.o Data/OwlPasteboardDataSource.o Data/OwlPasteboardType.o Data/OwlSelection.o Data/OwlWlDataDevice.o Data/OwlWlDataDeviceManager.o Data/OwlWlDataOffer.o Data/OwlWlDataSource.o Data/OwlZwlrDataControlDeviceV1.o Data/OwlZwlrDataControlManagerV1.o Data/OwlZwlrDataControlOfferV1.o Data/OwlZwlrDataControlSourceV1.o Mach/OwlMIG.o Mach/OwlZowlMachIpcPortV1.o Mach/OwlZowlMachIpcV1.o Seat/OwlKeyboard.o Seat/OwlPointer.o Seat/OwlSeat.o Server/OwlCallback.o Server/OwlRunLoopSource.o Server/OwlServer.o Server/main.o Shell/OwlWindow.o Shell/OwlWindowWrapper.o Shell/OwlWlShell.o Shell/OwlWlShellSurface.o Shell/OwlXdgSurface.o Shell/OwlXdgToplevel.o Shell/OwlXdgWmBase.o Shell/OwlZxdgShellV6.o Shell/OwlZxdgSurfaceV6.o Shell/OwlZxdgToplevelV6.o -arch ppc -Wl,/opt/local/libexec/dispatch/usr/lib/libdispatch.a -l wayland-server -framework Cocoa -framework OpenGL -framework IOSurface -o Owl.app/Contents/MacOS/Owl
Undefined symbols:
  "_CGLTexImageIOSurface2D", referenced from:
      -[OwlIOSurfaceBuffer setupTextureWithCGLContext:] in OwlIOSurfaceBuffer.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Maybe IOSurface stuff can be controlled with a configure switch? Rather than either unilaterally disabling it for ppc or trying to guess at compile time whether it is 10.6.8 or an earlier 10.6.

UPD. I checked the headers, it is not really 10.6 ppc (10a190) as such lacks it. _CGLTexImageIOSurface2D is there in 10a190, but its native OpenGL framework has a poor compatibility with GPUs on PowerPC (which is not overly surprising, apparently Apple was in a process of dumping it already), so a current hack has been to pull over a few graphics-related frameworks from 10.5.8. I suspected this will eventually show up in something not building, and here we are.
However, if we consider supporting 10.5, this is an issue to address anyway, since on 10.5.8 this will be missing. Maintaining 10.6 ppc is on me, of course, no one needs to specifically bother about that, but as long as standard 10.5 and 10.6 work, supporting 10a190 amounts largely to tweaking a couple of macros to use 10.5 fallbacks where needed and avoid elsewhere.

@barracuda156
Copy link
Author

@RJVB Yeah, worth checking that also, though with 10.6.8 (standard release) it should not be the case.

@RJVB
Copy link

RJVB commented Nov 28, 2024 via email

@barracuda156
Copy link
Author

I think you should consider 10.6/PPC as a "largely 10.5" or something of the sort, where IOSurface doesn't get used.

For purposes of OpenGL that seems to be the case indeed.

@barracuda156
Copy link
Author

Restored original OpenGL from 10a190, here we go:

image

@bugaevc
Copy link
Member

bugaevc commented Nov 29, 2024

Well, the "failed to grab a socket" error is not very interesting 😃 Perhaps you could set XDG_RUNTIME_DIR to something (like /tmp/) and try to run some clients?

@barracuda156
Copy link
Author

@bugaevc The app does not pick the value from the env, but in CLI I can launch it without errors:

36-141% /Applications/MacPorts/Owl.app/Contents/MacOS/Owl 
2024-11-29 19:25:20.012 Owl[24533:10b] Running compositor on Wayland display wayland-0
2024-11-29 19:25:20.021 Owl[24533:10b] Checked in with the bootstrap server as io.github.bugaevc.Owl

What should I try? I have no apps which use Wayland, so need to know what to build which could work on macOS :)

@RJVB
Copy link

RJVB commented Nov 29, 2024

The app does not pick the value from the env

If you mean running the application from the Finder aka via LaunchServices, then no. Those applications will run as a child of a process/environment that your shell (CLI) is also a child of. You can set environment values for that parent process via launchctl setenv <key> [value].

NB: those should persist through login cycles and reboots!

@bugaevc
Copy link
Member

bugaevc commented Nov 29, 2024

#2 and #11 are relevant; ideally, we'd want the user experience to be that they can either launch Owl from Finder / LaunchServices (without getting the error message), or just start one of the clients, and have Owl auto-spawn.

@RJVB
Copy link

RJVB commented Nov 29, 2024 via email

@RJVB
Copy link

RJVB commented Nov 29, 2024 via email

@bugaevc
Copy link
Member

bugaevc commented Nov 29, 2024

From what I understand it reacts to a client trying to access the specified variable

Not the variable, but from a client connecting to the Unix socket to which the variable is pointing.

The mechanism also creates the socket for you, and this requires some code inside the server application (not sure why clients can just use the value in the env. var. but it is what it is).

That's just how socket activation works: clients just connect to the socket (and they can receive the path to it via means other than env), whereas the server listens on it. But it's launchd who initially listens on the socket, and your server has to "check in" and get the socket fd created by launchd.

@RJVB
Copy link

RJVB commented Nov 29, 2024 via email

@bugaevc
Copy link
Member

bugaevc commented Nov 29, 2024

That would mean that the variable gets set and the socket created even if no one ever requests it?

Yep. But sockets (and env) are cheap; the actual server/daemon is only started up when some client actually connects to the socket (if so configured).

@RJVB
Copy link

RJVB commented Nov 29, 2024 via email

@RJVB
Copy link

RJVB commented Dec 11, 2024 via email

@Zaphhh
Copy link

Zaphhh commented Dec 11, 2024

As I said, try building port:GTk3 with wayland support. You can just enable it as an additional variant to the +x11 variant. This should give you a few test/demo applications.

Sorry, not related to the issue. But is the wayland variant available through the macports tree or yer local ports repo? I can't seem to find it 😆 . Also how would it overcome the issue of EGL support?

@RJVB
Copy link

RJVB commented Dec 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants