If you have problems compiling icommands under Debian/Ubuntu like distributions following change in the respective Makefile can be helpful:

iRODS/clients/icommands/Makefile

LDFLAGS += $(LIBRARY) $(MODULE_LDFLAGS) $(CL_LDADD)