RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.eq1q5s (%build)
(最後にエラー全文)
こんなメッセージが出ちゃうんですね・・・
メッセージを頼りにいろいろ・・・
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
う~ん。(´・ω・`)
config.log 探す
cd ~/rpmbuild/ find . -name "config.log" ./BUILD/nagios/config.log
- config.log中身
configure:1843: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:1882: error: C compiler cannot create executables See `config.log' for more details.
やっぱり、よくわからない・・・
お!
Webで検索したり、試行錯誤しながら、rpmコマンド叩いてみたら・・・
$ rpm -q glibc-devel
glibc-devel-2.12-1.107.el6_4.2.i686
何か、glibcが32bit しか、入ってないや!
このOS 64bitなんですけど~
て、ことで試しに glibc-devel64bit を入れてみる
yum install glibc-devel ================================================================================================ Package Arch Version Repository Size ================================================================================================ Installing: glibc-devel x86_64 2.12-1.107.el6_4.2 updates 974 k
で、入った。
ビルドした!出来た~
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/snicker_jp/rpmbuild/BUILDROOT/nagios-3.5.0-1.el6.ja.x86_64 warning: Could not canonicalize hostname: monitor8 Wrote: /home/snicker_jp/rpmbuild/RPMS/x86_64/nagios-3.5.0-1.el6.ja.x86_64.rpm Wrote: /home/snicker_jp/rpmbuild/RPMS/x86_64/nagios-common-3.5.0-1.el6.ja.x86_64.rpm Wrote: /home/snicker_jp/rpmbuild/RPMS/x86_64/nagios-devel-3.5.0-1.el6.ja.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.LSaku2 + umask 022 + cd /home/snicker_jp/rpmbuild/BUILD + cd nagios + rm -rf /home/snicker_jp/rpmbuild/BUILDROOT/nagios-3.5.0-1.el6.ja.x86_64 + exit 0
まとめ
- glibc 関連 エラーがちょっとわかりづらかったです!
- glibc-devel がまさかの 32bit だけインストールされていたとは・・・(;´д`)トホホ
- いい加減「mock」使おうぜ~!>< 2回目
エラー全文
[snicker_jp@monitor8 SPECS]$ rpmbuild -bb nagios-ja.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UgzTse + umask 022 + cd /home/snicker_jp/rpmbuild/BUILD + cd /home/snicker_jp/rpmbuild/BUILD + rm -rf nagios + /usr/bin/gzip -dc /home/snicker_jp/rpmbuild/SOURCES/nagios-3.5.0.tar.gz + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd nagios + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #1 (nagios-0001-from-rpm.patch):' Patch #1 (nagios-0001-from-rpm.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0001-from-rpm.patch + /usr/bin/patch -p1 -b --suffix .fedora --fuzz=0 patching file daemon-init.in Hunk #1 succeeded at 129 (offset 5 lines). + echo 'Patch #2 (nagios-0002-SELinux-relabeling.patch):' Patch #2 (nagios-0002-SELinux-relabeling.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0002-SELinux-relabeling.patch + /usr/bin/patch -p1 -b --suffix .selinux_relabel --fuzz=0 patching file daemon-init.in Hunk #1 succeeded at 134 (offset 5 lines). + echo 'Patch #3 (nagios-0003-Fix-etc-init.d-nagios-status.patch):' Patch #3 (nagios-0003-Fix-etc-init.d-nagios-status.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0003-Fix-etc-init.d-nagios-status.patch + /usr/bin/patch -p1 -b --suffix .fix_status_retcode --fuzz=0 patching file daemon-init.in Hunk #1 succeeded at 57 (offset 5 lines). Hunk #2 succeeded at 181 (offset 5 lines). + echo 'Patch #4 (nagios-0004-Fix-installation-of-httpd-conf.d-config-file.patch):' Patch #4 (nagios-0004-Fix-installation-of-httpd-conf.d-config-file.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0004-Fix-installation-of-httpd-conf.d-config-file.patch + /usr/bin/patch -p1 -b --suffix .fix_httpd_conf_d --fuzz=0 patching file Makefile.in Hunk #1 succeeded at 284 (offset 20 lines). + echo 'Patch #5 (nagios-0005-Install-config-files-too.patch):' Patch #5 (nagios-0005-Install-config-files-too.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0005-Install-config-files-too.patch + /usr/bin/patch -p1 -b --suffix .install_config --fuzz=0 patching file Makefile.in Hunk #1 succeeded at 329 (offset 38 lines). + echo 'Patch #6 (nagios-0006-Do-not-start-service-by-default.patch):' Patch #6 (nagios-0006-Do-not-start-service-by-default.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0006-Do-not-start-service-by-default.patch + /usr/bin/patch -p1 -b --suffix .dont_start_by_default --fuzz=0 patching file daemon-init.in + echo 'Patch #7 (nagios-0007-The-init-script-should-return-2-in-case-of-unknown-c.patch):' Patch #7 (nagios-0007-The-init-script-should-return-2-in-case-of-unknown-c.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0007-The-init-script-should-return-2-in-case-of-unknown-c.patch + /usr/bin/patch -p1 -b --suffix .return_2 --fuzz=0 patching file daemon-init.in Hunk #1 succeeded at 234 (offset 5 lines). + echo 'Patch #8 (nagios-0008-Fix-path-to-CGI-executables.patch):' Patch #8 (nagios-0008-Fix-path-to-CGI-executables.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0008-Fix-path-to-CGI-executables.patch + /usr/bin/patch -p1 -b --suffix .fix_path_to_cgi --fuzz=0 patching file sample-config/httpd.conf.in patching file subst.in + echo 'Patch #9 (nagios-0009-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch):' Patch #9 (nagios-0009-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0009-Fixed-path-to-passwd-file-in-Apache-s-config-file.patch + /usr/bin/patch -p1 -b --suffix .fix_path_to_passwd --fuzz=0 patching file sample-config/httpd.conf.in + echo 'Patch #10 (nagios-0010-Added-several-images-to-the-sample-config-revb.patch):' Patch #10 (nagios-0010-Added-several-images-to-the-sample-config-revb.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0010-Added-several-images-to-the-sample-config-revb.patch + /usr/bin/patch -p1 -b --suffix .more_images --fuzz=0 patching file sample-config/template-object/templates.cfg.in + echo 'Patch #11 (nagios-0011-Fixed-strange-permissions.patch):' Patch #11 (nagios-0011-Fixed-strange-permissions.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-0011-Fixed-strange-permissions.patch + /usr/bin/patch -p1 -b --suffix .fix_perms --fuzz=0 patching file base/Makefile.in Hunk #1 succeeded at 205 (offset 2 lines). + echo 'Patch #13 (nagios-3.4.3-spaces-to-plus-signs.patch):' Patch #13 (nagios-3.4.3-spaces-to-plus-signs.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-3.4.3-spaces-to-plus-signs.patch + /usr/bin/patch -p1 -b --suffix .plus_signs --fuzz=0 patching file common/macros.c + echo 'Patch #14 (nagios-3.5.0-conf.d-configuration-directory.patch):' Patch #14 (nagios-3.5.0-conf.d-configuration-directory.patch): + /bin/cat /home/snicker_jp/rpmbuild/SOURCES/nagios-3.5.0-conf.d-configuration-directory.patch + /usr/bin/patch -p1 -b --suffix .conf_d --fuzz=0 patching file sample-config/nagios.cfg.in + echo 'Patch #15 (nagios-jp-3.5.0.patch.gz):' Patch #15 (nagios-jp-3.5.0.patch.gz): + /usr/bin/gzip -dc /home/snicker_jp/rpmbuild/SOURCES/nagios-jp-3.5.0.patch.gz + /usr/bin/patch -p1 -b --suffix .ja_patch --fuzz=0 patching file cgi/avail.c patching file cgi/cgiutils.c patching file cgi/cmd.c patching file cgi/config.c patching file cgi/extcmd_list.c patching file cgi/extinfo.c patching file cgi/histogram.c patching file cgi/history.c patching file cgi/notifications.c patching file cgi/outages.c patching file cgi/showlog.c patching file cgi/status.c patching file cgi/statusmap.c patching file cgi/statuswml.c patching file cgi/summary.c patching file cgi/tac.c patching file cgi/trends.c patching file common/downtime.c patching file common/statusdata.c patching file html/Makefile.in patching file html/index.php patching file html/main.php patching file html/side.php patching file include/cgiutils.h patching file sample-config/cgi.cfg.in + install -p -m 0644 /home/snicker_jp/rpmbuild/SOURCES/printer.png /home/snicker_jp/rpmbuild/SOURCES/router.png /home/snicker_jp/rpmbuild/SOURCES/switch.png html/images/logos/ + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.eq1q5s + umask 022 + cd /home/snicker_jp/rpmbuild/BUILD + cd nagios + CFLAGS='-O2 -g' + export CFLAGS + CXXFLAGS='-O2 -g' + export CXXFLAGS + FFLAGS='-O2 -g' + export FFLAGS + ./configure --host=x86_64-redhat-linux-gnu --build=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr/share/nagios --exec-prefix=/var/lib/nagios --with-init-dir=/etc/rc.d/init.d --with-cgiurl=/nagios/cgi-bin/ --with-htmlurl=/nagios --with-lockfile=/var/run/nagios.pid --libdir=/usr/lib64/nagios --with-nagios-user=nagios --with-nagios-grp=nagios --bindir=/usr/sbin --libexecdir=/usr/lib64/nagios/plugins --sysconfdir=/etc/nagios --localstatedir=/var/log/nagios --datadir=/usr/share/nagios/html --with-gd-lib=/usr/lib64 --with-gd-inc=/usr/include --enable-embedded-perl --with-perlcache --with-template-objects --with-template-extinfo STRIP=/bin/true checking for a BSD-compatible install... /usr/bin/install -c checking build system type... x86_64-redhat-linux-gnu checking host system type... x86_64-redhat-linux-gnu checking for x86_64-redhat-linux-gnu-gcc... no checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.eq1q5s (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.eq1q5s (%build)