Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "undefined symbol: luaopen_libpng" when running torch-android #215

Merged
merged 4 commits into from
Feb 28, 2017

Conversation

wartstone
Copy link
Contributor

@wartstone wartstone commented Feb 27, 2017

libpng is a high usage lib for android' image related apps. Thus, when android has already loaded "libpng" module in system, the other "libpng" library generated by torch-image module would have a name conflict issue. Thus, when lua tried to require 'libpng', the dlsym() func would always return the original lib handle, which leads that torch cannot find "luaopen_libpng" exported func.

Solution: we rename this lib to avoid name conflict issue.

zheng03 added 3 commits February 27, 2017 15:41
- 'luaopen_libpng' undefined sysbol problem occus due to that system
  has already loaded "libpng" library in some other place. Then when
  we try to load same signature 'libpng' library, system would directly
  return the original library handle which of course there's no
  'luaopen_libpng' declared function.

-  Solution: Rebuild lua 'libpng' library to other name to avoid the
   library loading conflict.
- align exported func name to "luaopen_libluajit_png".
@soumith
Copy link
Member

soumith commented Feb 27, 2017

if you could rename it from luajit_png to lua_png, this PR is good to go.

- it make sense to name in 'lua_png', cleaner.
@soumith soumith merged commit fc214c0 into torch:master Feb 28, 2017
@soumith
Copy link
Member

soumith commented Feb 28, 2017

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants