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

Building on Darwin? #12

Open
geoff-nixon opened this issue Nov 11, 2013 · 4 comments
Open

Building on Darwin? #12

geoff-nixon opened this issue Nov 11, 2013 · 4 comments

Comments

@geoff-nixon
Copy link

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.

@dex4er
Copy link
Owner

dex4er commented Nov 12, 2013

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 dex4er closed this as completed Nov 13, 2013
@dex4er dex4er reopened this Nov 13, 2013
@geoff-nixon
Copy link
Author

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

@dex4er
Copy link
Owner

dex4er commented Nov 18, 2013

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.

@copumpkin
Copy link

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

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

No branches or pull requests

3 participants