Skip to content
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

Trying to install Torch on MacbookPro with Apple M1 #1240

Open
LAEH opened this issue Jun 20, 2022 · 1 comment
Open

Trying to install Torch on MacbookPro with Apple M1 #1240

LAEH opened this issue Jun 20, 2022 · 1 comment

Comments

@LAEH
Copy link

LAEH commented Jun 20, 2022

Bellow is my computer specs as well as the log upon trying to install.
Could someone help ?

image

`
torch git:(master) ✗ ./install.sh
Prefix set to /Users/laeh/torch/install
Installing Lua version: LUAJIT21
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/CMakeLists.txt:9 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/CMakeLists.txt:10 (CMAKE_POLICY):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/lua-5.2/CMakeLists.txt:5 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/lua-5.2/CMakeLists.txt:6 (CMAKE_POLICY):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/luarocks/CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at exe/luajit-rocks/luarocks/CMakeLists.txt:4 (CMAKE_POLICY):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

liblua

This warning is for project developers. Use -Wno-dev to suppress it.

error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: /Users/laeh/torch/install/lib/libluajit.dylib (No such file or directory)
Installing common Lua packages
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c src/lfs.c -o src/lfs.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -bundle -undefined dynamic_lookup -all_load -o lfs.so -L/Users/laeh/torch/install/lib src/lfs.o
Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
luafilesystem 1.6.3-1 is now built and installed in /Users/laeh/torch/install/ (license: MIT/X11)

Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
penlight scm-1 is now built and installed in /Users/laeh/torch/install/ (license: MIT/X11)

env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c lua_cjson.c -o lua_cjson.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c strbuf.c -o strbuf.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c fpconv.c -o fpconv.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -bundle -undefined dynamic_lookup -all_load -o cjson.so -L/Users/laeh/torch/install/lib lua_cjson.o strbuf.o fpconv.o
Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
lua-cjson 2.1devel-1 is now built and installed in /Users/laeh/torch/install/ (license: MIT)

Installing core Torch packages
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c test.c -o test.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -bundle -undefined dynamic_lookup -all_load -o ffi/libtest.so -L/Users/laeh/torch/install/lib test.o
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c call.c -o call.o -Idynasm
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c ctype.c -o ctype.o -Idynasm
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c ffi.c -o ffi.o -Idynasm
ffi.c:1826:18: warning: assigning to 'char *' from 'uint8_t [8]' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
data = misalignbuf.c;
^ ~~~~~~~~~~~~~
ffi.c:1858:18: warning: assigning to 'char *' from 'uint8_t [8]' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
data = misalignbuf.c;
^ ~~~~~~~~~~~~~
2 warnings generated.
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c parser.c -o parser.o -Idynasm
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -bundle -undefined dynamic_lookup -all_load -o ffi.so -L/Users/laeh/torch/install/lib call.o ctype.o ffi.o parser.o
Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
luaffi scm-1 is now built and installed in /Users/laeh/torch/install/ (license: BSD)

env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c src/autolink.c -o src/autolink.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c src/buffer.c -o src/buffer.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c src/markdown.c -o src/markdown.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c src/stack.c -o src/stack.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c html/houdini_href_e.c -o html/houdini_href_e.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c html/houdini_html_e.c -o html/houdini_html_e.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c html/html.c -o html/html.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -O2 -fPIC -I/Users/laeh/torch/install/include -c html/html_smartypants.c -o html/html_smartypants.o -Isrc/ -Ihtml/
env MACOSX_DEPLOYMENT_TARGET=10.4 gcc -bundle -undefined dynamic_lookup -all_load -o libsundown.so -L/Users/laeh/torch/install/lib src/autolink.o src/buffer.o src/markdown.o src/stack.o html/houdini_href_e.o html/houdini_html_e.o html/html.o html/html_smartypants.o
Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
sundown scm-1 is now built and installed in /Users/laeh/torch/install/ (license: BSD)

Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
cwrap scm-1 is now built and installed in /Users/laeh/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB= -DLUA_INCDIR="/Users/laeh/torch/install/include" -DLUA_LIBDIR="/Users/laeh/torch/install/lib" -DLUADIR="/Users/laeh/torch/install/lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="/Users/laeh/torch/install/lib/luarocks/rocks/paths/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/Users/laeh/torch/install/lib/luarocks/rocks/paths/scm-1" && make

CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/laeh/torch/pkg/paths/build
Consolidate compiler generated dependencies of target paths
[100%] Built target paths
cd build && make install
[100%] Built target paths
Install the project...
-- Install configuration: "Release"
-- Installing: /Users/laeh/torch/install/lib/luarocks/rocks/paths/scm-1/lua/paths/init.lua
-- Installing: /Users/laeh/torch/install/lib/luarocks/rocks/paths/scm-1/lib/libpaths.so
Updating manifest for /Users/laeh/torch/install/lib/luarocks/rocks
paths scm-1 is now built and installed in /Users/laeh/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUA=/Users/laeh/torch/install/bin/lua -DLUALIB= -DLUA_BINDIR="/Users/laeh/torch/install/bin" -DLUA_INCDIR="/Users/laeh/torch/install/include" -DLUA_LIBDIR="/Users/laeh/torch/install/lib" -DLUADIR="/Users/laeh/torch/install/lib/luarocks/rocks/torch/scm-1/lua" -DLIBDIR="/Users/laeh/torch/install/lib/luarocks/rocks/torch/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/Users/laeh/torch/install/lib/luarocks/rocks/torch/scm-1" && make -j$(getconf _NPROCESSORS_ONLN)

CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
CMake Deprecation Warning at lib/TH/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at lib/TH/CMakeLists.txt:5 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
CMake Error at lib/TH/cmake/FindARM.cmake:48 (STRING):
STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
lib/TH/CMakeLists.txt:96 (FIND_PACKAGE)

-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- TH_SO_VERSION: 0
-- Atomics: using GCC intrinsics
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - guide - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - guide - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - guide - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - guide - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
-- Library mkl_intel: not found
-- Checking for [mkl - guide - pthread - m]
-- Library mkl: not found
-- MKL library not found
-- Checking for [openblas]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [openblas - pthread]
-- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [goto2 - gfortran - pthread]
-- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND
-- Checking for [acml - gfortran]
-- Library acml: BLAS_acml_LIBRARY-NOTFOUND
-- Checking for [Accelerate]
-- Library Accelerate: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework
-- This BLAS uses the F2C return conventions
-- Found a library with BLAS API (accelerate).
-- Found a library with LAPACK API. (accelerate)
CMake Deprecation Warning at lib/luaT/CMakeLists.txt:3 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- Configuring incomplete, errors occurred!
See also "/Users/laeh/torch/pkg/torch/build/CMakeFiles/CMakeOutput.log".
See also "/Users/laeh/torch/pkg/torch/build/CMakeFiles/CMakeError.log".

Error: Build error: Failed building.
`

@BaseInfinity
Copy link

I was unable to build this for m1 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants