SquircleSpace / shcl

SHell in Common Lisp
Apache License 2.0
318 stars 17 forks source link

make fails on macOS #4

Closed auvi closed 6 years ago

auvi commented 6 years ago

I tried to compile on macOS and looks like it is calling a Linux only function clearenv

 $ make
clang -fPIC -o core/support/macros.o -c core/support/macros.c
clang -fPIC -o core/support/spawn.o -c core/support/spawn.c
core/support/spawn.c:137:14: warning: implicit declaration of function 'clearenv' is invalid in C99
      [-Wimplicit-function-declaration]
    if (0 != clearenv()) {
             ^
1 warning generated.
clang -shared -o libshcl-support.so core/support/macros.o core/support/spawn.o
Undefined symbols for architecture x86_64:
  "_clearenv", referenced from:
      _shcl_spawn in spawn.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libshcl-support.so] Error 1
SquircleSpace commented 6 years ago

Right now, macOS is unsupported, and I don't have any macs to build/test on. If you feel like taking the lead on getting SHCL working on macOS, I'll happily accept your pull request! I tried to stick to only using functions that are defined by POSIX, so it shouldn't be too bad to get it working. There may have been a few other slip-ups like this, though.

SquircleSpace commented 6 years ago

Should be working now! Our travis-ci builds are proof!