Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

rpmbuild make Compiler error #14

Closed
loveshell opened this issue Jan 29, 2013 · 11 comments
Closed

rpmbuild make Compiler error #14

loveshell opened this issue Jan 29, 2013 · 11 comments

Comments

@loveshell
Copy link

./make-rpm.sh
.......
.......
linking miniruby
generating encdb.h
make[1]: *** [.rbconfig.time] Segmentation fault
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [encdb.h] Segmentation fault
make[1]: Leaving directory `/root/rpmbuild/td-agent/rpmbuild/BUILD/td-agent-1.1.11/deps/ruby'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.kRKvUn (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.kRKvUn (%build)
~/rpmbuild/td-agent

@kzk
Copy link
Member

kzk commented Jan 29, 2013

not enough info. plz check the file here. > ' /var/tmp/rpm-tmp.kRKvUn'

@kzk
Copy link
Member

kzk commented Jan 29, 2013

Also note that this script is only designed for RHEL5 or RHEL6. If you're using another distro, unfortunately I can't afford to fix the issue. Patches are welcomed.

@loveshell
Copy link
Author

not support centos?

@kzk
Copy link
Member

kzk commented Jan 29, 2013

I believe CentOS is built from RHEL source codes, but I only test on RHEL5 and RHEL6.

@loveshell
Copy link
Author

oh,i test on centos5 and centos6.all as above error,Don't know why,can you help me。if you need some message ,i can paste it

@kzk
Copy link
Member

kzk commented Jan 29, 2013

as I said, plz check the file here. check your error message first. > ' /var/tmp/rpm-tmp.kRKvUn'

@loveshell
Copy link
Author

[root@testlog SPECS]# cat /root/rpmbuild/TMP/rpm-tmp.58713
#!/bin/sh

RPM_SOURCE_DIR="/root/rpmbuild//SOURCES"
RPM_BUILD_DIR="/root/rpmbuild//BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
RPM_ARCH="x86_64"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="td-agent"
RPM_PACKAGE_VERSION="1.1.11"
RPM_PACKAGE_RELEASE="0"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/root/rpmbuild/TMP/td-agent-1.1.11-0-root"
export RPM_BUILD_ROOT

PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig"
export PKG_CONFIG_PATH

set -x
umask 022
cd /root/rpmbuild//BUILD

cd 'td-agent-1.1.11'
LANG=C
export LANG
unset DISPLAY

./autogen.sh

CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic}" ; export FFLAGS ;
for i in $(find . -name config.guess -o -name config.sub) ; do
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && /bin/rm -f $i && /bin/cp -fv /usr/lib/rpm/redhat/$(basename $i) $i ;
done ;
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu
--target=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=/usr/com
--mandir=/usr/share/man
--infodir=/usr/share/info
make -j8

@loveshell
Copy link
Author

before i check /root/rpmbuild/TMP/rpm-tmp.58713 ,content is as above ,that's so poor

@kzk
Copy link
Member

kzk commented Jan 29, 2013

Seems like your compiler unexpectedly exists with Segmentation Fault

make[1]: *** [.rbconfig.time] Segmentation fault

Sounds like your compiler or OS problem. Could you check if you can build the Ruby interpreter from source code? > http://www.ruby-lang.org/en/

Hard to debug from my side, though.

@loveshell
Copy link
Author

are you test on rh5 and rh6?

@loveshell
Copy link
Author

thx kzk,i slove it on redhat5

@kzk kzk closed this as completed Feb 5, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants