Coder Social home page Coder Social logo

archive-ar's People

Contributors

jbazik avatar plicease avatar

Watchers

 avatar  avatar

archive-ar's Issues

OpenBSD ar files (GNU ar 2.15) issue

$ uname -a
OpenBSD triton.poseidon.local 5.4 GENERIC.MP#0 amd64
$ file libz.a
libz.a: current ar archive
$ ar t libz.a
infback.o
uncompr.o
gzio.o
inflate.o
inffast.o
inftrees.o
compress.o
deflate.o
trees.o
adler32.o
crc32.o
zutil.o
$ perl -MArchive::Ar -e'my $ar=new Archive::Ar;$ar->set_opt(warn=>2);$ar->read("./libz.a");print join(",",$ar->list_files())'
,infback.o,uncompr.o,gzio.o,inflate.o,inffast.o,inftrees.o,compress.o,deflate.o,trees.o,adler32.o,crc32.o,zutil.o
$ # notice the extra empty filename in the list of files
$ perl -MArchive::Ar -e'my $ar=new Archive::Ar;$ar->set_opt(warn=>2);$ar->read("./
libz.a");$ar->extract()'
: No such file or directory at /home/jamesw/perl5/lib/perl5/Archive/Ar.pm line 134.
Archive::Ar::extract_file('Archive::Ar=HASH(0xed3e3cd9f40)', '') called at /home/jamesw/perl5/lib/perl5/Archive/Ar.pm line 122
Archive::Ar::extract('Archive::Ar=HASH(0xed3e3cd9f40)') called at -e line 1
at -e line 1.
$ perl -MArchive::Ar -e'my $ar=new Archive::Ar;$ar->set_opt(warn=>2);$ar->read("./
libz.a");my @f=$ar->list_files();warn $f[1];$ar->extract($f[1])'
infback.o at -e line 1.
1: not in archive at /home/jamesw/perl5/lib/perl5/Archive/Ar.pm line 133.
Archive::Ar::extract_file('Archive::Ar=HASH(0x1e1a0dbf9f40)', 1) called at /home/jamesw/perl5/lib/perl5/Archive/Ar.pm line 122
Archive::Ar::extract('Archive::Ar=HASH(0x1e1a0dbf9f40)', 'infback.o') called at -e line 1
at -e line 1.
$ # but this works
$ perl -MArchive::Ar -e'my $ar=new Archive::Ar;$ar->set_opt(warn=>2);$ar->read("./
libz.a");my @f=$ar->list_files();warn $f[1];my $c=$ar->get_content($f[1]);open m
y $fh,">",$f[1];print $fh $c->{data}'
infback.o at -e line 1
$ file infback.o
infback.o: ELF 64-bit LSB relocatable, x86-64, version 1, not stripped
$ ar --version
GNU ar 2.15
Copyright 2004 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.