TinyEngine icon indicating copy to clipboard operation
TinyEngine copied to clipboard

compile error on iMac with chip M1

Open codingwatching opened this issue 4 years ago • 1 comments

I am sorry for this, but maybe because I just moving to a new iMac with chip M1, after setup all the commands, I still have this error:

apple@Apples-iMac TinyEngine % brew install glew
Warning: glew 2.2.0_1 is already installed and up-to-date.
To reinstall 2.2.0_1, run:
  brew reinstall glew
apple@Apples-iMac TinyEngine % sudo make all     
Password:
Copying Core Header Files ...
Done
Copying Helper Header Files ...
Done
Compiling TinyEngine ...
In file included from TinyEngine.cpp:3:
./TinyEngine.h:9:10: fatal error: 'GL/glew.h' file not found
#include <GL/glew.h>                                //Rendering Dependencies
         ^~~~~~~~~~~
1 error generated.
make: *** [install] Error 1

codingwatching avatar Jul 28 '21 03:07 codingwatching

Hi. Were you able to fix this dependency issue? This is a question of modifying the makefile to be able to find glew on your system.

weigert avatar Feb 03 '22 18:02 weigert

@codingwatching you'll need to modify the makefile to find the homebrew stuff, e.g.:

# TinyEngine Build Recipe
# Author: Nicholas McDonald
# Version 1.0
# Tested on GNU/Linux

# Install Location Configuration
LIBPATH = /usr/local/lib
INCLUDEPATH = /usr/local/include
BREWPATH = /opt/homebrew/include # <--- add this...

# Compilation Settings
CC = g++ -std=c++17
CF = -Wfatal-errors -O3 -I$(INCLUDEPATH) -I$(BREWPATH) # <--- ...then add to compiler

...

madasebrof avatar Sep 30 '22 13:09 madasebrof

You need to include glew on your library path. GLEWPATH= path of glew CF = -Wfatal-errors -O3 -I$(INCLUDEPATH) -I$(GLEWPATH)

Clearshine64 avatar Sep 30 '22 14:09 Clearshine64

Hi everybody and sorry for the late reply,

MacOS / M1 / macos-arm64 support has now been merged into the main branch, and the makefiles can be used as usual.

Note that there are still some compatibility issues and not all examples will run.

See this #36 more recent issue for a small discussion, and feel free to look at the latest merged pull request for concrete fixes which allowed compatibility.

I will close this issue but feel free to continue commenting if you have any more problems,

weigert avatar Oct 07 '22 14:10 weigert