New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Ubuntu 14 VM #191

Closed
T-zex opened this Issue Apr 2, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@T-zex

T-zex commented Apr 2, 2015

Hi,

I'm having the below issue when running the torch ./install.sh on Ubuntu 14 VM (Virtual Box Win 7 host)

-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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
-- Detecting CXX compiler ABI info - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Found readline library
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for sin in m
-- Looking for sin in m - found
-- Performing Test LJ_TARGET_X64
-- Performing Test LJ_TARGET_X64 - Failed
-- Performing Test LJ_TARGET_X86
-- Performing Test LJ_TARGET_X86 - Success
-- LuaJIT Target: x86
-- LuaJIT target x86
-- Performing Test LJ_ARCH_BITS_64
-- Performing Test LJ_ARCH_BITS_64 - Failed
-- Performing Test LJ_HASJIT_1
-- Performing Test LJ_HASJIT_1 - Success
-- Performing Test LJ_HASFFI_1
-- Performing Test LJ_HASFFI_1 - Success
-- Performing Test LJ_DUALNUM_1
-- Performing Test LJ_DUALNUM_1 - Failed
-- Performing Test LJ_ARCH_HASFPU_1
-- Performing Test LJ_ARCH_HASFPU_1 - Success
-- Performing Test LJ_ABI_SOFTFP_1
-- Performing Test LJ_ABI_SOFTFP_1 - Failed
-- Performing Test __SSE2___1
-- Performing Test __SSE2___1 - Failed
-- Looking for sin in m
-- Looking for sin in m - found
-- Found Wget: /usr/bin/wget
-- Found MD5: /usr/bin/md5sum
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/torch/build
Scanning dependencies of target minilua
[  3%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/minilua.dir/src/host/minilua.c.o
Linking C executable minilua
[  3%] Built target minilua
[  7%] Generating buildvm_arch.h
Scanning dependencies of target buildvm
[ 11%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/buildvm.dir/src/host/buildvm.c.o
[ 15%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/buildvm.dir/src/host/buildvm_asm.c.o
[ 19%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/buildvm.dir/src/host/buildvm_peobj.c.o
[ 23%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/buildvm.dir/src/host/buildvm_lib.c.o
[ 26%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/buildvm.dir/src/host/buildvm_fold.c.o
Linking C executable buildvm
[ 26%] Built target buildvm
[ 30%] Generating vmdef.lua
[ 34%] Generating lj_vm.s
[ 38%] Generating lj_ffdef.h
[ 42%] Generating lj_bcdef.h
[ 46%] Generating lj_libdef.h
[ 50%] Generating lj_recdef.h
[ 53%] Generating lj_folddef.h
Scanning dependencies of target libluajit
[ 57%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/libluajit.dir/src/ljamalg.c.o
[ 61%] Building ASM object exe/luajit-rocks/luajit-2.1/CMakeFiles/libluajit.dir/lj_vm.s.o
Linking C shared library libluajit.so
[ 61%] Built target libluajit
Scanning dependencies of target luajit
[ 65%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/luajit.dir/src/luajit.c.o
[ 69%] Building C object exe/luajit-rocks/luajit-2.1/CMakeFiles/luajit.dir/src/ljamalg.c.o
[ 73%] Building ASM object exe/luajit-rocks/luajit-2.1/CMakeFiles/luajit.dir/lj_vm.s.o
Linking C executable luajit
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_BC_POW':
buildvm_x86.dasc:(.text+0x84b): undefined reference to `lj_wrap_pow'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_log':
buildvm_x86.dasc:(.text+0x269c): undefined reference to `lj_wrap_log'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_log10':
buildvm_x86.dasc:(.text+0x26cb): undefined reference to `lj_wrap_log10'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_exp':
buildvm_x86.dasc:(.text+0x26fa): undefined reference to `lj_wrap_exp'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_sin':
buildvm_x86.dasc:(.text+0x2729): undefined reference to `lj_wrap_sin'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_cos':
buildvm_x86.dasc:(.text+0x2758): undefined reference to `lj_wrap_cos'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_tan':
buildvm_x86.dasc:(.text+0x2787): undefined reference to `lj_wrap_tan'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_asin':
buildvm_x86.dasc:(.text+0x27b6): undefined reference to `lj_wrap_asin'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_acos':
buildvm_x86.dasc:(.text+0x27e5): undefined reference to `lj_wrap_acos'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_atan':
buildvm_x86.dasc:(.text+0x2814): undefined reference to `lj_wrap_atan'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_sinh':
buildvm_x86.dasc:(.text+0x2843): undefined reference to `lj_wrap_sinh'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_cosh':
buildvm_x86.dasc:(.text+0x2872): undefined reference to `lj_wrap_cosh'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_tanh':
buildvm_x86.dasc:(.text+0x28a1): undefined reference to `lj_wrap_tanh'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_pow':
buildvm_x86.dasc:(.text+0x28e5): undefined reference to `lj_wrap_pow'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_atan2':
buildvm_x86.dasc:(.text+0x2929): undefined reference to `lj_wrap_atan2'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_fmod':
buildvm_x86.dasc:(.text+0x296d): undefined reference to `lj_wrap_fmod'
collect2: error: ld returned 1 exit status
make[2]: *** [exe/luajit-rocks/luajit-2.1/luajit] Error 1
make[1]: *** [exe/luajit-rocks/luajit-2.1/CMakeFiles/luajit.dir/all] Error 2
make: *** [all] Error 2
@melvincabatuan

This comment has been minimized.

Show comment
Hide comment
@melvincabatuan

melvincabatuan Apr 9, 2015

I had the same issue earlier:

Linking C executable luajit
CMakeFiles/luajit.dir/lj_vm.s.o: In function lj_BC_POW': buildvm_x86.dasc:(.text+0x84b): undefined reference tolj_wrap_pow'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_log':
...
https://gist.github.com/melvincabatuan/c1bc28698e529657577e

It might be that luajit-2.1 support is broken in my system (Ubuntu 12.04).
Thus, if we are using the same system, you can remove -DWITH_LUAJIT21=ON
in install.h (approx. line 41) leaving
Ex.
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE=Release

It will continue the installation with luajit-2.0:

Ex.
[ 61%] Built target libluajit
Scanning dependencies of target luajit
[ 65%] Building C object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/src/luajit.c.o
[ 69%] Building C object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/src/ljamalg.c.o
[ 73%] Building ASM object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/lj_vm.s.o
Linking C executable luajit
[100%] Built target luajit
[ 3%] Built target minilua
[ 26%] Built target buildvm
[ 61%] Built target libluajit
[100%] Built target luajit
Install the project...
-- Install configuration: "Release"
...
https://gist.github.com/melvincabatuan/ba70ef41fe255878e607

2nd issue: I had to download the luarocks directory into torch/exe/luajit-rocks

After that, installation went smoothly, but I have to check it later for other issues...

~/torch$ th

______ __ | Torch7
/_ / ________/ / | Scientific computing for Lua.
/ / / _ / / __/ _ \ | Type ? for help
/_/ _
// __///_/ | https://github.com/torch
| http://torch.ch

th>

  • mkc

melvincabatuan commented Apr 9, 2015

I had the same issue earlier:

Linking C executable luajit
CMakeFiles/luajit.dir/lj_vm.s.o: In function lj_BC_POW': buildvm_x86.dasc:(.text+0x84b): undefined reference tolj_wrap_pow'
CMakeFiles/luajit.dir/lj_vm.s.o: In function `lj_ff_math_log':
...
https://gist.github.com/melvincabatuan/c1bc28698e529657577e

It might be that luajit-2.1 support is broken in my system (Ubuntu 12.04).
Thus, if we are using the same system, you can remove -DWITH_LUAJIT21=ON
in install.h (approx. line 41) leaving
Ex.
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE=Release

It will continue the installation with luajit-2.0:

Ex.
[ 61%] Built target libluajit
Scanning dependencies of target luajit
[ 65%] Building C object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/src/luajit.c.o
[ 69%] Building C object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/src/ljamalg.c.o
[ 73%] Building ASM object exe/luajit-rocks/luajit-2.0/CMakeFiles/luajit.dir/lj_vm.s.o
Linking C executable luajit
[100%] Built target luajit
[ 3%] Built target minilua
[ 26%] Built target buildvm
[ 61%] Built target libluajit
[100%] Built target luajit
Install the project...
-- Install configuration: "Release"
...
https://gist.github.com/melvincabatuan/ba70ef41fe255878e607

2nd issue: I had to download the luarocks directory into torch/exe/luajit-rocks

After that, installation went smoothly, but I have to check it later for other issues...

~/torch$ th

______ __ | Torch7
/_ / ________/ / | Scientific computing for Lua.
/ / / _ / / __/ _ \ | Type ? for help
/_/ _
// __///_/ | https://github.com/torch
| http://torch.ch

th>

  • mkc
@T-zex

This comment has been minimized.

Show comment
Hide comment
@T-zex

T-zex Apr 13, 2015

Commenting out -DWITH_LUAJIT21=ON helped to compile. I had to remove the torch folder and get a fresh copy to succeed though. Thank you, melvincabatuan!

T-zex commented Apr 13, 2015

Commenting out -DWITH_LUAJIT21=ON helped to compile. I had to remove the torch folder and get a fresh copy to succeed though. Thank you, melvincabatuan!

@aspratyush

This comment has been minimized.

Show comment
Hide comment
@aspratyush

aspratyush Jun 20, 2015

Need not remove the complete torch folder.. just delete the build/ folder in the torch source root directory, and re-run the install script.

aspratyush commented Jun 20, 2015

Need not remove the complete torch folder.. just delete the build/ folder in the torch source root directory, and re-run the install script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment