Last active
December 14, 2015 19:18
-
-
Save ponkore/5135069 to your computer and use it in GitHub Desktop.
sagittarius build error (ffi)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scanning dependencies of target sagittarius--ffi | |
[ 41%] Building C object build/ext/ffi/CMakeFiles/sagittarius--ffi.dir/sagittarius-ffi.c.o | |
[ 41%] Building C object build/ext/ffi/CMakeFiles/sagittarius--ffi.dir/ffi_stub.c.o | |
Linking C shared module ../../sagittarius--ffi.so | |
Undefined symbols for architecture x86_64: | |
"_ffi_call", referenced from: | |
_internal_ffi_call in sagittarius-ffi.c.o | |
"_ffi_prep_cif_machdep", referenced from: | |
_ffi_prep_cif in liblibffi.a(prep_cif.c.o) | |
"_ffi_prep_closure_loc", referenced from: | |
_prep_method_handler in sagittarius-ffi.c.o | |
_ffi_prep_closure in liblibffi.a(prep_cif.c.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[2]: *** [build/sagittarius--ffi.so] Error 1 | |
make[1]: *** [build/ext/ffi/CMakeFiles/sagittarius--ffi.dir/all] Error 2 | |
make: *** [all] Error 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/os/posix/system.c b/src/os/posix/system.c | |
index 9217049..0468c30 100755 | |
--- a/src/os/posix/system.c | |
+++ b/src/os/posix/system.c | |
@@ -65,7 +65,12 @@ | |
#include <sagittarius/number.h> | |
#include <sagittarius/bytevector.h> | |
+#if 1 | |
+#include <crt_externs.h> | |
+#define environ (*_NSGetEnviron()) | |
+#else | |
extern char** environ; | |
+#endif | |
/* os dependent values */ | |
const SgChar* Sg_NativeFileSeparator() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment