<div dir="ltr"><div dir="ltr">Seems like <a href="https://github.com/nim-lang/Nim/issues/16803">https://github.com/nim-lang/Nim/issues/16803</a>. One possible way to make this work is to compile statically. I.E.<div><br></div><div>➜  nim_test nim --dynlibOverride:gmp --passL:/opt/local/lib/libgmp.a c arithmetic_geometric_mean_calculate_pi.nim<br>Hint: used config file '/opt/local/lib/nim/config/nim.cfg' [Conf]<br>Hint: used config file '/opt/local/lib/nim/config/config.nims' [Conf]<br>.............................................................................................<br>Hint:  [Link]<br>ld: warning: ignoring duplicate libraries: '-lm'<br>Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)<br>52558 lines; 0.561s; 75.539MiB peakmem; proj: /<redact>/nim_test/arithmetic_geometric_mean_calculate_pi.nim; out: /<redact>/nim_test/arithmetic_geometric_mean_calculate_pi [SuccessX]<br>➜  nim_test ./arithmetic_geometric_mean_calculate_pi<br>Computed 25000 digits in 50 ms<br>π = 3.141592653589793238...81377399510065895288...<br></div><div><br></div><div>Instead of</div><div><br></div><div>➜  nim_test nim -d:nimDebugDlOpen c arithmetic_geometric_mean_calculate_pi.nim<br>Hint: used config file '/opt/local/lib/nim/config/nim.cfg' [Conf]<br>Hint: used config file '/opt/local/lib/nim/config/config.nims' [Conf]<br>.............................................................................................<br>CC: ../../../../opt/local/lib/nim/lib/system.nim<br>CC: ../../../../opt/local/lib/nim/lib/pure/parseutils.nim<br>CC: ../../.nimble/pkgs/gmp-0.2.5/gmp.nim<br>CC: ../../.nimble/pkgs/bignum-1.0.4/bignum.nim<br>CC: ../../../../opt/local/lib/nim/lib/pure/os.nim<br>CC: arithmetic_geometric_mean_calculate_pi.nim<br>Hint:  [Link]<br>ld: warning: ignoring duplicate libraries: '-lm'<br>Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)<br>52558 lines; 0.590s; 75.625MiB peakmem; proj: /<redact>/nim_test/arithmetic_geometric_mean_calculate_pi.nim; out: /<redact>/nim_test/arithmetic_geometric_mean_calculate_pi [SuccessX]<br>➜  nim_test ./arithmetic_geometric_mean_calculate_pi<br>dlopen(libgmp.dylib, 0x0002): tried: 'libgmp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgmp.dylib' (no such file), '/usr/lib/libgmp.dylib' (no such file, not in dyld cache), 'libgmp.dylib' (no such file)<br>could not load: libgmp.dylib<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Dec 31, 2024 at 8:06 PM Kenneth Wolcott <<a href="mailto:kennethwolcott@gmail.com">kennethwolcott@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Ryan;<div><br></div><div>  Thank you for replying.</div><div><br></div><div>  Here is more information regarding the problem I am experiencing.</div><div><br></div><div>  I have attached some Nim source code (from Rosetta Code web site), compile log, execution log and the pkg install log.</div><div><br></div><div>  1. MacOS 15.2</div><div>  2. M1 chip (arm64, aarch64)</div><div>  3. MacPorts port: nim</div><div>  4. nimble is the Nim package manager which comes with the nim port.</div><div>  4. nimble install bignum (seems to successfully install, but I wonder if it is silently installing an x86-64 pre-compiled binary??)</div><div>  5. compile using: nim c ./arithmetic_geometric_mean_calculate_pi</div><div>  6. execute: ./arithmetic_geometric_mean_calculate_pi</div><div><br></div><div>  Compiling with debug, suggested by the execution failure message, did not at all provide and additional information than compiling in default mode.</div><div><br></div><div>  I do not recall specifically which external Nim pkg that I was able to install and subsequently compile a Nim source which used it and successfully executed, but it as at least one if not several, so I don't thikthat this is a general silent Nim pkg installation failure.</div><div><br></div><div>Thanks again for the help with this issue.</div><div><br></div><div>Ken Wolcott</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 31, 2024 at 1:56 PM Ryan Carsten Schmidt <<a href="mailto:ryandesign@macports.org" target="_blank">ryandesign@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Dec 31, 2024, at 14:13, Kenneth Wolcott wrote:<br>
> <br>
> Any hints for me please?<br>
<br>
I'm not familiar with the software you're using. What ports should I install and what commands should I run to see the problem you're seeing? You're on an Apple Silicon Mac? What macOS version?  <br>
</blockquote></div>
</blockquote></div></div>