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

Cannot make on macOS #57

Closed
NilsIrl opened this issue Aug 16, 2021 · 8 comments · Fixed by #61
Closed

Cannot make on macOS #57

NilsIrl opened this issue Aug 16, 2021 · 8 comments · Fixed by #61

Comments

@NilsIrl
Copy link
Contributor

NilsIrl commented Aug 16, 2021

Hi, I'm on MacOS 11.4 (Big Sur) (M1) and I can't compile iodine.

I get the following error:

iodine % make
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
/bin/sh: line 0: cd: src: No such file or directory
^Cmake[47]: *** [all] Interrupt: 2
make[46]: *** [all] Error 130
make[45]: *** [all] Error 130
make[44]: *** [all] Error 130
make[43]: *** [all] Error 130
make[42]: *** [all] Error 130
make[41]: *** [all] Error 130
make[40]: *** [all] Error 130
make[39]: *** [all] Error 130
make[38]: *** [all] Error 130
make[37]: *** [all] Error 130
make[36]: *** [all] Error 130
make[35]: *** [all] Error 130
make[34]: *** [all] Error 130
make[33]: *** [all] Error 130
make[32]: *** [all] Error 130
make[31]: *** [all] Error 130
make[30]: *** [all] Error 130
make[29]: *** [all] Error 130
make[28]: *** [all] Error 130
make[27]: *** [all] Error 130
make[26]: *** [all] Error 130
make[25]: *** [all] Error 130
make[24]: *** [all] Error 130
make[23]: *** [all] Error 130
make[22]: *** [all] Error 130
make[21]: *** [all] Error 130
make[20]: *** [all] Error 130
make[19]: *** [all] Error 130
make[18]: *** [all] Error 130
make[17]: *** [all] Error 130
make[16]: *** [all] Error 130
make[15]: *** [all] Error 130
make[14]: *** [all] Error 130
make[13]: *** [all] Error 130
make[12]: *** [all] Error 130
make[11]: *** [all] Error 130
make[10]: *** [all] Error 130
make[9]: *** [all] Error 130
make[8]: *** [all] Error 130
make[7]: *** [all] Error 130
make[6]: *** [all] Error 130
make[5]: *** [all] Error 130
make[4]: *** [all] Error 130
make[3]: *** [all] Error 130
make[2]: *** [all] Error 130
make[1]: *** [all] Error 130
make: *** [all] Error 130

I'm not sure where to look for what could be causing the issue.

@siraben
Copy link

siraben commented Aug 16, 2021

I can compile on macOS. What's your PATH? My setup is as follows:

shell.nix

{ pkgs ? import <nixpkgs> {}}:
with pkgs;

mkShell {
  buildInputs = [ zlib openssl ];
}
$ nix-shell
[nix-shell:~/Git/iodine]$ make
make[1]: Entering directory '/Users/siraben/Git/iodine/src'
OS is DARWIN, arch is x86_64
CC tun.c
CC dns.c
CC read.c
CC encoding.c
CC login.c
CC base32.c
CC base64.c
Making base64u.c
CC base64u.c
CC base128.c
CC md5.c
CC common.c
common.c:283:2: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
        daemon(0, 0);
        ^
/nix/store/4km3r63w345qzmxw9q6473xapg6l1kj4-Libsystem-1238.60.2/include/stdlib.h:285:6: note: 'daemon' has been explicitly marked deprecated here
int      daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WAT...
         ^
1 warning generated.
CC iodine.c
CC client.c
CC util.c
LD ../bin/iodine
CC iodined.c
CC user.c
CC fw_query.c
LD ../bin/iodined
make[1]: Leaving directory '/Users/siraben/Git/iodine/src'

@yarrick
Copy link
Owner

yarrick commented Aug 17, 2021

It is also working running in github actions: https://github.com/yarrick/iodine/actions/workflows/macos.yml

Something is strange with your setup. Try GNU make and see if that works better.

@yarrick
Copy link
Owner

yarrick commented Aug 18, 2021

The src directory is missing for some reason, which causes make to loop. I fixed the looping in 6e4107a

@yarrick yarrick closed this as completed Aug 18, 2021
@NilsIrl
Copy link
Contributor Author

NilsIrl commented Sep 22, 2021

I just tested on master, and I still have the same issue except it doesn't loop anymore. I'm using GNU Make:

% make
/bin/sh: line 0: cd: src: No such file or directory
make: *** [all] Error 1

@yarrick
Copy link
Owner

yarrick commented Sep 22, 2021

How did you get the files? With git, a zipfile from github or some other way?

Can you post the output of find * from the same directory you run make?

Which shell are you using?

@NilsIrl
Copy link
Contributor Author

NilsIrl commented Oct 10, 2021

How did you get the files? With git, a zipfile from github or some other way?

I just cloned this git repository (hosted on GitHub).

Can you post the output of find * from the same directory you run make?

CHANGELOG
LICENSE
Makefile
README-android.txt
README-win32.txt
README.md
bin
bin/iodine
bin/iodined
doc
doc/iodine-server.service
doc/proto_00000502.txt
doc/proto_00000500.txt
doc/iodine.te
doc/iodine-server.socket
doc/proto_00000402.txt
man
man/iodine.8
src
src/common.c
src/android_dns.h
src/fw_query.c
src/iodined.o
src/base32.c
src/client.o
src/client.h
src/version.h
src/Android.mk
src/Android.16.mk
src/util.c
src/iodine.c
src/base64.o
src/user.c
src/base128.c
src/dns.c
src/Makefile
src/md5.o
src/md5.h
src/base64u.c
src/encoding.o
src/login.c
src/encoding.h
src/tun.c
src/read.c
src/windows.h
src/base32.o
src/client.c
src/fw_query.o
src/iodined.c
src/fw_query.h
src/common.o
src/common.h
src/user.o
src/user.h
src/base64.c
src/util.h
src/util.o
src/iodine.o
src/md5.c
src/base128.o
src/dns.h
src/dns.o
src/read.h
src/read.o
src/osflags
src/tun.h
src/tun.o
src/encoding.c
src/base64u.o
src/login.h
src/login.o
tests
tests/common.c
tests/fw_query.c
tests/base32.c
tests/user.c
tests/dns.c
tests/Makefile
tests/test.h
tests/login.c
tests/read.c
tests/base64.c
tests/test.c
tests/encoding.c

Which shell are you using?

I'm using the default on the operating system: zsh, I have not modified it. The error given is from /bin/sh anyway, which isn't the shell I'm using.

I was able to build iodine by just running make TARGETOS=Darwin all inside of the src directory directly.

So this problem is really specific to the following line:

@(cd src && $(MAKE) TARGETOS=$(TARGETOS) all)

NilsIrl added a commit to NilsIrl/iodine that referenced this issue Oct 10, 2021
* fixes the build for some people yarrick#57
* cleaner and more idiomatic
NilsIrl added a commit to NilsIrl/iodine that referenced this issue Oct 10, 2021
* fixes the build for some people yarrick#57
* cleaner and more idiomatic
@NilsIrl
Copy link
Contributor Author

NilsIrl commented Oct 10, 2021

The issue on my system seems to be linked to CDPATH, I'm not sure how that works, but either way the PR should fix it.

thoughtbot/capybara-webkit#56 (comment)

@yarrick
Copy link
Owner

yarrick commented Oct 10, 2021

I guess ./src would work in that case - but using -C is fine.

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

Successfully merging a pull request may close this issue.

3 participants