On 07/06/2010 19:48, Alberto Simões via RT wrote:
Show quoted textHi Alberto,
Thanks a lot!
BTW I am the other guy behind Biber :)
In the meantime I have hit another problem: when running
./Build install install_base="/some/weird/location"
as normal user, I get this error:
Text-BibTeX-0.44]$ ./Build install
install_base=~/dev/biblatex-biber/dist/ctan-build/
Building Text-BibTeX
Creating new 'btparse/src/bt_config.h' from 'btparse/src/bt_config.h.in'.
** Creating Manpages
** Compiling C files
** Creating libbtparse.so
** Creating binaries (dumpnames, biblex, bibparse)
** Creating test binaries
** Preparing XS code
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/lib'
Do not have write permissions on '/usr/lib'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at /usr/share/perl5/vendor_perl/Module/Build/Base.pm line 3334
Calling "./Build fakeinstall install_base=..." instead shows where the
problem is:
[francois@samarqand Text-BibTeX-0.44]$ ./Build fakeinstall
install_base=~/dev/biblatex-biber/dist/ctan-build/
Building Text-BibTeX
Creating new 'btparse/src/bt_config.h' from 'btparse/src/bt_config.h.in'.
** Creating Manpages
** Compiling C files
** Creating libbtparse.so
** Creating binaries (dumpnames, biblex, bibparse)
** Creating test binaries
** Preparing XS code
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: Can't create '/usr/lib'
Do not have write permissions on '/usr/lib'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Installing
/home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/BibTeX.so
Installing
/home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/BibTeX.bs
Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/dumpnames
Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/biblex
Installing /home/francois/dev/biblatex-biber/dist/ctan-build/bin/bibparse
Installing
/home/francois/dev/biblatex-biber/dist/ctan-build/man/man1/bt_traversal.1
<snip>
Installing
/home/francois/dev/biblatex-biber/dist/ctan-build/man/man3/Text::BibTeX::Entry.3pm
Installing /usr/lib/libbtparse.so
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: WARNING: Failed chmod(0555, /usr/lib/libbtparse.so): Operation
not permitted
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Writing
/home/francois/dev/biblatex-biber/dist/ctan-build/lib/perl5/x86_64-linux-thread-multi/auto/Text/BibTeX/.packlist
Thus the installation path of libbtparse.so is absolute and does not
take install_base into account, which is clear on line 55 in your Build.PL:
$builder->install_path( 'usrlib' => $libdir );
where $libdir = '/usr/lib/' on Unix-like systems.
Do you think it might be possible to fix this in some way? That is, to
make the install path of 'usrlib' aware of the parameter install_base?
Probably it can be done in inc/MyBuilder.pm in ACTION_install just
before calling $self->SUPER::ACTION_install. Update: I have just tried this:
if (defined $self->{properties}->{install_base}) {
$self->install_path( 'usrlib' =>
catdir($self->{properties}->{install_base}, 'lib') )
}
and it appears to work: patch attached!
I also found this can actually be done on the command line as
./Build install install_base=$targetdir --install_path
usrlib=$targetdir/lib
Of course with such an installation location, Text::BibTeX will not be
able to find libbtparse.so, but this can be fixed manually by the
user/administrator at a later stage. A warning about this situation
would be nice, so at least installation would not just fail.
The reason I come with this is that I am currently trying to integrate
biber into the TeX Live build process
(
http://tug.org/texlive/build.html), and for that I need a reliable way
to automatize its installation and that of all its non-core dependencies
to a temporary directory, on multiple architectures. I want to use
App::cpanminus for that (with option -L), but the latter fails on
installing Text-BibTeX because of the above issue.
Regards,
François Charette
PS: Ah, and another thing: Could you please include the modules
Capture::Tiny and Config::AutoConf in the inc/ directory of the
Text-BibTeX distribution? That would save a lot of pain to Biber users
who are not familiar with Perl and CTAN. Just copy the appropriate files to
inc/Capture/Tiny.pm
inc/Config/AutoConf.pm
inc/Config/AutoConf/Linker.pm
and remove those two packages from build_requires :)