distro-cl icon indicating copy to clipboard operation
distro-cl copied to clipboard

Error "Function dlopen() seems not to be supported on your platform"

Open i55code opened this issue 8 years ago • 6 comments

Hi Hugh,

How to install with existing luajit version? I already have installed LUAJIT21 to my home directory

Installing Lua version: LUAJIT21 CMake Error at exe/luajit-rocks/luajit-2.1/CMakeLists.txt:156 (MESSAGE): Cannot compile a useful lua.

Function dlopen() seems not to be supported on your platform.

Apparently you are not on a Windows platform as well.

So lua has no way to deal with shared libraries!

Cheers, Zhong

i55code avatar Jun 22 '16 18:06 i55code

torch is not supported officially on Windows. I dont think I'm going to look trying to make cltorch work on Windows for now. For Windows OpenCL, you could try perhaps DeepCL: https://github.com/hughperkins/DeepCL

hughperkins avatar Jun 23 '16 01:06 hughperkins

My system is CentOS 6.

i55code avatar Jun 23 '16 16:06 i55code

Ah, CentOS ought to work. But I dont have a CentOS system to test on. I could spin one up, on ec2, but I'm busy trying to understand how Winograd works at the moment. Do you want to remind me in a week or two?

hughperkins avatar Jun 24 '16 01:06 hughperkins

Hugh, I'm having problems with trepl (torch-cl) being unable to find path to correct lua libs (64 bit). Depending on which IDE I use I get various error messages. Not sure how to point trepl to the correct path. I suspect the same may happen with the plain torch installation.

the error occurs when I call "io.lines"

Example:

error loading module 'libpaths' from file 'HOME/torch-cl/install/lib/lua/5.1/libpaths.so': dlopen(HOME/torch-cl/install/lib/lua/5.1/libpaths.so, 6): no suitable image found. Did find: HOME/torch-cl/install/lib/lua/5.1/libpaths.so: mach-o, but wrong architecture [C]: at 0x000a0070 [C]: in function 'require' HOME/torch-cl/install/share/lua/5.1/paths/init.lua:1: in main chunk [C]: in function 'require' HOME/torch-cl/install/share/lua/5.1/torch/init.lua:12: in main chunk [C]: in function 'require'

ro3c avatar Aug 30 '16 16:08 ro3c

I'm not sure... I'm guessing you're running on Mac? What happens if you create a folder $HOME/lib, and copy all the dylibs and bundles from ~/torch-cl/install/lib and ~/torch-cl/install/lib/lua/5.1 into this directory? (ie, is it something to do with Mac's System Integrity Protection?).

Unfortunately I dont have a Mac, so I cant actually dig into the problem myself really; I can just read around a bit, and guess. I think it needs you, or another Mac user, to dig into the problem really. I'm happy to answer questions about how things should in theory be working though.

I find the message about 'wrong architecture' a bit odd, it sounds like you're building eg for x86, but running using am64 (or visa versa). There should probalby be some tool (objtool?) to let you examine what architecture the bundles/dylibs are built for?

hughperkins avatar Aug 31 '16 11:08 hughperkins

Yes, I'm running OSX. Thanks for the clues, I'll keep digging and report back.

ro3c avatar Aug 31 '16 20:08 ro3c