aix:大文件

aix:大文件
/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

这种情况发生在 perlz 的 coreutils-8.23 和 aix 上重新编译的 8.24 上。 fs 是 nfs。怎么解决?

这是 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


%description
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
limits.


%prep
%setup -q
%patch0
%patch1


%build
# required if you run 'configure' as root user
export FORCE_UNSAFE_CONFIGURE=1

export CC="gcc -pthread -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
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 \
    --enable-nls
gmake %{?_smp_mflags}
gmake


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

bzip2 -9f ChangeLog

(
  cd ${RPM_BUILD_ROOT}
  /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
  do
     rm ../linux/bin/$i
     ln -sf ../..%{_bindir}/$i .
  done
)

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/*


%pre
# 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 || :
done


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


%post
/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 || :


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


%files
%defattr(-,root,system,-)
%doc COPYING ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/*
%config(noreplace) %{_sysconfdir}/DIR_COLORS*
%{_sysconfdir}/profile.d/*
%{_bindir}/*
%{_infodir}/coreutils*
# exclude %{_libdir}/charset.alias as it conflicts with glib2
# %{_libdir}/*
%{_mandir}/man?/*
%{_datadir}/locale/*/*/*
/usr/bin/*
/usr/linux/bin/*

答案1

基本上,您需要确保定义了 _LARGE_FILES,例如,尝试

# export CFLAGS="-O3 -D_LARGE_FILES"

-OX是可选的。我建议 gcc 使用 -O3 作为默认值,xlc 使用 -O2 作为默认值

或者,你可以尝试我的包装(至少 coreutils-8.25)。

ps 我刚刚检查了 perzl 网站 - 他现在也在打包 8.25。我们的打包方法之间的主要区别是我使用 installp 作为包管理器并使用/opt/bin而不是/opt/freeware/bin(这意味着您可以并行安装并决定哪个更容易管理) - 注意:因为我不知道约定在这里,我(还)没有向我的“aixtools”添加 URL。如果您有兴趣,可以尝试通过 Twitter @rootvgnet 引起我的注意。


由于它太大,无法发表评论 - 添加 - 如果您选择使用我的包装,则安装说明

安装命令:-as root- #installp -d /some/dir -agX aixtools.gnu.coreutils;应在输出中显示一个信息块,包括:

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

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

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

这意味着除了 coreutils 之外,您还需要 gnu 依赖项“gettext”来实现文本国际化,以及 GNU iconv,因为 coreutils 不接受 AIX iconv 实现多种翻译的方式。

相应的 wiki(因为软件包可能会随着时间的推移而更新)链接是:-http://www.aixtools.net/index.php/coreutils -http://www.aixtools.net/index.php/gettext -http://www.aixtools.net/index.php/libiconv

简而言之,将三个 installp 文件下载到(例如 /tmp/aixtools)后

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

这将安装每个组件的“share”和“rte”组件,以及 coreutils 的手册页。

如果您不想要手册页,请使用:

# installp -u aixtools.gnu.aixtools.man

删除它们

相关内容