Re: On Mac Ventura, Pike v9 missing GMP symbols

[email protected] Mon, 11 Mar 2024 18:08:44 -0400
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Yes, that's sort of what I was getting at. The error seems like it's not 
trying to link the gmp library. Is the library present in your 
/usr/local/lib? You could try adding -lgmp to modules/linker_options and 
modules/Gmp/linker_options? If you can avoid triggering a rewrite of 
those files, it should try to link with -lgmp added.

A little more detail:

MODULE_LDFLAGS is used as input to the linker_options make target in the 
modules/Gmp directory, which is then used to generate the 
modules/linker_options file, which is used to statically link a few 
modules into the pike binary (Gmp and Stdio, in particular).

linker_options is generated by running MODULE_LDFLAGS through a sed 
command, and if the sed command fails, it doesn't include any libs. Is 
it possible you're running into this:

https://git.lysator.liu.se/pikelang/pike/-/issues/10082

?

Can you run the following commands in the build/.../modules/Gmp 
directory and upload all of the results somewhere?

echo Lang: $LANG
echo Locale: $LOCALE
rm linker_options
make linker_options
cat linker_options

Bill

On 2024-03-11 10:15, Mike Kilmer wrote:
> Poking around further, linker_options contains:
> 
>  /Users/mikekilmer/pike/build/darwin-22.6.0-x86_64/modules/Gmp/module.a
> 
> Chris says that his (Debian) install includes the -lgmp option at the
> end of that path.
> 
> config.status contains:
> 
>  S["LIBS"]=" -lgmp"
> 
> Makefile:
> 
>  MODULE_LDFLAGS=-L/usr/local/opt/ruby/lib
> -L/usr/local/opt/postgresql@15/lib -L/usr/local/opt/icu4c/lib \
>  -L/usr/local/lib -framework Foundation -framework System -framework
> CoreServices \
>  
> -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3
> \
>   -ldl -lutil -lm -lpoll -framework CoreServices -lgmp
> 
>> 
>  gmp_machine.h:
> 
>> #define HAVE_GMP_H 1
>> 
>> #define HAVE_LIBGMP 1
>  Mike