Open purplegrape opened 6 years ago
what's the error report?
./ardb-server --help Illegal instruction
rebuild src.rpm file locally, rpm file works again, so I believe it's not portable . as far as i see, it probably due to build jemalloc with gcc options "-O3"
echo "<<<<< Done unpacking JEMALLOC"
Unpacking JEMALLOC <<<<< Done unpacking JEMALLOC echo ">>>>> Building JEMALLOC" && \ cd /builddir/build/BUILD/ardb-0.9.7/src/../deps/jemalloc-5.0.1 && \ ./configure && \ make build_lib_static && \ echo "<<<<< Done building JEMALLOC" Building JEMALLOC checking for xsltproc... false checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o ..............................
jemalloc version : 5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb library revision : 2
CONFIG : CC : gcc CONFIGURE_CFLAGS : -std=gnu11 -Wall -Wsign-compare -Wundef -pipe -g3 -fvisibility=hidden -O3 -funroll-loops SPECIFIED_CFLAGS : EXTRA_CFLAGS : CPPFLAGS : -D_GNU_SOURCE -D_REENTRANT CXX : g++ CONFIGURE_CXXFLAGS : -fvisibility=hidden -O3 SPECIFIED_CXXFLAGS : EXTRA_CXXFLAGS : LDFLAGS : EXTRA_LDFLAGS : DSO_LDFLAGS : -shared -Wl,-soname,$(@F) LIBS : -lm -lpthread -ldl RPATH_EXTRA :
XSLTPROC : false XSLROOT :
PREFIX : /usr/local BINDIR : /usr/local/bin DATADIR : /usr/local/share INCLUDEDIR : /usr/local/include LIBDIR : /usr/local/lib MANDIR : /usr/local/share/man
srcroot : abs_srcroot : /builddir/build/BUILD/ardb-0.9.7/deps/jemalloc-5.0.1/ objroot : abs_objroot : /builddir/build/BUILD/ardb-0.9.7/deps/jemalloc-5.0.1/
make[2]: Entering directory `/builddir/build/BUILD/ardb-0.9.7/deps/jemalloc-5.0.1' gcc -std=gnu11 -Wall -Wsign-compare -Wundef -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/jemalloc.sym.o src/jemalloc.c nm -a src/jemalloc.sym.o | gawk -f include/jemalloc/internal/private_symbols.awk > src/jemalloc.sym gcc -std=gnu11 -Wall -Wsign-compare -Wundef -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -DJEMALLOC_NO_PRIVATE_NAMESPACE -o src/arena.sym.o src/arena.c
u can use MALLOC=libc make
to build without jemalloc.
have tried MALLOC=libc ,move binary file to another server , got the same error: ./ardb-server --help Illegal instruction
this need further investgation , many thanks .
traps: ardb-server[24459] trap invalid opcode ip:747a3d sp:7fff2ec5dac8 error:0 in ardb-server[400000+4b1000]
can you share the spec file for ardb?
Name: ardb Version: 0.9.7 Release: 1%{?dist} Summary: A redis protocol compatible nosql
License: BSD-3-Clause URL: https://github.com/yinqiwen/ardb Source0: %{name}-%{version}.tar.gz Source1: %{name}.service
Source11: jemalloc-5.0.1.tar.bz2 Source12: rocksdb-5.12.2.tar.gz Source13: snappy-1.1.4.tar.gz
BuildRequires: gcc-c++ >= 4.8.1 BuildRequires: glibc-devel BuildRequires: libtool BuildRequires: bzip2-devel BuildRequires: gflags-devel BuildRequires: zlib-devel BuildRequires: systemd
Requires: glibc Requires: gflags Requires: libgcc Requires: libstdc++ Requires: bzip2 Requires: zlib Requires: systemd
%description A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
%prep %setup -q install %{SOURCE11} deps/ install %{SOURCE12} deps/ install %{SOURCE13} deps/
%build sed -i 's/0.9.6/0.9.7/g' src/Makefile
storage_engine=rocksdb make
%install rm -rf $RPM_BUILD_ROOT %{mkdir} -p $RPM_BUILD_ROOT%{_bindir} %{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/ardb %{mkdir} -p $RPM_BUILD_ROOT%{_sharedstatedir}/ardb %{__mkdir} -p $RPM_BUILD_ROOT/var/log/ardb
%{install} -p -m 755 src/ardb-repair $RPM_BUILD_ROOT%{_bindir} %{__install} -p -m 755 src/ardb-server $RPM_BUILD_ROOT%{_bindir} %{install} -p -m 755 src/ardb-test $RPM_BUILD_ROOT%{_bindir}
%{__install} -p -m 644 ardb.conf $RPM_BUILD_ROOT%{_sysconfdir}/ardb/
%{__mkdir} -p $RPM_BUILD_ROOT%{_unitdir} %{__install} -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
sed -i 's#home.*#home /var/lib/ardb#g' $RPM_BUILD_ROOT%{_sysconfdir}/ardb/ardb.conf sed -i 's#stdout#/var/log/ardb/ardb-server.log#g' $RPM_BUILD_ROOT%{_sysconfdir}/ardb/ardb.conf
%clean rm -rf $RPM_BUILD_ROOT
%pre
getent group ardb >/dev/null || groupadd -r ardb getent passwd ardb >/dev/null || useradd -r -g ardb -s /sbin/nologin -d /var/lib/ardb -c "ardb user" ardb exit 0
%post %systemd_post %{name}.service
%preun %systemd_preun %{name}.service
%postun %systemd_postun %{name}.service
%files %defattr(-,root,root,-) %{_bindir}/* %{_unitdir}/ardb.service %config(noreplace) %{_sysconfdir}/ardb/ardb.conf %dir %attr(0755,ardb,ardb) %{_sharedstatedir}/ardb %dir %attr(0755,ardb,ardb) /var/log/ardb %doc README.md %license LICENSE
I have packaged rpm file for ardb , it runs ok in local , but others not.