You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️Issues not using this template will be systematically closed.
Describe the bug
I'm on macOS. Xcode ships with getopt. the tools link against the getopt in third_party and (presumably) indirectly against the system provided getopt. everything builds fine, but when I run for example glslminifier it crashes with a Bus Error 10 in line 44 in getopt.c (optopt = c;). After I removed the global "optarg" and "optopt" variables from getopt.c, it still compiled and linked, but the crash was gone.
To Reproduce
Steps to reproduce the behavior:
clone and build filament.
Note: I did not have this problem on my M1 macbook, only on my Intel iMac. So there seems to be some other factor involved here.
Expected behavior
The freshly compiled tools don't crash with a Bus Error 10 when invoked by successive build steps.
Screenshots
N/A
Logs
N/A
Desktop (please complete the following information):
OS: macOS 13.2.1, Xcode 13.4.1 & Xcode 14.3.1
GPU: not Relevant
Backend: not Relevant
Additional context
Two possible solutions:
link against the system getopt when it is available. This involves changing the includes to #include <getopt.h>, searching for the library, etc.
avoid the clash by moving all the symbols of the third_party getopt implementation into a separate namespace. It's a bit extreme as it involves dropping plain c support, but it was easy to do and considering that getopt here is used as a utility library that probably won't be touched again, I'm willing to accept this. Patch attached.
Describe the bug
I'm on macOS. Xcode ships with getopt. the tools link against the getopt in third_party and (presumably) indirectly against the system provided getopt. everything builds fine, but when I run for example glslminifier it crashes with a Bus Error 10 in line 44 in getopt.c (optopt = c;). After I removed the global "optarg" and "optopt" variables from getopt.c, it still compiled and linked, but the crash was gone.
To Reproduce
Steps to reproduce the behavior:
Note: I did not have this problem on my M1 macbook, only on my Intel iMac. So there seems to be some other factor involved here.
Expected behavior
The freshly compiled tools don't crash with a Bus Error 10 when invoked by successive build steps.
Screenshots
N/A
Logs
N/A
Desktop (please complete the following information):
Additional context
Two possible solutions:
#include <getopt.h>
, searching for the library, etc.filament-50f605e-fixes Bus Error 10 caused by symbols clashing with system provided getopt..patch
The text was updated successfully, but these errors were encountered: