diff Raku/build.md @ 2:b6c284fd5ae4

backup 2020-12-16
author autobackup
date Wed, 16 Dec 2020 15:11:16 +0900
parents e12992dca4a0
children
line wrap: on
line diff
--- a/Raku/build.md	Wed Dec 16 15:04:03 2020 +0900
+++ b/Raku/build.md	Wed Dec 16 15:11:16 2020 +0900
@@ -1,9 +1,53 @@
 # macos 上で Raku を build する
 
  git clone https://github.com/rakudo/rakudo.git
- 
+
 ## 以下を実行する
 
-  perl Configure.pl --prefix=/Users/one/src/Perl6/rakudo_build  --gen-moar --gen-nqp --backends=moar --moar-option='--compiler=clang' --moar-option='--static' 
-  
-static にしないと moar のshared libraryを見つけられないらしい。開発用なら、これで良いのではないか。
\ No newline at end of file
+```
+   export RB=/Users/one/src/Perl6/rakudo_build
+   export DYLD_FALLBACK_LIBRARY_PATH=$RB/lib
+  perl Configure.pl --prefix=$RB  --gen-moar --gen-nqp --backends=moar --moar-option='--compiler=clang'  
+```
+
+失敗する
+
+## nqp/MoarVM/Configure.pl* を修正する
+
+```
+diff --git a/Configure.pl b/Configure.pl
+index 69351ff52..13d9b30c8 100755
+--- a/Configure.pl
++++ b/Configure.pl
+@@ -201,14 +201,14 @@ if ($^O eq 'darwin') {
+     if ($gnu_toolchain && $gnu_count != scalar @check_tools) {
+         print "\nNot all tools in the toolchain are GNU. Please correct this and retry.\n"
+             . "See README.markdown for more details.\n\n";
+-        exit -1;
++       # exit -1;
+     }
+ 
+     ## Otherwise, make sure that none of them are GNU
+     elsif (!$gnu_toolchain && $gnu_count != 0) {
+         print "\nGNU tools detected, despite this not being a GNU-oriented build.\n"
+             ." Please correct this and retry. See README.markdown for more details.\n\n";
+-        exit -1;
++       # exit -1;
+     }
+ }
+```
+
+もう一度、
+
+```
+  perl Configure.pl --prefix=$RB  --gen-moar --gen-nqp --backends=moar --moar-option='--compiler=clang'  
+```
+
+する。
+
+
+## おまけ
+
+moar を --moar-option="-static" にしても、nqp-m とかが同じ問題を言ってくる。LD_LIBRARY_PATH ではダメらしい。
+
+https://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s
\ No newline at end of file