Opened 8 years ago

Last modified 8 years ago

#51244 new defect

lua51 port does not support dynamic libraries

Reported by: proforg@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mojca (Mojca Miklavec)
Port: lua51

Description

current build of lua51 package does not support dynamic libraries:

~>lua5.1 test.lua
lua5.1: error loading module 'curl' from file '/opt/local/lib/lua/5.1/curl.so':
        dynamic libraries not enabled; check your Lua installation

as far as I can see, this problem is caused by custom CFLAGS passed to Makefile, so defaults (especially -DLUA_USE_LINUX), used for src/Makefile are not used

DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua51/lua51/work/lua-5.1.5"
&& /usr/bin/make -w macosx V=5.1 R=5.1.5 PREFIX=/opt/local CC="/usr/bin/clang" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" CFLAGS="-Os -I/o
pt/local/include -arch x86_64"'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua51/lua51/work/lua-5.
1.5" && /usr/bin/make -w macosx V=5.1 R=5.1.5 PREFIX=/opt/local CC="/usr/bin/clang" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" CFLAGS="-Os
 -I/opt/local/include -arch x86_64"
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua51/lua51/work/lua-5.1.5'
cd src && /Applications/Xcode.app/Contents/Developer/usr/bin/make macosx V=5.1 R=5.1.5 INSTALL_LIB=/opt/local/lib/lua-5.1
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua51/lua51/work/lua-5.1.5/src
'
/Applications/Xcode.app/Contents/Developer/usr/bin/make all MYCFLAGS="-fno-common -DLUA_USE_LINUX" MYLIBS="-lreadline"
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua51/lua51/work/lua-5.1.5/src
'
/usr/bin/clang -Os -I/opt/local/include -arch x86_64   -c -o lapi.o lapi.c

as a result, dynamic libraries are disabled.

simplest fix would be to add -DLUA_USE_LINUX to Portfile's configure.cflags

Change History (2)

comment:1 Changed 8 years ago by mojca (Mojca Miklavec)

How did you install curl.so?

comment:2 Changed 8 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

Note: See TracTickets for help on using tickets.