So as it turns out, this was actually not an architecture error whatsoever. Nor was it even a config error for that matter. The problem was in the Makefile which was doing a dynamic link against statically defined archives(case 4).
So the way I solved it was to add the "-static" flags to the LDFLAGS in the makefile and FINALLY IT WORKED. w00t!w00t!
=))
I struggled with this for almost 2 weeks. Finally I can get some rest.