nowsecure / fsmon

monitor filesystem on iOS / OS X / Android / FirefoxOS / Linux
https://www.nowsecure.com
MIT License
903 stars 153 forks source link

fail to compile on Mac #26

Closed aquynh closed 8 years ago

aquynh commented 8 years ago

on Mac 10.11.6, i cannot compile fsmon. is this so broken?

$ make
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Library/Developer/CommandLineTools/usr/bin/clang -arch armv7 -arch arm64 -isysroot  -fembed-bitcode -flto -O3 -Wall -fembed-bitcode -I. -Wall -g -ggdb -DTARGET_IOS=1 -o fsmon-ios main.c util.c backend/*.c \
        -framework CoreFoundation \
        -framework MobileCoreServices
clang: warning: no such sysroot directory: '-fembed-bitcode'
clang: warning: no such sysroot directory: '-fembed-bitcode'
main.c:3:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
util.c:3:10: fatal error: 'ctype.h' file not found
#include <ctype.h>
         ^
1 error generated.
backend/devfsev.c:4:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
backend/fsevapi.c:4:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
backend/kdebug.c:4:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
backend/kqueue.c:4:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [ios] Error 1
trufae commented 8 years ago

Default target expects you to have the full sdk. Not just the osx one. Type 'make osx'

On 13 Aug 2016, at 08:21, Nguyen Anh Quynh notifications@github.com wrote:

on Mac 10.11.6, i cannot compile fsmon. is this so broken?

$ make xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos' /Library/Developer/CommandLineTools/usr/bin/clang -arch armv7 -arch arm64 -isysroot -fembed-bitcode -flto -O3 -Wall -fembed-bitcode -I. -Wall -g -ggdb -DTARGETIOS=1 -o fsmon-ios main.c util.c backend/.c \ -framework CoreFoundation \ -framework MobileCoreServices clang: warning: no such sysroot directory: '-fembed-bitcode' clang: warning: no such sysroot directory: '-fembed-bitcode' main.c:3:10: fatal error: 'stdio.h' file not found

include

     ^

1 error generated. util.c:3:10: fatal error: 'ctype.h' file not found

include

     ^

1 error generated. backend/devfsev.c:4:10: fatal error: 'stdio.h' file not found

include

     ^

1 error generated. backend/fsevapi.c:4:10: fatal error: 'stdio.h' file not found

include

     ^

1 error generated. backend/kdebug.c:4:10: fatal error: 'stdio.h' file not found

include

     ^

1 error generated. backend/kqueue.c:4:10: fatal error: 'stdio.h' file not found

include

     ^

1 error generated. make: _\ [ios] Error 1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

aquynh commented 8 years ago

I just followed the docs, so docs should be improved.

trufae commented 8 years ago

Will do as soon as you confirm that works

On 13 Aug 2016, at 12:41, Nguyen Anh Quynh notifications@github.com wrote:

I just followed the docs, so docs should be improved. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

aquynh commented 8 years ago

yes it works, but it built "fsmon-osx". i think it is better to build "fsmon" instead.

few more issues:

$ sudo make install
mkdir -p //usr/local/bin
install -m 0755 fsmon //usr/local/bin/fsmon
install: fsmon: No such file or directory
make: *** [install] Error 71

then i ran some apps, but got zero report. i expect at least some info like which files/dirs these apps read, but fsmon never reports anything. so it can only monitor write access, but not read access?

thanks.

trufae commented 8 years ago

The events able to capture by fsmon depend on the backend. See -b

On 13 Aug 2016, at 18:13, Nguyen Anh Quynh notifications@github.com wrote:

yes it works, but it built "fsmon-osx". i think it is better to build "fsmon" instead.

few more issues:

"sudo make install" produces error like below (due to "fsmon" is missing): $ sudo make install mkdir -p //usr/local/bin install -m 0755 fsmon //usr/local/bin/fsmon install: fsmon: No such file or directory make: *\ [install] Error 71 i run this command:

$ sudo ./fsmon-osx /Applications then i ran some apps, but got zero report. i expect at least some info like which files/dirs these apps read, but fsmon never reports anything. so it can only monitor write access, but not read access?

thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.