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

attempt to redefine 'UndefinedFilter' at line 41 #29

Open
ghost opened this issue Nov 27, 2015 · 4 comments
Open

attempt to redefine 'UndefinedFilter' at line 41 #29

ghost opened this issue Nov 27, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 27, 2015

any idea what this indicates?

Failed to load and run script from 
ERROR[main]: .../.minetest/mods/realterrain/init.lua:
ERROR[main]: .../.minetest/mods/realterrain/graphicsmagick/Image.lua:295: attempt to redefine 'UndefinedFilter' at line 41
ERROR[main]: stack traceback:
ERROR[main]:    [C]: in function 'cdef'
ERROR[main]:    .../.minetest/mods/realterrain/graphicsmagick/Image.lua:295: in main chunk
ERROR[main]:    [C]: in function 'require'
ERROR[main]:    .../.minetest/mods/realterrain/graphicsmagick/init.lua:2: in main chunk
ERROR[main]:    [C]: in function 'require'
ERROR[main]:    ....minetest/mods/realterrain/init.lua:32: in main chunk
@nagadomi
Copy link
Contributor

Maybe UndefinedFilter is conflicting with other ffi based library in your development environment.

Example:

local gm = require 'graphicsmagick'
-- redefine
local ffi = require 'ffi'
ffi.cdef [[
typedef enum {
  UndefinedFilter
} FooBar;
]]
% th ffi_cdef_conflict.lua 
/home/nagadomi/torch/install/bin/luajit: ffi_cdef_conflict.lua:8: attempt to redefine 'UndefinedFilter' at line 2
stack traceback:
    [C]: in function 'cdef'
    ffi_cdef_conflict.lua:8: in main chunk
    [C]: in function 'dofile'
    ...domi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:133: in main chunk
    [C]: at 0x00405ea0

@ghost
Copy link
Author

ghost commented Nov 28, 2015

thanks, that helped me fix that. the lua imagemagick library was conflicting.

now I have this:

graphicsmagick/info.lua:3: module 'sys' not found

is it really necessary to install torch just to use the basic image handling functions?

@soumith
Copy link
Collaborator

soumith commented Nov 28, 2015

I think it is. we only test and build stuff in the torch environment. Considering the ins and outs of this library are torch tensors, maybe pretty essential.

@ghost
Copy link
Author

ghost commented Nov 28, 2015

yes but there are plenty of features that have nothing to do with tensors, such as all the features of graphicsmagick that replace imagemagick, such as reading images from files, pixel access, etc.

by deleting the sys calls at the tops of convert.lua, and info.lua that check to see if the command is present, this library loaded for me. perhaps for users that only want to use non-tensor features you could change the method used to check for the presence of convert and info commands?

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

No branches or pull requests

2 participants