Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Unable to build procfs on MacOSX10.10 #21

Closed
patilarpith opened this issue Apr 20, 2015 · 3 comments
Closed

Unable to build procfs on MacOSX10.10 #21

patilarpith opened this issue Apr 20, 2015 · 3 comments

Comments

@patilarpith
Copy link

SDK: MacOSX10.10.sdk
Xcode: 6.1.1

Here is the build error from make command

c++ -c -D_FILE_OFFSET_BITS=64 -O -g -I/usr/local/include/osxfuse -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -Wall  -o procfs_displays.o procfs_displays.cc
procfs_displays.cc:39:9: warning: 'kCGLPFAFullScreen' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]
        kCGLPFAFullScreen,
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework/Headers/CGLTypes.h:71:2: note: 
      'kCGLPFAFullScreen' has been explicitly marked deprecated here
        kCGLPFAFullScreen OPENGL_ENUM_DEPRECATED(10_0, 10_6)     =  54,
        ^
procfs_displays.cc:53:5: warning: 'CGLSetFullScreen' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]
    CGLSetFullScreen(context);
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework/Headers/OpenGL.h:73:17: note: 
      'CGLSetFullScreen' has been explicitly marked deprecated here
extern CGLError CGLSetFullScreen(CGLContextObj ctx) OPENGL_DEPRECATED(10_0, 10_6);
                ^
procfs_displays.cc:228:21: error: use of undeclared identifier 'CGDisplayBaseAddress'
                    CGDisplayBaseAddress(d));
                    ^
procfs_displays.cc:230:21: error: use of undeclared identifier 'CGDisplayBitsPerPixel'
                    CGDisplayBitsPerPixel(d));
                    ^
procfs_displays.cc:232:21: error: use of undeclared identifier 'CGDisplayBitsPerSample'
                    CGDisplayBitsPerSample(d));
                    ^
procfs_displays.cc:234:21: error: use of undeclared identifier 'CGDisplaySamplesPerPixel'
                    CGDisplaySamplesPerPixel(d));
                    ^
procfs_displays.cc:236:21: error: use of undeclared identifier 'CGDisplayBytesPerRow'
                    CGDisplayBytesPerRow(d));
                    ^
2 warnings and 5 errors generated.
make: *** [procfs_displays.o] Error 1

Looks like some of the display related identifier were not found. Is there a way to build procfs headless?

@alexchandel
Copy link

Same issue in 10.11, of course. In addition, all the HIServices functions this uses, like GetProcessForPID, GetNextProcess, GetProcessPID, and CopyProcessName, plus CFPropertyListCreateXMLData are now marked deprecated too.

For CGDisplayBaseAddress, it appears that Apple is trying to deprecate access to the raw framebuffer of a display. There's no direct replacement, but one could probably be hacked together.

For CGDisplayBitsPerPixel, CGDisplayBitsPerSample, and CGDisplaySamplesPerPixel, Apple documentation recommends CGDisplayModeCopyPixelEncoding instead, which returns a CFString, but even that is deprecated in 10.11.

For CGDisplayBytesPerRow, Apple recommends using CGDisplayCreateImage() on the displayID, and then getting the bytes per row of that.

The symbols are still there (for now), so you can just declare them yourself in procfs_displays.h. But that's not remotely supported.

But it gets even better if you're upgrading to 64-bit, because the Sequence Grabber and the entire QuickTime framework is gone, which means sequencegrab doesn't build. It might be possible to replace the Sequence Grabber usage with AVFoundation. Apple also mentions IOVideoDevice in the context of kernel programming which is intended to replace SG. I just stubbed them out; who knows what will happen if they're called.

And about half the vm_* routines and types have been renamed to mach_vm_*.

And the Makefile is deathly old. I fixed all this and got it to build on 10.11 x86_64. I'll probably push the result to https://github.com/alexchandel/procfs once I clean it up.

@alexchandel
Copy link

I fork-extracted procfs to https://github.com/alexchandel/procfs and updated the build to 10.11, x86_64

@bfleischer
Copy link
Member

This repository contains legacy demo file systems that are unmaintained. Therefore I'm closing the issue. Please refer to https://github.com/macfuse/demo for maintained demo file systems.

@bfleischer bfleischer closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants