3

I am trying to figure out a building bug in an older python project, and I am completely stumped. The project requires a library to be linked against OpenGL, and the setup.py does so by passing -framework OpenGL flag to the linking stage of clang. My system is running 10.9.2 and XCode 5.1. The include line in the C file is:

#include <OpenGL/glu.h>

The call to clang and the resulting error is:

/usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db46 build/temp.macosx-10.9-x86_64-2.7/src/visual/_polyobject.o -o build/lib.macosx-10.9-x86_64-2.7/trep/visual/_polyobject.so -framework OpenGL

clang: error: unknown argument: '-framework OpenGL' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command '/usr/bin/clang' failed with exit status 1

Now comes the weird part. The exact same call to clang, but done from a shell script runs just fine and links the library correctly, no errors or warnings. Running clang --help is of no help, as it does not describe the -framework option as even being a valid argument. Does anyone have a clue as to what is going on here? Why would clang behave differently depending on whether it's called from a python script or a shell script?

vlsd
  • 945
  • 6
  • 18

0 Answers0