Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble compiling coreutils-8.5 on Solaris 5.10 on the Intel platform using cc.

Firstly I had the following error during ./configure:

checking whether <wchar.h> uses 'inline' correctly... no
configure: error: <wchar.h> cannot be used with this compiler (/tool/sunstudio12.1/bin/cc -xc99=all -g  -D_REENTRANT).

This seemed similar to the problem in this question. The solution was to edit configure and replace the reference of -xc99=all to -xc99=all,no_lib.

This permitted the configure to complete.

Then I ran /usr/sfw/bin/gmake and it progressed until I received the following message:

Making all in src
gmake[2]: Entering directory `/home/peterp/src/coreutils-8.5/src'
gmake  all-am
gmake[3]: Entering directory `/home/peterp/src/coreutils-8.5/src'
  CCLD     chroot
Undefined                       first referenced
 symbol                             in file
eaccess                             ../lib/libcoreutils.a(euidaccess.o)
ld: fatal: Symbol referencing errors. No output written to chroot

What could cause this problem?

PS I was only compiling coreutils because I wanted colour ls.

share|improve this question
up vote 1 down vote accepted

I found this post which implied that there might be a missing -lgen parameter required for libcoreutils.a to link.

I edited src/Makefile and changed the line:




and running gmake again worked through successfully to completion.

share|improve this answer

You can also compile, (well, install), one individual program if you want. Here's how I just install 'ginstall' on it's own:

cd /var/tmp
rm -rf /coreutils coreutils-8.5
untgz /usr/local/src/gnu/coreutils-8.5.tar.gz
cd coreutils-8.5
setenv LDFLAGS -lgen
./configure --prefix=/usr/local \
            --with-libiconv-prefix=/usr/local \
cd /var/tmp/coreutils-8.5/src
gmake install OPTIONAL_BIN_PROGS="" bin_PROGRAMS=ginstall pkglibdir=""
cd /var/tmp/coreutils-8.5/man
gmake install MAN=install.1
mv /usr/local/bin/install /usr/local/bin/ginstall
mv /usr/local/share/man/man1/install.1 /usr/local/share/man/man1/ginstall.1
share|improve this answer
very nice answer! Thank you! – PP. Aug 9 '10 at 12:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.