"/usr/ccs/bin/ld: illegal option -- E"

If you receive this error when compiling software on a Solaris system, use the GNU version of ld provided by the Sunfreeware binutils package instead of /usr/ccs/bin/ld.

If you cannot specify the path to GNU ld (typically /usr/local/bin/ld) instead of /usr/ccs/bin/ld by means of an environment variable or configuration setting when compiling software, you may rename /usr/ccs/bin/ld as /usr/ccs/bin/ld.sun to ensure that GNU ld is used.

# mv /usr/ccs/bin/ld /usr/ccs/bin/ld.sun
Build and install the software.
# mv /usr/ccs/bin/ld.sun /usr/ccs/bin/ld

Back to brandonhutchinson.com.
Last modified: 08/05/2005