I have a gyp project, using which I try to build using makefiles on both mac and linux. The compilation goes just fine for linux but for mac while compiling frame buffer source files, the compilation fails due to linux/fb.h not found. Is there a way I could get these header files installed on my mac? either using port or brew? Any ideas. Or is there any other alternative to linux/fb.h we are supposed to use on mac?
Asked
Active
Viewed 1,202 times
0
-
Add [this](http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/fb.h?v=2.6.25.8) to the directory where it should be. Also you can find it [here](http://lxr.free-electrons.com/source/include/linux/fb.h). – Arnab Nandy Nov 14 '14 at 07:03
-
1thanks @Skynet : Is there any mac osx package i can install that would automatically install all relevant dependencies? I don't want to keep putting header files in a destined folder and run into a compilation issue at a later point due to some other missing header. – learn_develop Nov 14 '14 at 07:09
-
You might just as well try to build WIN32 code. If you copy over all header files from a Windows machine it might even compile, but what then? – n. m. could be an AI Nov 14 '14 at 07:36
-
mac is a Unix based graphical interface operating system. So, it makes sense any linux specific makefile project is likely to compile on mac by installing certain dependencies(mostly we find something equivalent in mac for what we have in linux). That lead to me asking if we do have something equivalent for my above question in mac too and I can apply ifdef's in my code for Mac platform. – learn_develop Nov 14 '14 at 08:09
-
"So, it makes sense any linux specific makefile project is likely to compile on mac". It totally doesn't. Why would you think so? Both systems are Unix-based, but they are different. Headers under "linux" are NOT expected to be compatible with a non-Linux system, that's the reason why the directory is called "linux" and not "vaguelyunixlikestuff". – n. m. could be an AI Nov 14 '14 at 09:15
-
thanks @n.m. : I do understand that. So, there isn't a way i could make frame buffer requiring fb.h to be compiled on Mac? I temporarily removed compilation of frame buffer(since it was just required for tests) and I was able to compile the binary just fine. – learn_develop Nov 14 '14 at 10:08
-
You might be able to get it to compile if you have all the needed headers, but not run. Look in the file, there is that `#ifdef __KERNEL__` section, what do you think Mac OS X kernel has to say about it? – n. m. could be an AI Nov 14 '14 at 10:17