Skip to content

Commit

Permalink
Fix exceptions by including a custom-compiled Lua library for Linux (…
Browse files Browse the repository at this point in the history
…workaround for D issue 10671)
  • Loading branch information
Jakob Ovrum committed Nov 27, 2014
1 parent dac25ad commit 2edc79c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"sourcePaths": ["luad"],
"importPaths": ["."],

"libs-posix": ["lua5.1"],
"libs-posix": ["dl"],
"libs-windows-x86_64-dmd": ["lua5.1"],
"sourceFiles-windows-x86-dmd": ["extlib/lua5.1.lib"]

"sourceFiles-windows-x86-dmd": ["extlib/lua5.1.lib"],
"sourceFiles-linux-x86": ["extlib/x86_32-linux-gnu/liblua.a"],
"sourceFiles-linux-x86_64": ["extlib/x86_64-linux-gnu/liblua.a"],
}
3 changes: 3 additions & 0 deletions extlib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ with the more commonly used COFF format, they are not compatible, so
this binary is included for convenience. It is not an import library -
there is no dependency on a DLL.

## Lua static library with frame pointers for Linux
[Issue 10671](https://issues.dlang.org/show_bug.cgi?id=10671) necessitates Lua to be built with `-fno-omit-frame-pointer`, so a distribution-agnostic `liblua.a` is included and used by default for both x86-32 and x86-64 Linux targets. For other targets that are hit by [issue 10671](https://issues.dlang.org/show_bug.cgi?id=10671), an appropriately compiled library needs to be supplied by the user.

### Reproducing the build
Copy `dmc.mak` from this directory to the top level directory
of the Lua source code release. Then edit `src/luaconf.h` to manually disable `popen` support. Then invoke the makefile with GNU make:
Expand Down
Binary file added extlib/x86_32-linux-gnu/liblua.a
Binary file not shown.
Binary file added extlib/x86_64-linux-gnu/liblua.a
Binary file not shown.

0 comments on commit 2edc79c

Please sign in to comment.