Created attachment 207372 [details] blind fix Mk/bsd.port.mk strips -O* flags by default when building WITH_DEBUG. If user wants optimized debug build it should pass -g manually and define empty STRIP. $ make WITH_DEBUG= [...] cc -DGLEW_NO_GLU -DGLEW_BUILD -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/glew.o -c src/glew.c cc -DGLEW_NO_GLU -DGLEW_STATIC -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/static/glew.o -c src/glew.c cc -DGLEW_NO_GLU -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/glewinfo.o -c src/glewinfo.c cc -DGLEW_NO_GLU -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/visualinfo.o -c src/visualinfo.c Alternatively, a user may want to increase optimizations. To take effect CFLAGS from the ports framework have to be passed after vendor CFLAGS. $ CFLAGS=-Ofast make [...] cc -DGLEW_NO_GLU -DGLEW_BUILD -Ofast -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/glew.o -c src/glew.c cc -DGLEW_NO_GLU -DGLEW_STATIC -Ofast -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/static/glew.o -c src/glew.c cc -DGLEW_NO_GLU -Ofast -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/glewinfo.o -c src/glewinfo.c cc -DGLEW_NO_GLU -Ofast -fstack-protector-strong -fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o tmp/freebsd/default/shared/visualinfo.o -c src/visualinfo.c https://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
Comment on attachment 207372 [details] blind fix Not enough for debug build. The library must NOT be stripped. $ make install WITH_DEBUG= $ file -L /usr/local/lib/libGLEW.so /usr/local/lib/libGLEW.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, stripped https://www.freebsd.org/doc/en/books/porters-handbook/install.html#install-strip
Comment on attachment 207372 [details] blind fix Approved by: portmgr (blanket: ports/framework compliance)
Comment on attachment 207372 [details] blind fix I've filed this bug because I'm not familar nor have time to dig into this port. My fix is NOT complete.
Maintainer reset.