Skip to content

Instantly share code, notes, and snippets.

Hiroaki Nakamura hnakamur

Block or report user

Report or block hnakamur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hnakamur
hnakamur / gist:3556557
Created Aug 31, 2012
Could NOT find HTTP_PARSER on Scientific Linux 6.3
View gist:3556557
[hnakamur@naruh lev]$ cmake -DUSE_SYSTEM_LUAJIT=0 -DUSE_SYSTEM_OPENSSL=0 -D USE_SYSTEM_UV=0 -DUSE_SYSTEM_YAJL=0 -DUSE_SYSTEM_ZLIB=0 -DUSE_YAJL=1 -DUSE_ZLIB=1 -DUSE_OPENSSL=1 -DUSE_HTTP_PARSER=1 ~/xming/lev
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
@hnakamur
hnakamur / gist:3556576
Created Aug 31, 2012
Error: pointer size mismatch in cross-build. on OSX
View gist:3556576
sunshine5:lev hnakamur$ cmake -DUSE_SYSTEM_LUAJIT=0 -DUSE_SYSTEM_OPENSSL=0 -D USE_SYSTEM_UV=0 -DUSE_SYSTEM_YAJL=0 -DUSE_SYSTEM_ZLIB=0 -DUSE_YAJL=1 -DUSE_ZLIB=1 -DUSE_OPENSSL=1 -DUSE_HTTP_PARSER=1 ~/xming/lev
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 4.0.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
@hnakamur
hnakamur / gist:3556847
Created Aug 31, 2012
two tests failed with lev with http_parser on Scientific Linux 6.3
View gist:3556847
$ cmake -DUSE_SYSTEM_LUAJIT=0 -DUSE_SYSTEM_OPENSSL=0 -D USE_SYSTEM_UV=0 -DUSE_SYSTEM_YAJL=0 -DUSE_SYSTEM_ZLIB=0 -DUSE_YAJL=1 -DUSE_ZLIB=1 -DUSE_OPENSSL=1 -DUSE_SYSTEM_HTTP_PARSER=0 -DUSE_HTTP_PARSER=1 ~/xming/lev
$ make
$ cd ~/xming/lev/tests
$ /tmp/lev/lev runner.lua
FAIL (test-dgram.lua)
WARNING: forgot to close luv_pipe lhandle=0x41801ce0 handle=0x16d8490
FAIL (test-dgram-multicast.lua)
@hnakamur
hnakamur / gist:3556974
Created Aug 31, 2012
"make -C out test" does not run tests on OSX
View gist:3556974
sunshine5:lev hnakamur$ make -C out test
CC(target) /Users/hnakamur/mysrc/lev/out/Debug/obj.target/http_parser/deps/http-parser/http_parser.o
LIBTOOL-STATIC /Users/hnakamur/mysrc/lev/out/Debug/libhttp_parser.a
CC(target) /Users/hnakamur/mysrc/lev/out/Debug/obj.target/test/deps/http-parser/test.o
LINK(target) /Users/hnakamur/mysrc/lev/out/Debug/test
LINK(target) /Users/hnakamur/mysrc/lev/out/Debug/test: Finished
@hnakamur
hnakamur / gist:3559695
Created Aug 31, 2012
test-dgram failed to find module 'dgram' on Scientific Linux 6.3
View gist:3559695
[hnakamur@naruh lev]$ /tmp/lev/lev tests/test-dgram.lua
/home/hnakamur/xming/lev/src/core/lib/lev.lua:221: /home/hnakamur/xming/lev/src/core/lib/module.lua:190: Failed to find module 'dgram'
no field package.preload['dgram']
Cannot find module /tmp/lib/lev/dgram
Cannot find module /home/hnakamur/xming/lev/tests//modules/dgram
Cannot find module /home/hnakamur/xming/lev/modules/dgram
Cannot find module /home/hnakamur/xming/modules/dgram
Cannot find module /home/hnakamur/modules/dgram
Cannot find module /home/modules/dgram
Cannot find module //modules/dgram
@hnakamur
hnakamur / gist:3560299
Created Aug 31, 2012
failed with CC='gcc -m32' on osx
View gist:3560299
sunshine5:lev hnakamur$ rm -rf *
sunshine5:lev hnakamur$ CC='gcc -m32' cmake -DUSE_SYSTEM_LUAJIT=0 -DUSE_SYSTEM_OPENSSL=0 -D USE_SYSTEM_UV=0 -DUSE_SYSTEM_YAJL=0 -DUSE_SYSTEM_ZLIB=0 -DUSE_YAJL=1 -DUSE_ZLIB=1 -DUSE_OPENSSL=1 -DUSE_SYSTEM_HTTP_PARSER=0 -DUSE_HTTP_PARSER=1 ~/xming/lev
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 4.0.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
@hnakamur
hnakamur / gist:3560381
Created Aug 31, 2012
make failed with CMAKE_HOST_SYSTEM_PROCESSOR hack on osx
View gist:3560381
sunshine5:lev hnakamur$ git diff
diff --git a/src/external/luajit/CMakeLists-LUAJIT.txt b/src/external/luajit/CMa
index 9b0ffb0..84f446c 100644
--- a/src/external/luajit/CMakeLists-LUAJIT.txt
+++ b/src/external/luajit/CMakeLists-LUAJIT.txt
@@ -22,6 +22,9 @@ endif()
# CPU detection
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL x86_64)
add_definitions(-DLUAJIT_TARGET=LUAJIT_ARCH_X64)
+# hack because on OSX CMAKE_HOST_SYSTEM_PROCESSOR is always i386
@hnakamur
hnakamur / gist:3562009
Created Sep 1, 2012
unrecognized option `-malign-double' on MinGW
View gist:3562009
$ make
[ 1%] Performing download step (verify and extract) for 'LUAJIT'
-- verifying file...
file='C:/MinGW/msys/1.0/home/hnakamur/xming/lev/tarballs/LuaJIT-2.0.0-beta10.tar.gz'
-- verifying file... done
-- extracting...
src='C:/MinGW/msys/1.0/home/hnakamur/xming/lev/tarballs/LuaJIT-2.0.0-beta10.tar.gz'
dst='C:/Users/hnakamur/AppData/Local/Temp/lev/LUAJIT-prefix/src/LUAJIT'
-- extracting... [tar xfz]
-- extracting... [analysis]
@hnakamur
hnakamur / gist:3566616
Created Sep 1, 2012
lev build failed with Visual Studio C++ 2010 Express and cmake
View gist:3566616
------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
Checking Build System
CMake does not need to re-run because C:/tmp/lev/CMakeFiles/generate.stamp is up-to-date.
------ Build started: Project: LUAJIT, Configuration: Debug Win32 ------
Building Custom Rule C:/MinGW/msys/1.0/home/hnakamur/xming/lev/CMakeLists.txt
CMake does not need to re-run because C:\tmp\lev\CMakeFiles\generate.stamp is up-to-date.
Creating directories for 'LUAJIT'
Performing download step (verify and extract) for 'LUAJIT'
-- verifying file...
file='C:/MinGW/msys/1.0/home/hnakamur/xming/lev/tarballs/LuaJIT-2.0.0-beta10.tar.gz'
@hnakamur
hnakamur / gist:3567008
Created Sep 1, 2012
luvit build failed with Makefile on MinGW Windows 7 Home 32bit
View gist:3567008
hnakamur@sunshine4pc /c/src/luvit
$ make
touch -c deps/luajit/src/*.h
make -C deps/luajit
make[1]: Entering directory `/c/src/luvit/deps/luajit'
==== Building LuaJIT 2.0.0-beta10 ====
make -C src
make[2]: Entering directory `/c/src/luvit/deps/luajit/src'
HOSTCC host/minilua.o
gcc -O2 -fomit-frame-pointer -Wall -DLUAJIT_ENABLE_LUA52COMPAT -I. -DLUAJIT_TARGET=LUAJIT_ARCH_x86 -c -o host/minilua.o host/minilua.c
You can’t perform that action at this time.