Opened 6 years ago

Closed 6 years ago

#766 closed defect (fixed)

Difficulty installing by Github in a centos 7

Reported by: Jose Marques Owned by: Olly Betts
Priority: normal Milestone: 1.5.0
Component: Other Version: git master
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description

Hi I'm trying to configure and install XAPIAN for hacking.

With your help I was able to understand a little more how XAPIAN works.

I'm still in the installation phase through github in my centos 7.

I did this:

#for hacking with github

yum update

yum install wget

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh epel-release-latest-7.noarch.rpm

yum update

yum install doxygen graphviz help2man python-docutils pngcrush python-sphinx

yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel

yum install curl-devel

yum group install "Development Tools"

yum install glibc-devel.x86_64

yum install bison

yum install tcl

yum install openssl-devel #for libssl-dev

yum install file-devel #for libmagic-dev

yum install m4

yum install ccache.x86_64

yum install git

#configure git

git config --global user.name "My user"

git config --global user.email "My email"

#verify the git configure

git config --list

#create a directory to work in my server

mkdir -p ~/git/testing

cd ~/git/testing

git clone https://github.com/xapian/xapian.git

./bootstrap

mkdir build

cd build

../configure

make

When I run the "make" command i get this errors:

...

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/root/git/testing/xapian/xapian-core -I/root/git/testing/xapian/xapian-core/common -I/root/git/testing/xapian/xapian-core/include -I./include -I/root/git/testing/xapian/xapian-core/languages -Ilanguages -I/root/git/testing/xapian/xapian-core/queryparser -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -Werror -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -std=gnu++11 -MT api/mset.lo -MD -MP -MF api/.deps/mset.Tpo -c /root/git/testing/xapian/xapian-core/api/mset.cc -fPIC -DPIC -o api/.libs/mset.o In file included from /root/git/testing/xapian/xapian-core/api/msetinternal.h:26:0,

from /root/git/testing/xapian/xapian-core/api/mset.cc:23:

/root/git/testing/xapian/xapian-core/api/result.h: In instantiation of ‘void std::insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = gnu_cxx::normal_iterator<Result*, std::vector<Result> >; _Compare = bool (*)(const Result&, const Result&)]’: /usr/include/c++/4.8.2/bits/stl_algo.h:2226:70: required from ‘void std::final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = gnu_cxx::normal_iterator<Result*, std::vector<Result> >; _Compare = bool (*)(const Result&, const Result&)]’ /usr/include/c++/4.8.2/bits/stl_algo.h:5500:55: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = gnu_cxx::normal_iterator<Result*, std::vector<Result> >; _Compare = bool (*)(const Result&, const Result&)]’ /root/git/testing/xapian/xapian-core/api/mset.cc:74:65: required from here /root/git/testing/xapian/xapian-core/api/result.h:49:5: error: unused parameter ‘o’ [-Werror=unused-parameter]

Result(Result&& o) = default;

In file included from /usr/include/c++/4.8.2/bits/stl_pair.h:59:0,

from /usr/include/c++/4.8.2/bits/stl_algobase.h:64, from /usr/include/c++/4.8.2/bits/char_traits.h:39, from /usr/include/c++/4.8.2/string:40, from /root/git/testing/xapian/xapian-core/include/xapian/database.h:31, from /root/git/testing/xapian/xapian-core/backends/databaseinternal.h:27, from /root/git/testing/xapian/xapian-core/api/enquireinternal.h:24, from /root/git/testing/xapian/xapian-core/api/msetinternal.h:24, from /root/git/testing/xapian/xapian-core/api/mset.cc:23:

/usr/include/c++/4.8.2/bits/stl_algo.h:2162:11: note: synthesized method ‘Result::Result(Result&&)’ first required here

val = _GLIBCXX_MOVE(*i);

In file included from /root/git/testing/xapian/xapian-core/api/msetinternal.h:26:0,

from /root/git/testing/xapian/xapian-core/api/mset.cc:23:

/root/git/testing/xapian/xapian-core/api/result.h:30:7: error: unused parameter ‘o’ [-Werror=unused-parameter]

class Result {

In file included from /usr/include/c++/4.8.2/algorithm:62:0,

from /root/git/testing/xapian/xapian-core/api/mset.cc:34:

/usr/include/c++/4.8.2/bits/stl_algo.h:2164:17: note: synthesized method ‘Result& Result::operator=(Result&&)’ first required here

*first = _GLIBCXX_MOVE(val);

cc1plus: all warnings being treated as errors make[3]: * [api/mset.lo] Error 1 make[3]: Leaving directory `/root/git/testing/xapian/build/xapian-core' make[2]: * [all-recursive] Error 1 make[2]: Leaving directory `/root/git/testing/xapian/build/xapian-core' make[1]: * [all] Error 2 make[1]: Leaving directory `/root/git/testing/xapian/build/xapian-core' make: * [all] Error 2

Please, can someone tell me what I'm doing wrong?

Thank you for your attention,

Jose Marques

Change History (1)

comment:1 by Olly Betts, 6 years ago

Keywords: Installation removed
Milestone: 1.4.x1.5.0
Resolution: fixed
Status: newclosed
Version: 1.4.6git master

This is due to a compiler warning. In developer builds, we enable -Werror automatically to stop new warnings creeping in, so that warning is promoted to an error, as the [-Werror=unused-parameter] at the end of this line indicates:

/root/git/testing/xapian/xapian-core/api/result.h:30:7: error: unused parameter ‘o’ [-Werror=unused-parameter] 

It looks like GCC 4.8.2 warns about unused parameters on default-ed methods, while GCC newer versions don't (even GCC 4.8.4 in Ubuntu trusty doesn't which is what our CI builds use). I've pushed a fix in 8417528eb9d0a6f3e00fcc97bfa33c4ae5083dae.

This code isn't present in the 1.4 branch, so nothing to backport.

(BTW, it's not a good idea to do software development work as root. Only do things as root that require root access.)

Note: See TracTickets for help on using tickets.