/opt/freeware/bin/ls //media/nfs/slack64/pubblica
/opt/freeware/bin/ls: cannot open directory //media/nfs/slack64/pubblica: Value too large to be stored in data type

This happen with coreutils-8.23 from perlz and with 8.24 recompiled on aix The fs is nfs. How to solve?

This is the spec of coreutils

Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Name:    coreutils
Version: 8.24
Release: 1
License: GPL
Group:   System Environment/Base
URL:     http://www.gnu.org/software/coreutils/
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
Source2: %{name}-DIR_COLORS
Source3: %{name}-DIR_COLORS.xterm
Source4: %{name}-colorls.sh
Source5: %{name}-colorls.csh
Patch0:  %{name}-%{version}-aix-uname.patch
Patch1:  %{name}-%{version}-aix-configure.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: gettext, gmp-devel >= 4.3.2
BuildRequires: gcc >= 4.2.3-2
BuildRequires: make

Requires: /sbin/install-info
Requires: info, gettext, gmp >= 4.3.2

Conflicts: mktemp, coreutils-64bit

Provides: fileutils = %{version}-%{release}
Provides: sh-utils = %{version}-%{release}
Provides: stat = %{version}-%{release}
Provides: textutils = %{version}-%{release}
Obsoletes: fileutils <= 4.1.9
Obsoletes: sh-utils <= 2.0.12
Obsoletes: stat <= 3.3
Obsoletes: textutils <= 2.0.21

These are the GNU core utilities.  This package is the combination of
the old GNU fileutils, sh-utils, and textutils packages.

These tools are the GNU versions of common useful and popular file and text
utilities which are used for:
- file management
- shell scripts
- modifying text file (spliting, joining, comparing, modifying, ...)

Most of these programs have significant advantages over their Unix
counterparts, such as greater speed, additional options, and fewer arbitrary

%setup -q

# required if you run 'configure' as root user

export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
./configure \
    --prefix=%{_prefix} \
    --mandir=%{_mandir} \
    --infodir=%{_infodir} \
    --enable-largefile \
gmake %{?_smp_mflags}

[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
gmake DESTDIR=${RPM_BUILD_ROOT} install

bzip2 -9f ChangeLog

  /usr/bin/strip .%{_bindir}/* || :
  gzip --best .%{_infodir}/*info*

  mkdir -p usr/linux/bin
  mkdir -p usr/bin
  cd usr/linux/bin
  ln -sf ../../..%{_bindir}/* .
  cd ../../bin
  for i in dir dircolors vdir tac md5sum pinky seq
     rm ../linux/bin/$i
     ln -sf ../..%{_bindir}/$i .

mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d
cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR_COLORS
cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR_COLORS.xterm
cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/colorls.sh
cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/colorls.csh
chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/DIR*
chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/*

# We must deinstall these info files since they're merged in
# coreutils.info. else their postun'll be run too late
# and install-info will fail badly because of duplicates
for file in sh-utils textutils fileutils; do
    /sbin/install-info --delete %{_infodir}/$file.info.gz --dir=%{_infodir}/dir &> /dev/null || :

if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :

/usr/bin/grep -v '(sh-utils)\|(fileutils)\|(textutils)' %{_infodir}/dir > \
  %{_infodir}/dir.rpmmodify || exit 0
    /bin/mv -f %{_infodir}/dir.rpmmodify %{_infodir}/dir
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :

[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

%config(noreplace) %{_sysconfdir}/DIR_COLORS*
# exclude %{_libdir}/charset.alias as it conflicts with glib2
# %{_libdir}/*

Basically, you need to ensure that _LARGE_FILES is defined, e.g., try

# export CFLAGS="-O3 -D_LARGE_FILES"

the -OX is optional. I recommend -O3 as a default with gcc and -O2 with xlc

Or, you could try my packaging (coreutils-8.25 at least).

p.s. I just checked perzl site - he is also packaging 8.25 now. The key difference between our packaging methods is that I use installp as package manager and use /opt/bin rather than /opt/freeware/bin (which means you can have both installed side-by-side and decide which is easier to manage) - Note: as I do not know the convention here I am not (yet) adding an URL to my 'aixtools'. You can try and catch my attention via twitter @rootvgnet if you are interested.

As it is too large for a comment - adding - the install instructions should you choose to use my packaging

the install command: -as root- #installp -d /some/dir -agX aixtools.gnu.coreutils; should show in the output a block of info including:

  Filesets listed in this section passed pre-installation verification
  and will be installed.

  Selected Filesets
  aixtools.gnu.coreutils.rte         # built 22-Aug-2016 1702 UTC

  (being installed automatically;  required by filesets listed above)
  aixtools.gnu.gettext.rte           # built 21-Aug-2016 1821 UTC
  aixtools.gnu.gettext.share         # universal files
  aixtools.gnu.libiconv.rte          # built 21-Aug-2016 1623 UTC
  aixtools.gnu.libiconv.share        # universal files

This means than besides coreutils you also need the gnu dependencies 'gettext' for text internationalization, and GNU iconv because coreutils does not accept the way AIX iconv implemented a number of translations.

The respective wiki (because the packages may be updated over time) links are: - http://www.aixtools.net/index.php/coreutils - http://www.aixtools.net/index.php/gettext - http://www.aixtools.net/index.php/libiconv

In short, after downloading the three installp files to (e.g., /tmp/aixtools)

# installp -d /tmp/aixtools -agX aixtools.gnu.coreutils

This will install the "share" and "rte" components of each, as well as the man pages of coreutils.

If you do not want the man pages use:

# installp -u aixtools.gnu.aixtools.man

to remove them

  • I can try your packagin,where to download,please? – elbarna Nov 19 '16 at 12:10
  • Thanks for aixtools link,i found on your profile.But is another format or use the standard aix format which I install using installp? – elbarna Nov 19 '16 at 16:59
  • I have configured with export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include -D_LARGE_FILE But is the same,with large files give error – elbarna Nov 19 '16 at 19:52
  • The link to the coreutils page is:aixtools.net/index.php/coreutils. The download is an installp format, so you can use smitty install_latest to install it. If you add a .I (installp/bff) file to a directory remember to remove .toc (table of contents) so that installp will remake that file (or run inutoc DirName - e.g. inutoc .) I shall try asking and answering a question on HOWTO package OSS for AIX, just not today. p.s. be sure to add /opt/bin to your PATH if you use my packaging. I try very hard to not overwrite existing packaging. – Michael Felt Nov 22 '16 at 12:56
  • moderators: I added to the answer - install instructions. This is not directly related to the question - remove if it violates a stackexchange principle. @elbarna - which compiler are you using? FYI: I normally package using xlc. – Michael Felt Nov 22 '16 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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