pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/lua-compat53 build error on macOS



On Mon, Jul 05, 2021 at 02:07:38PM +0000, nia wrote:
Mm, I believe it should be a bundle (i.e. -shared) because it's a
loadable module and the file extension is .so, but I'm not a Mach-O
expert.

I'm also not an expert :( My understanding is that -shared causes a shared
libary to be built (.dylib), rather than a bundle (.so). I'm guessing
that's why we get the build failure - -shared in LDFLAGS results in
-dynamiclib being used, causing the conflict with -bundle (as the output
can be one or the other, not both bundle and shared lib)?

When -shared is removed from LDFLAGS, -bundle is still passed:

===
--- utf8.so ---
clang -bundle -undefined dynamic_lookup -L/opt/pkg/lib  -o utf8.so lutf8lib.o
--- tests/testmod.so ---
clang -bundle -undefined dynamic_lookup -L/opt/pkg/lib  -o tests/testmod.so testmod.o
--- table.so ---
clang -bundle -undefined dynamic_lookup -L/opt/pkg/lib  -o table.so ltablib.o
--- string.so ---
clang -bundle -undefined dynamic_lookup -L/opt/pkg/lib  -o string.so lstrlib.o
===

$ file *.so string.so: Mach-O 64-bit x86_64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>
table.so:  Mach-O 64-bit x86_64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>
utf8.so:   Mach-O 64-bit x86_64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>

Cheers, MJ
--
Michael-John Turner * mj%mjturner.net@localhost * http://mjturner.net/

Home | Main Index | Thread Index | Old Index