fakechroot icon indicating copy to clipboard operation
fakechroot copied to clipboard

Building on Darwin?

Open geoff-nixon opened this issue 12 years ago • 4 comments

Hi there! So I understand this may not exactly be your top priority? But since I've noticed this project has some regained some life in recent months, I though I might as well ask...

I've been trying to see if I can hack fakechroot to work of Darwin, and I think it is theoretically feasible (adapting the script and loader from mackyle/fakeroot). But I'm running into what looks like three or four libc incompatibilities that I'm not really sure what to do about. I'm not sure if these are big deal-breakers or not... If anyone felt like lending any guidance, that would be fantastic; otherwise, I do understand.

  1. __opendir2.c A. On Darwin, dd_foo is always __dd_foo. I swear I've seen a macro for handling this somewhere; but unfortunately, I can't find it, and I'm not confident enough in my own skills to write one myself without breaking stuff. B. After manually accounting for above, it chokes on dirp->__dd_lock = NULL: something about NULL being of an incompatible type to assign to a pthread mutex? (No idea... sorry.)
  2. ftw.c Darwin does not seem to know about the __nftw_func_t type nor the macros AT_SYMLINK_NOFOLLOW, FTW_ACTIONRETVAL, FTW_SKIP_SUBTREE, FTW_SKIP_SIBLINGS, and FTW_STOP.
  3. statfs64.c <sys/statfs.h> doesn't exist on Darwin.

Thanks! G.

geoff-nixon avatar Nov 11 '13 07:11 geoff-nixon

The fakechroot is created with port.ability in mind. But to be honest, I'm focused on glibc right now.

It used to be compiled on FreeBSD (i think it was 6.x) but it's broken already.

Fortunately I have an access to MacOSX so I think I could take a look.

dex4er avatar Nov 12 '13 18:11 dex4er

Thanks! Let me know if I can be of any help testing, etc.

geoff-nixon avatar Nov 13 '13 11:11 geoff-nixon

The current version of master branch could be considered stable. Already I'm testing if i works on any glibc based systems. The next release should be ready for 1-2 weeks (including Debian package). I think it is good base for further porting to other OS-es.

dex4er avatar Nov 18 '13 12:11 dex4er

I'd imagine a big chunk of this boils down to changing LD_LIBRARY_PATH to DYLD_LIBRARY_PATH or DYLD_INSERT_LIBRARIES

copumpkin avatar Feb 17 '17 18:02 copumpkin