Bug 106845 - Add dynamic loading capability for lua
Summary: Add dynamic loading capability for lua
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Development (show other bugs)
Version: unspecified
Hardware: i586 SuSE Pro 9.3
: P5 - None : Enhancement
Target Milestone: ---
Assignee: Marian Jancar
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-23 20:04 UTC by William Fulton
Modified: 2005-09-08 13:19 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
tarball as described earlier for testing dynamic libraries (12.89 KB, application/x-bzip2)
2005-08-24 15:38 UTC, William Fulton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Fulton 2005-08-23 20:04:14 UTC
Dynamic loading of shared objects is not enabled with your prebuilt lua binaries.

Details are in Ticket [20050818990000192] that I sent to feedback@suse.de.
Includes configuration details for building lua and an example to test if it is
working.

Many thanks
Comment 1 Philipp Thomas 2005-08-24 10:32:35 UTC
Here is the feedback ticket as not all developers have access:

Dynamic loading of shared objects is not enabled with your prebuilt lua binaries.

Is it possible to please enable dynamic library loading when building Lua for
the next version of SuSE? This is simply done by uncommenting these lines in the
lua-5.0.2/config file:

LOADLIB= -DUSE_DLOPEN=1
DLLIB= -ldl

I've tested that it works on an x86 system. If you need some test files, I'll
put some together. Please email me back.

Thanks

William

I've attached a tarball. It is an example (based on an example from the SWIG
tool) demonstrating Lua with dynamic loading. Run make. You should get the
following output if dynamic loading is working:

william@jaguar:~/swig/SWIG/Examples/william/luatest> make
echo you might need to adjust /usr/local/lib to point to wherever the lua
libraries are installed
you might need to adjust /usr/local/lib to point to wherever the lua libraries
are installed
g++ -c -fpic  example_wrap.cxx  example.cxx
g++ -shared   example.o example_wrap.o  -L/usr/local/lib -llua -llualib  -o
example.so
lua runme.lua
Creating some objects:
    Created circle      userdata: 0x8069ae8
    Created square      userdata: 0x8069b50

A total of      2       shapes were created

Here is their current position:
    Circle = (20.000000, 30.000000)
    Square = (-10.000000, 5.000000)

Here are some properties of the shapes:
        userdata: 0x8069ae8
        area      =     314.15926535898
        perimeter =     62.831853071796
        userdata: 0x8069b50
        area      =     100
        perimeter =     40

Guess I'll clean up now
0       shapes remain
Goodbye
Comment 2 Philipp Thomas 2005-08-24 10:33:43 UTC
William, could you please attach the tarball containing the example to this bug?
It somehow got lost in our feedback system.
Comment 3 William Fulton 2005-08-24 15:38:26 UTC
Created attachment 47422 [details]
tarball as described earlier for testing dynamic libraries
Comment 4 Philipp Thomas 2005-08-24 16:01:47 UTC
Reassign to maintainer
Comment 5 Anna Maresova 2005-09-08 13:19:15 UTC
fixed