Hi I am on Debian verson 7.7, GCC 4.7.2 and make 3.8.1. I cloned the code : git clone https://github.com/v-hasu/xapian git checkout gsoc2014-evaluation rm xapian-letor/nobootstrap ./bootstrap ./configure --no-documentation make CXXFLAGS='-w' and I get a different set of errors --- ranker.cc: In member function 'std::string Xapian::Ranker::get_cwd()': ranker.cc:80:36: error: 'getcwd' was not declared in this scope make[3]: *** [ranker.lo] Error 1 make[3]: Leaving directory `/home/manugupt1/han/xapian/xapian-letor' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/manugupt1/han/xapian/xapian-letor' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/manugupt1/han/xapian/xapian-letor' --- I am also trying Hanxiao's method but am not able to find aclocal / libtool / autoconf / autoheader / automake --add-missing in my os. Can you tell me which packages do I need to install ? One option might be, I can try solving this error one by one in a branch of mine to get xapian-letor to a stage where it can be built directly and we will no longer require a .nobootstrap option while I get familiar with the code base too. What thoughts do you have on this? Best Regards Manu Gupta On Sun, Dec 7, 2014 at 12:19 PM, James Aylett <james-xapian at tartarus.org> wrote:> On 7 Dec 2014, at 17:12, Hanxiao Sun <sunhanxiaoisme at gmail.com> wrote: > > > I use Ubuntu12.04, GNU Make 3.81 and I am not sure if I use some special > configure options. > > Version of GCC (or other compiler) would be useful too. > > > The commands I use after clone the repo are as follows: > > > > cd xapian > > ./bootstarp > > ./configure > > make > > > > cd xapian-letor > > aclocal -I ../xapian-core/m4 > > libtoolize --force > > autoconf > > autoheader > > automake --add-missing > > ./configure > > make > > > > Is this normal? > > Not entirely. I?d just do: > > $ cd xapian > $ rm xapian-letor/.nobootstrap > $ ./bootstrap > $ ./configure > $ make > > which presents slightly different options to what you?ve done (in > particular yours doesn?t enable maintainer mode, I think), and so may > explain the warnings. Manu, you could try the above instructions and see if > the warnings go away. > > J > > -- > James Aylett, occasional trouble-maker > xapian.org > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141207/6b4feae7/attachment-0002.html>
On Sun, Dec 07, 2014 at 11:47:01PM -0500, Manu Gupta wrote:> I am on Debian verson 7.7, GCC 4.7.2 and make 3.8.1. > > I cloned the code : > git clone https://github.com/v-hasu/xapian > git checkout gsoc2014-evaluation > rm xapian-letor/nobootstrap > ./bootstrap > ./configure --no-documentation > make CXXFLAGS='-w'Please don't inhibit warnings - fix them instead!> ranker.cc: In member function 'std::string Xapian::Ranker::get_cwd()': > ranker.cc:80:36: error: 'getcwd' was not declared in this scopeThis will be because the header which declares getcwd() isn't included. But in fact none of the calls to getcwd() in xapian-letor are actually needed - relative paths are interpreted relative to the current directory. So the better fix is to eliminate these calls. I've pointed this out in a patch review previously, but it sounds like the didn't all get fixed.> I am also trying Hanxiao's method but am not able to find aclocal / libtool > / autoconf / autoheader / automake --add-missing in my os. Can you tell me > which packages do I need to install ?You should simply remove the .nobootstrap file if you want to do letor development. The whole point of bootstrap is to run tools such as these for you in a reproducible way, and then configure the subdirectories such that they use each other where appropriate - you want to be building xapian-letor against the xapian-core in the same source tree, which Hanxiao's commands don't set up.> One option might be, I can try solving this error one by one in a branch of > mine to get xapian-letor to a stage where it can be built directly and we > will no longer require a .nobootstrap option while I get familiar with the > code base too. What thoughts do you have on this?Letor has extra dependencies compared to the rest of the tree (libsvm currently IIRC, but probably more in future when more ML approaches are added) - if we bootstrap it by default, then everyone wanting to work with Xapian from git has to install all of those, or else touch the .nobootstrap file. It's really a question of what the better default is - at least at present, I think it's more sensible for those who want to do letor development to have to delete a file rather than for everyone else to have to create it. Cheers, Olly
On 8 Dec 2014, at 05:41, Olly Betts <olly at survex.com> wrote:>> make CXXFLAGS='-w' > > Please don't inhibit warnings - fix them instead!I suggested that as a way of getting it building at all in the first instance. It?s better to fix them in even the short term, so Manu?s suggestion of getting to a clean build at he gets familiar with the code seems a good plan.> But in fact none of the calls to getcwd() in xapian-letor are actually > needed - relative paths are interpreted relative to the current > directory. So the better fix is to eliminate these calls. > > I've pointed this out in a patch review previously, but it sounds > like the didn't all get fixed.It was against my original approach to merging the summer?s work, which we abandoned. When I pick this up again in January the merges I do will ensure we don?t reintroduce[*] `getcwd()` anywhere (amongst other things; I have all the notes from the previous merge approach). [*] it?s actually on master still, but not in the half-finished refactor I have on top of that J -- James Aylett, occasional trouble-maker xapian.org