Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

Build fixing patches #24

Merged
merged 4 commits into from

2 participants

@blochl

Hi,

These patches solve some compilation issues which the Diod 9p server currently has:

  • Eliminating an error when trying to cross-compile a static diod binary. Cross-compiling a statically linked binary may be very useful for embedded or minimalist systems.
  • If the Perl binary was not in /usr/bin/perl, the build would fail.
  • The build would also fail if Lua 5.2 (and not 5.1) was installed. Deprecated Lua functions replaced.
  • Building instructions in README.md were updated.
blochl added some commits
@blochl blochl Diod: Fix for cross-compiling
Fix failures during cross-compiling on some systems.

Signed-off-by: Leonid Bloch <leonid@daynix.com>
800ec4d
@blochl blochl Diod: Fix for non-standard location of Perl
If the perl binary was not in /usr/bin/perl, the build would fail.

Signed-off-by: Leonid Bloch <leonid@daynix.com>
0beed57
@blochl blochl Diod: Lua detection fix and replacing deprecated function
lua_open was replaced with luaL_newstate, which succeeded it in Lua 5.2.
lua_open was already deprecated in Lua 5.1.
Also, in order to check for Lua during config, a test for luaL_newstate
is used, which works for both Lua 5.1 and 5.2, instead of testing for
lua_call, which does not work for Lua 5.2.

Signed-off-by: Leonid Bloch <leonid@daynix.com>
97fb8fd
@blochl blochl Diod: Updated building instructions
Updated build instructions in README.md.

Signed-off-by: Leonid Bloch <leonid@daynix.com>
900fa1f
@garlick
Owner

Looks good, thanks!

@garlick garlick merged commit 2d5ac46 into chaos:master
@blochl

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 20, 2015
  1. @blochl

    Diod: Fix for cross-compiling

    blochl authored
    Fix failures during cross-compiling on some systems.
    
    Signed-off-by: Leonid Bloch <leonid@daynix.com>
  2. @blochl

    Diod: Fix for non-standard location of Perl

    blochl authored
    If the perl binary was not in /usr/bin/perl, the build would fail.
    
    Signed-off-by: Leonid Bloch <leonid@daynix.com>
  3. @blochl

    Diod: Lua detection fix and replacing deprecated function

    blochl authored
    lua_open was replaced with luaL_newstate, which succeeded it in Lua 5.2.
    lua_open was already deprecated in Lua 5.1.
    Also, in order to check for Lua during config, a test for luaL_newstate
    is used, which works for both Lua 5.1 and 5.2, instead of testing for
    lua_call, which does not work for Lua 5.2.
    
    Signed-off-by: Leonid Bloch <leonid@daynix.com>
Commits on Jul 21, 2015
  1. @blochl

    Diod: Updated building instructions

    blochl authored
    Updated build instructions in README.md.
    
    Signed-off-by: Leonid Bloch <leonid@daynix.com>
This page is out of date. Refresh to see the latest.
View
15 README.md
@@ -3,21 +3,24 @@
`diod` is a multi-threaded, user space file server that speaks
[9P2000.L protocol](protocol.md).
-### Building on Debian
+### Building
+#### On Debian
```
-sudo apt-get install liblua5.1-dev libmunge-dev libwrap0-dev libcap-dev
-./configure CPPFLAGS="-I/usr/include/lua5.1" --with-lua-suffix=5.1
+sudo apt-get install build-essential libpopt-dev ncurses-dev automake autoconf
+sudo apt-get install liblua5.1-dev libmunge-dev libwrap0-dev libcap-dev libattr1-dev
+./autogen.sh
+./configure
make
make check
```
-### Building on Red Hat
+#### On Red Hat
```
-sudo yum install epel-release
+sudo yum install epel-release gperftools-devel automake autoconf libattr-devel
sudo yum install lua-devel munge-devel tcp_wrappers-devel libcap-devel
-sudo yum install gperftools-devel
+./autogen.sh
./configure
make
make check
View
2  config/ax_lua.m4
@@ -164,7 +164,7 @@ AC_DEFUN([AX_LUA_LIBS],
AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
AC_CHECK_LIB([lua$with_lua_suffix],
- [lua_call],
+ [luaL_newstate],
[LIBLUA="$LUA_LIB -llua$with_lua_suffix $lua_extra_libs"],
[],
[$LIBLUA $lua_extra_libs])
View
2  libdiod/diod_conf.c
@@ -629,7 +629,7 @@ diod_conf_init_config_file (char *path) /* FIXME: ENOMEM is fatal */
path = config.configpath; /* missing default file is not fatal */
}
if (path) {
- lua_State *L = lua_open ();
+ lua_State *L = luaL_newstate ();
luaopen_base (L);
luaopen_table (L);
View
2  libdiod/diod_log.h
@@ -1,3 +1,5 @@
+#include <stdarg.h>
+
void diod_log_init (char *p);
void diod_log_fini (void);
void diod_log_set_dest (char *dest);
View
1  libnpfs/npfs.h
@@ -22,6 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include <stdarg.h>
#include <sys/types.h>
typedef struct p9_str Npstr;
View
2  tests/kern/dbench/Makefile.am
@@ -25,6 +25,6 @@ BUILT_SOURCES = proto.h
CLEANFILES = proto.h
proto.h: $(dbench_SOURCES) mkproto.pl
- ./mkproto.pl $(dbench_SOURCES) > proto.h
+ perl mkproto.pl $(dbench_SOURCES) > proto.h
EXTRA_DIST = mkproto.pl
Something went wrong with that request. Please try again.