[MacPorts] #66584: lua50, lua52, lua @ 5.3.5_0: tests fail due to missing liblua.dylib
MacPorts
noreply at macports.org
Thu Dec 29 13:54:42 UTC 2022
#66584: lua50, lua52, lua @ 5.3.5_0: tests fail due to missing liblua.dylib
--------------------+-------------------------------
Reporter: harens | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: lua50, lua52, lua
--------------------+-------------------------------
As part of the `src-makefile` patch, the lua binary is linked to
liblua.dylib.
{{{#!diff
+$(LUA_DYLIB): $(BASE_O)
+ @echo "Building dynamic library (dylib)"
+ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name
@PREFIX@/lib/lua- at BRANCH@/liblua- at BRANCH@.dylib \
+ -compatibility_version @BRANCH@ -current_version @VERSION@
$^
+
$(LUA_T): $(LUA_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua- at BRANCH@
lua.c
$(LUAC_T): $(LUAC_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
}}}
The tests, which run the lua binary, then fail since it expects
liblua.dylib to be in `${prefix}/lib`. It is instead in
`${worksrcpath}/src`.
{{{#!shell
---> Testing lua
Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_github
.com_macports_macports-ports_lang_lua/lua/work/lua-5.3.5" && /usr/bin/make
test
src/lua -v
dyld[12412]: Library not loaded: /opt/local/lib/liblua.dylib
Referenced from:
/opt/local/var/macports/build/_opt_local_var_macports_sources_github
.com_macports_macports-ports_lang_lua/lua/work/lua-5.3.5/src/lua
Reason: tried: '/opt/local/lib/liblua.dylib' (no such file),
'/usr/local/lib/liblua.dylib' (no such file), '/usr/lib/liblua.dylib' (no
such file)
make: *** [test] Abort trap: 6
}}}
I tried setting `test.env DYLD_LIBRARY_PATH=${worksrcpath}/src`, which
didn't seem to work. lua51 builds the dynamic library, but either rightly
or wrongly doesn't link to it, and so its tests pass.
--
Ticket URL: <https://trac.macports.org/ticket/66584>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list