[PD-dev] Problem building pdlua on MinGW

PSPunch shima at pspunch.com
Tue Sep 2 09:38:04 CEST 2008


Hi,


This may or may not be a question specific to pdlua.
As a base line, I am using the following combination of files.

- MinGW for building
- Using pd.dll from pd-extended 0.40.3-20080721 (Win binary package)
- Using m_pd.h from pd-0.40.3 source


Although I am not fully aware of the compatibilities between binaries
built on different compilers, if the above combination is an obvious no
no, that may be the problem. (The last two lines of the output seem a
bit suspicious)


Attempting to build pdlua, the build completes but leaving me with a dll
which fails to load on pd-extended 0.40.3-20080721 (Windows installer).

Things I have done,
- Modify Makefile.static; comment out lines to specify building on MinGw
- Manually download lua-5.1.3.tar.gz as my MinGW setup did not have
  wget originally used in the Makefile.


I would appreciate advise on how I may be able to get this running..
Thanks.

-------------------------
$ make -f Makefile.static
tar xzf lua-5.1.3.tar.gz
touch lua-5.1.3/unpack.stamp
make -C lua-5.1.3 mingw local
make[1]: Entering directory `/home/gyokimae/pdlua-0.5/lua-5.1.3'
cd src && make mingw
make[2]: Entering directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
make "LUA_A=lua51.dll" "LUA_T=lua.exe" \
"AR=gcc -shared -o" "RANLIB=strip --strip-unneeded" \
"MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
make[3]: Entering directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lua.o lua.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lapi.o lapi.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lcode.o lcode.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ldebug.o ldebug.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ldo.o ldo.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ldump.o ldump.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lfunc.o lfunc.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lgc.o lgc.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o llex.o llex.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lmem.o lmem.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lobject.o lobject.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lopcodes.o lopcodes.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lparser.o lparser.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lstate.o lstate.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lstring.o lstring.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ltable.o ltable.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ltm.o ltm.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lundump.o lundump.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lvm.o lvm.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lzio.o lzio.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lauxlib.o lauxlib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lbaselib.o lbaselib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ldblib.o ldblib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o liolib.o liolib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lmathlib.o lmathlib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o loslib.o loslib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o ltablib.o ltablib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o lstrlib.o lstrlib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o loadlib.o loadlib.c
gcc -O2 -Wall -DLUA_BUILD_AS_DLL   -c -o linit.o linit.c
gcc -shared -o lua51.dll lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o
lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o
ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o
liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
strip --strip-unneeded lua51.dll
gcc -o lua.exe -s lua.o lua51.dll -lm
make[3]: Leaving directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
make "LUAC_T=luac.exe" luac.exe
make[3]: Entering directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
gcc -O2 -Wall    -c -o luac.o luac.c
gcc -O2 -Wall    -c -o print.o print.c
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o
llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o
ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o
lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
ranlib liblua.a
gcc -o luac.exe  luac.o print.o liblua.a -lm
make[3]: Leaving directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
make[2]: Leaving directory `/home/gyokimae/pdlua-0.5/lua-5.1.3/src'
make install INSTALL_TOP=..
make[2]: Entering directory `/home/gyokimae/pdlua-0.5/lua-5.1.3'
cd src && mkdir -p ../bin ../include ../lib ../man/man1 ../share/lua/5.1
../lib/lua/5.1
cd src && install -p -m 0755 lua luac ../bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h
../etc/lua.hpp ../include
cd src && install -p -m 0644 liblua.a ../lib
cd doc && install -p -m 0644 lua.1 luac.1 ../man/man1
make[2]: Leaving directory `/home/gyokimae/pdlua-0.5/lua-5.1.3'
make[1]: Leaving directory `/home/gyokimae/pdlua-0.5/lua-5.1.3'
touch lua-5.1.3/build.stamp
gcc -ansi -pedantic -Wall -O2 -fPIC -Ilua-5.1.3/include/ -I./
-export_dynamic -shared -o src/lua.dll src/lua.c lua-5.1.3/lib/liblua.a
pd.dll
src/lua.c:1: warning: -fPIC ignored for target (all code is position
independent)
src/lua.c:51:4: warning: #warning is a GCC extension
src/lua.c:51:4: warning: #warning "Pd version is not new enough for
64-bit safe arrays"
src/lua.c: In function `pdlua_setvalue':
src/lua.c:899: warning: passing arg 1 of `gensym' discards qualifiers
from pointer target type
src/lua.c: In function `pdlua_getvalue':
src/lua.c:915: warning: passing arg 1 of `gensym' discards qualifiers
from pointer target type
src/lua.c: In function `pdlua_getarray':
src/lua.c:938: warning: passing arg 1 of `gensym' discards qualifiers
from pointer target type
src/lua.c: In function `pdlua_redrawarray':
src/lua.c:1001: warning: passing arg 1 of `gensym' discards qualifiers
from pointer target type
Info: resolving _garray_class by linking to __imp__garray_class
(auto-import)
Info: resolving _s_ by linking to __imp__s_ (auto-import)


--
David Shimamoto




More information about the Pd-dev mailing list