I can reproduce this both with LTS Haskell (based on GHC 7.10.3) and Stackage nightly (based on GHC 8.0.1) on Ubuntu 16.04, too. This is somehow related to GHCi's dynamic linker, which has changed a few times in the past, and there are still issues with it. Alas, I don't remember the details, but perhaps you can get some answers on the
haskell-cafemailing list. All I can say is that things worked even within GHCi at some point in the past...The gory details: Given an API entry name like
"gluOrtho2D", the GLURaw package usesdlopenanddlsymto get the address of the function, see the Haskell part and the C part. For some reason,dlsymdoesn't find the GLU entries when running under GHCi, while the compiled version does.