The error message says to add libGL to the linker line. Did you do that?
How about this:https://wiki.archlinux.org/index.php/Fan_Speed_Control
https://wiki.archlinux.org/index.php/Mi … installinghttps://bbs.archlinux.org/viewtopic.php?id=64485
It builds fine here. Look at that line in configure, what is there? Mine has the first half of what is in your error message, but not the second half - it looks like something got tacked on to the end of some lines in your configure script.
You don't want to merge them, you just want to replace one with a link to the other. `man ln`
Also check /etc/profile and /etc/rc.local
Have you configured (and tested) php: https://wiki.archlinux.org/index.php/Apache#PHP
The actual errors would help - and the compile command you are using.That code compiles and runs fine here.