On Thursday 02 February 2012 21:56:28 Kenneth Heafield wrote: > >> With regard to headers, we could install them by appending these lines > >> to Jamroot: > >> > >> includedir = [ option.get "includedir" : $(prefix)/include ] ; > >> > >> install prefix-header : > >> [ glob-tree *.h *.hh : jam-files dist ] : > >> <location>$(includedir)<install-source-root>. ; > >> > >> But the issue is that the headers are bad at finding themselves i.e. the > >> moses/src directory expects to find everything relative to that path. I > >> guess we could move them up like so: > >> > >> install prefix-header : > >> [ glob-tree *.h *.hh : jam-files dist ] : > >> <location>$(includedir)<install-source-root>moses/src ; > >> > >> But I don't want to pollute a system's top-level headers with every > >> moses/src header. > > > > I'm not familiar with bjam so I don't really understand what's happening > > there... Maybe we could create some sort of "public headers list"? Or just > > put every header in $(includedir)/moses so that the system level > > directory is not polluted, and one would just have to add > > -I$(includedir)/moses to one's compile flags in order to use Moses API? > > otherwise, what would you suggest to be able to use moses libraries? > > -I/path/to/mosesdecoder/moses/src? > If you take my first suggestion and append it to Jamroot (in the > top-level directory): > > includedir = [ option.get "includedir" : $(prefix)/include ] ; > install prefix-header : > [ glob-tree *.h *.hh : jam-files dist ] : > <location>$(includedir)<install-source-root>moses/src ; > > then run the same bjam command as you did before, it will install all > *.h and *.hh files (except those in dist or jam-files) and preserve > their directory structure. For example, lm/blank.hh will be installed > in /usr/include/lm/blank.hh (assuming --prefix=/usr). This will work as > expected because the code says: > > #include "lm/blank.hh" > > However, e.g. moses/src/AlignmentInfoCollection.h says: > > #include "AlignmentInfo.h" > > so you will need to add -I/usr/include/moses/src in order to help it > find AlignmentInfo.h.
Hello It seems the suggest fix doesn't work. I get: sylvain@markov ~/loria/mosesdecoder $ sudo nice ./bjam -j4 --with- giza=/home/sylvain/loria/GIZAPP/giza-pp/bin/ link=shared -a Password: warning: No toolsets are configured. warning: Configuring default toolset "gcc". warning: If the default is wrong, your build may not work correctly. warning: Use the "toolset=xxxxx" option to override our guess. warning: For more configuration options, please consult warning: http://boost.org/boost- build2/doc/html/bbv2/advanced/configuration.html /home/sylvain/loria/mosesdecoder/jam-files/boost-build/build/virtual- target.jam:1079: in virtual-target.register-actual-name from module virtual- target error: Duplicate name of actual target: <p/home/sylvain/loria/mosesdecoder/dist/include<install-source- root>/moses/src>bhiksha.hh error: previous virtual target { common%common.copy-bhiksha.hh. { kenlm/bhiksha.hh. } } error: created from ./prefix-header error: another virtual target { common%common.copy-bhiksha.hh. { lm/bhiksha.hh. } } error: created from ./prefix-header error: added properties: none error: removed properties: none /home/sylvain/loria/mosesdecoder/jam-files/boost-build/build/virtual- target.jam:490: in actualize-no-scanner from module object(file-target)@2538 /home/sylvain/loria/mosesdecoder/jam-files/boost-build/build/virtual- target.jam:135: in object(file-target)@2538.actualize from module object(file- target)@2538 /home/sylvain/loria/mosesdecoder/jam-files/boost-build/build-system.jam:749: in load from module build-system ./jam-files/boost-build/kernel/modules.jam:283: in import from module modules ./jam-files/boost-build/kernel/bootstrap.jam:142: in boost-build from module ./jam-files/boost-build/boost-build.jam:8: in module scope from module It looks like it gets confused because of the symlink kenlm->lm. I guess I should tell it to ignore one of them. Do you have an idea how to do that? regards, -- Sylvain Raybaud _______________________________________________ Moses-support mailing list Moses-support@mit.edu http://mailman.mit.edu/mailman/listinfo/moses-support