This looks like cross-compiling problem. It seems it can't compile on 64bit machine that runs ubuntu.
However, you can try to change makefile.unix file - line 99 to:
xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -fPIC -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \
And try again
That's strange, but this options didn't help. I received just the same error about -fPIC