Code Monkey home page Code Monkey logo

Comments (18)

CyberMike44 avatar CyberMike44 commented on August 18, 2024 1

Many thanks it compiled.

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

glew-cmake is worth a try.

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

also broken...
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [tmp/darwin-universal/default/shared/glew.o] Error 1

am I doing something wrong?

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

I've been angling at work for a shiny new MacBook Pro. But no joy yet.

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

I need to compile for arm64 on an old intel Mac. I've seen some changes for removing i386 but never used git. Could you give me some command lines for fetching a working 2.3? and how to compile. many thanks

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

I'll give it a try on my Intel Mac. I'm not sure if my OS version and/or XCode is sufficient, but I'll give it a try.

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

This worked for me on Intel macOS 12.7
I did need to update both XCode and the Command Line Compiler Tools v14.2.

$ make clean all SYSTEM=darwin-arm64

See also: PR #398

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

Michaels-MacBook-Pro:Downloads michael$ cd glew
Michaels-MacBook-Pro:glew michael$ ls
LICENSE.txt build glew.pc.in
Makefile cmake-testbuild.sh src
README.md config
auto doc
Michaels-MacBook-Pro:glew michael$ make clean all SYSTEM=darwin-arm64
Makefile:40: *** "Platform 'darwin-arm64' not supported". Stop.
Michaels-MacBook-Pro:glew michael$ pwd
/Users/michael/Downloads/glew
Michaels-MacBook-Pro:glew michael$ git pull
Already up to date.
Michaels-MacBook-Pro:glew michael$

I've never used git. How to get this? Many thanks

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

An alternative:

$ make clean all SYSTEM=darwin-universal

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

Alternative:
glew-2.2.0-macos-arm.tar.gz

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

Michaels-MacBook-Pro:Downloads michael$ cd gl2
Michaels-MacBook-Pro:glew-2.2.0 michael$ make clean all SYSTEM=darwin-universal
rm -f -r tmp/
rm -f -r lib/
rm -f -r bin/
rm -f glew.pc
mkdir lib
cc -DGLEW_NO_GLU -DGLEW_BUILD -Os -Wall -W -Iinclude -dynamic -fno-common -pedantic -fPIC -arch x86_64 -arch arm64 -std=c89 -o tmp/darwin-universal/default/shared/glew.o -c src/glew.c
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /
preferred block size /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /
dev_t /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /
[???] process and gro...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, o...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error:
unknown type name '__uint64_t'; did you mean 'uint64_t'?
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bi...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note:
'uint64_t' declared here
typedef unsigned long long uint64_t;
^
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error:
unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error:
unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /
[???] process and gro...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /
[???] microseconds /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /
[???] user IDs /
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /
[???] microseconds */
^
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from src/glew.c:34:
In file included from include/GL/glew.h:224:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdint.h:52:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error:
unknown type name '__darwin_intptr_t'
typedef __darwin_intptr_t intptr_t;
^
In file included from src/glew.c:101:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdlib.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_wctype_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [tmp/darwin-universal/default/shared/glew.o] Error 1
Michaels-MacBook-Pro:glew-2.2.0 michael$

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

Michaels-MacBook-Pro:glew-2.2.0 michael$ softwareupdate --list
Software Update Tool

Finding available software
No new software available.
Michaels-MacBook-Pro:glew-2.2.0 michael$

I have 10.15.7

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

You're probably not going to be able to target arm64 without newer Command Line Compiler Tools.
You might have trouble upgrading those without upgrading MacOS.
Your machine sounds too old to be supported for that.
So it looks like you're out of luck.

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

Could you try with 12.2 as I can compile for arm64. Rename the devTools to for ex. devtoolOLD so you could easily switch back.
Many thanks

from glew.

nigels-com avatar nigels-com commented on August 18, 2024

In the file config/Makefile.darwin-arm64 could you try changing (both of) -arch arm64 to -target arm64-apple-macos11?
That's mentioned here, I don't remember the merits of -arch vs -target.
https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary

Could be that your toolchain needs a newer SDK than the default there for Intel.

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

But still:
ld: warning: ignoring file /Users/michael/Downloads/glew-2.2.0/lib/libGLEW.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

from glew.

CyberMike44 avatar CyberMike44 commented on August 18, 2024

Michaels-MacBook-Pro:SDKs michael$ sudo mv MacOSX10.15.sdk MacOSX10.15.sdkold
Password:
Michaels-MacBook-Pro:SDKs michael$ ls -la
total 0
drwxr-xr-x 5 root wheel 160 23 Okt 11:32 .
drwxr-xr-x 5 root wheel 160 22 Okt 08:54 ..
lrwxr-xr-x 1 root wheel 14 22 Okt 08:55 MacOSX.sdk -> MacOSX11.1.sdk
drwxr-xr-x 8 root wheel 256 9 Jul 2020 MacOSX10.15.sdkold
drwxr-xr-x 7 root wheel 224 30 Nov 2020 MacOSX11.1.sdk
Michaels-MacBook-Pro:SDKs michael$

Michaels-MacBook-Pro:lib michael$ lipo -archs libGLEW.a
x86_64 arm64

for some reasons I still had 10.15...
MANY THANKS I'll close it now.

from glew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.