snabbco / snabb

Snabb: Simple and fast packet networking
Apache License 2.0
2.97k stars 300 forks source link

Master fails to build #125

Closed dvv closed 10 years ago

dvv commented 10 years ago
[dvv@pagocmb snabbswitch]$ make Q=
cd src && make
make[1]: Entering directory '/home/dvv/projects/SNABB/snabbswitch/src'
LUA       obj/apps/basic/basic_apps_lua.o
luajit -bg -n apps.basic.basic_apps apps/basic/basic_apps.lua obj/apps/basic/basic_apps_lua.o
luajit: error loading module 'jit.bcsave' from file './jit/bcsave.lua':
        ./jit/bcsave.lua:1: unexpected symbol near '..'
Makefile:57: recipe for target 'obj/apps/basic/basic_apps_lua.o' failed
make[1]: *** [obj/apps/basic/basic_apps_lua.o] Error 1
make[1]: Leaving directory '/home/dvv/projects/SNABB/snabbswitch/src'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

[dvv@pagocmb snabbswitch]$ which luajit
which: no luajit in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl)

[dvv@pagocmb snabbswitch]$ deps/luajit/usr/local/bin/luajit -v
LuaJIT 2.1.0-alpha -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/

[dvv@pagocmb snabbswitch]$ uname -a
Linux pagocmb 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014 x86_64 GNU/Linux

[dvv@pagocmb snabbswitch]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.8-20140206/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --disable-cloog-version-check --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.2 20140206 (prerelease) (GCC)

[dvv@pagocmb snabbswitch]$ make -v
GNU Make 4.0
Built for x86_64-unknown-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Wonder if someone could confirm/void the issue on the same or similar setup?

dvv commented 10 years ago

Today's attempt gives:

...
DIR       obj/doc/obj
mkdir -p obj/doc/obj
LUA       obj/lib/hardware/vfio_lua.o
luajit -bg -n lib.hardware.vfio lib/hardware/vfio.lua obj/lib/hardware/vfio_lua.o
luajit: error loading module 'jit.bcsave' from file './jit/bcsave.lua':
        ./jit/bcsave.lua:1: unexpected symbol near '..'
Makefile:57: recipe for target 'obj/lib/hardware/vfio_lua.o' failed
make[1]: *** [obj/lib/hardware/vfio_lua.o] Error 1
make[1]: Leaving directory '/home/dvv/projects/SNABB/snabbswitch/src'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
agladysh commented 10 years ago

Erm. Something wrong in LJ innards? Weird!

dvv commented 10 years ago

Some points: https://groups.google.com/forum/#!topic/snabb-devel/Zezo2AIo4Dk

dvv commented 10 years ago

@altexy or someone who succeeds to build: please post versions of software on your setup:

uname -a
gcc -v
make -v
luajit -v
altexy commented 10 years ago

alex@ubuntu:~$ uname -a Linux ubuntu 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux alex@ubuntu:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9) alex@ubuntu:~$ make -v GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu alex@ubuntu:~$ luajit -v LuaJIT 2.0.2 -- Copyright (C) 2005-2013 Mike Pall. http://luajit.org/

dvv commented 10 years ago

I believe make 4.0 could introduce some brainer. Also, worths to temporarily remove system luajit to be sure it does not interfere with local snabb's one. Still, digging

agladysh commented 10 years ago

@dvv, @altexy what does git --version say on these machines?

dvv commented 10 years ago

@altexy what is the type of src/jit/bcsave.lua? On my setup, after a fresh clone, it is vanilla text file containing

../../deps/luajit/src/jit/bcsave.lua

UPDATED

dvv commented 10 years ago
$ git --version
git version 1.9.2
dvv commented 10 years ago

OOPS, somehow had false core.symlinks in .gitconfig :]

So the subj transforms to

lib/hardware/vfio.c:91:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
     dma_map.vaddr = (uint64_t)buffer;
                     ^
cc1: all warnings being treated as errors

which is another story.

agladysh commented 10 years ago

@dvv So, does the master build on your system?

lukego commented 10 years ago

Are you running 32-bit (i386)? Realistically I'd say that we only support x86_64 at the moment.

agladysh commented 10 years ago

[dvv@pagocmb snabbswitch]$ uname -a Linux pagocmb 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014 x86_64 GNU/Linux

The problem was in wrong Git configuration on a local machine, it seems.

dvv commented 10 years ago

Right. Hence, issue closed. Added final note to snabbswitch google group https://groups.google.com/forum/#!topic/snabb-devel/Zezo2AIo4Dk