TannerRogalsky / love.js

LÖVE ported to the web using Emscripten
MIT License
493 stars 53 forks source link

dlopen Error #17

Closed JanWerder closed 8 years ago

JanWerder commented 8 years ago

After compiling my solution successfully and deploying it onto my local python simple server, I get this error.

TannerRogalsky commented 8 years ago

@JanWerder It looks like it thinks you're running a fused game which definitely won't work. I'm going to need more information here about your game and possibly the source code.

JanWerder commented 8 years ago

What do you mean by "fused" exactly?

TannerRogalsky commented 8 years ago

I mean, dlopen should never be invoked in normal usage. I think that your game is either packaged incorrectly or trying to dynamically load a compiled library (a .dll or .so).

A fused game is where the executable and the game assets are merged together before release: https://love2d.org/wiki/Game_Distribution#Creating_a_Windows_Executable That method of packaging a game does require dlopen but shouldn't be used for building for web.

JanWerder commented 8 years ago

Okay, i looked through the project files but couldn't find anything along these terms. Can you provide me an email adress so I can send you the code?

TannerRogalsky commented 8 years ago

This was caused by a discrepancy in case-sensitivity between platforms. require seems to work regardless of case in a native environment but not in a browser environment. Will look into if this discrepancy can be resolved.

TannerRogalsky commented 8 years ago

Possibly because we use Lua 5.1 in Love.js.

Bobbyjoness commented 8 years ago

require is case sensitive on all platforms and in .zips. The only place it is not is on Windows when unzipped.

TannerRogalsky commented 8 years ago

@Bobbyjoness I'm not sure where you're getting that information but it seems not to be true. require is not case sensitive on OSX, either.

% ls
test.lua

% lua
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> = require 'Test'
true
> = require 'test'
true

% lua5.1
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> = require 'test'
true
> return  require 'Test'
true

% luajit
LuaJIT 2.0.4 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> = require 'Test'
true
> = require 'test'
true
Bobbyjoness commented 8 years ago

I assumed Mac was case sensitive since its Unix but actually it does both. The default is case insensitive. But zip files are still case sensitive on every platform. Which is basically me trying to say requiring being case sensitive in web is not an issue but a feature. IMO

TannerRogalsky commented 8 years ago

The error message for requiring a module that doesn't exist should be more clear now.

screen shot 2016-02-20 at 9 57 56 am