On Mac Ventura, Pike v9 missing GMP symbols

Mike Kilmer <[email protected]> Fri, 8 Mar 2024 22:05:34 -0600
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
--Apple-Mail=_1C845C91-E160-48BA-BC6C-D2EDA66FCB41
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi, all.

Nice to meet you.

Any Mac users around?

Was able to easily install Pike v8 with homebrew, but am trying to =
compile from source on my Mac (Ventura) and struggling with it not =
finding the GMP libraries.

Tried download as well as git clone =
git://pike-git.lysator.liu.se/pike.git and configure/making from there.

Trying to compile the master branch I get:

* GMP is homebrew installed with libraries added to env: =
LDFLAGS=3D"$LDFLAGS -L/usr/local/Cellar/gmp/6.3.0/lib"=20
* Content of `build/darwin-22.6.0-x86_64/modules/Gmp/linker_options`:
	=
/Users/mikekilmer/Pike-v9.0-snapshot/build/darwin-22.6.0-x86_64/modules/Gm=
p/module.a
* Also tried compiling GMP manually into /usr/local/lib/ and it reports =
that many of the files contain no symbols
	however, for example /usr/local/lib/libgmp.a contains strings =
that look like symbols: eg ___gmp_randseed

Error:
Undefined symbols for architecture x86_64:
  "___gmp_set_memory_functions", referenced from:
      _pike_module_Gmp_init in module.a(mpz_glue.o)
Etc...

After checking out 8.0, (or 8.1) `make` yields this:

...
configure.in:35: warning: _AC_CONFIG_SUBDIRS: you should use literals
./lib/autoconf/status.m4:1096: AC_CONFIG_SUBDIRS is expanded from...
configure.in:35: the top level
...

Configure arguments:
Use `make CONFIGUREARGS=3D"..." ...' to change them.
They will be retained in the build directory.

Wondering if a virtual linux solution may be necessary.

Any thoughts?

Thanks much.=

--Apple-Mail=_1C845C91-E160-48BA-BC6C-D2EDA66FCB41
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Hi, =
all.</span><div style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);"><br></div><div><font color=3D"#000000"><span style=3D"caret-color: =
rgb(0, 0, 0);">Nice to meet you.</span></font><br><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Any Mac users =
around?<br><div><br></div><div>Was able to easily install Pike v8 with =
homebrew, but am trying to compile from source on my Mac (Ventura) and =
struggling with it not finding the GMP libraries.<div><br></div>Tried =
download as well as git clone&nbsp;<a =
href=3D"git://pike-git.lysator.liu.se/pike.git">git://pike-git.lysator.liu=
.se/pike.git</a>&nbsp;and configure/making from =
there.</div><div><br><div>Trying to compile the master branch I =
get:</div><div><br></div><div>* GMP is homebrew installed with libraries =
added to env: LDFLAGS=3D"$LDFLAGS =
-L/usr/local/Cellar/gmp/6.3.0/lib"&nbsp;</div></div></div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">* Content of =
`build/darwin-22.6.0-x86_64/modules/Gmp/linker_options`:</div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span =
class=3D"Apple-tab-span" style=3D"white-space: pre;">	=
</span>/Users/mikekilmer/Pike-v9.0-snapshot/build/darwin-22.6.0-x86_64/mod=
ules/Gmp/module.a</div><div style=3D"caret-color: rgb(0, 0, 0); color: =
rgb(0, 0, 0);">* Also tried compiling GMP manually =
into&nbsp;/usr/local/lib/ and it reports that many of the files contain =
no symbols</div><div style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, =
0, 0);"><span class=3D"Apple-tab-span" style=3D"white-space: pre;">	=
</span>however, for example&nbsp;/usr/local/lib/libgmp.a contains =
strings that look like symbols: eg&nbsp;___gmp_randseed</div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);">Error:</div><blockquote style=3D"caret-color: rgb(0, 0, 0); color: =
rgb(0, 0, 0); margin: 0px 0px 0px 40px; border: medium; padding: =
0px;"><div>Undefined symbols for architecture x86_64:</div><div>&nbsp; =
"___gmp_set_memory_functions", referenced from:</div><div>&nbsp; &nbsp; =
&nbsp; _pike_module_Gmp_init in =
module.a(mpz_glue.o)</div><div>Etc...</div></blockquote><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">After checking =
out 8.0, (or 8.1) `make` yields this:</div><div style=3D"caret-color: =
rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></div><div><div><font =
color=3D"#000000"><span style=3D"caret-color: rgb(0, 0, =
0);">...</span></font></div><div><font color=3D"#000000"><span =
style=3D"caret-color: rgb(0, 0, 0);">configure.in:35: warning: =
_AC_CONFIG_SUBDIRS: you should use =
literals</span></font></div><div><font color=3D"#000000"><span =
style=3D"caret-color: rgb(0, 0, 0);">./lib/autoconf/status.m4:1096: =
AC_CONFIG_SUBDIRS is expanded from...</span></font></div><div><font =
color=3D"#000000"><span style=3D"caret-color: rgb(0, 0, =
0);">configure.in:35: the top level</span></font></div><div><font =
color=3D"#000000"><span style=3D"caret-color: rgb(0, 0, =
0);">...</span></font></div><div><font color=3D"#000000"><span =
style=3D"caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font =
color=3D"#000000"><span style=3D"caret-color: rgb(0, 0, 0);">Configure =
arguments:</span></font></div><div><font color=3D"#000000"><span =
style=3D"caret-color: rgb(0, 0, 0);">Use `make CONFIGUREARGS=3D"..." =
...' to change them.</span></font></div><div><font color=3D"#000000"><span=
 style=3D"caret-color: rgb(0, 0, 0);">They will be retained in the build =
directory.</span></font></div></div><div style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0);"><font color=3D"#000000"><br></font></div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><font =
color=3D"#000000">Wondering if a virtual linux solution may be =
necessary.</font></div><div style=3D"caret-color: rgb(0, 0, 0); color: =
rgb(0, 0, 0);"><br></div><div style=3D"caret-color: rgb(0, 0, 0); color: =
rgb(0, 0, 0);">Any thoughts?</div><div style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0);"><br></div><div style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0);">Thanks much.</div></div></body></html>=

--Apple-Mail=_1C845C91-E160-48BA-BC6C-D2EDA66FCB41--