Coder Social home page Coder Social logo

linux build fixes about pixz HOT 13 CLOSED

vasi avatar vasi commented on July 20, 2024
linux build fixes

from pixz.

Comments (13)

epitron avatar epitron commented on July 20, 2024

Tested -- this works!

The most crucial fix is the -lpthread under linux, which isn't linked in by default.

from pixz.

yoshi314 avatar yoshi314 commented on July 20, 2024

i'm still having runtime problems, though. It only produces 24byte file or so (if i remember correctly, it's been a while since i tried it).

Could be wrong invocation of the tool, or something wrong on my end.

from pixz.

epitron avatar epitron commented on July 20, 2024

Works for me under Arch. Maybe your lzma lib was too old.

from pixz.

yoshi314 avatar yoshi314 commented on July 20, 2024

that was also on arch, 64bit. will retest.

from pixz.

vasi avatar vasi commented on July 20, 2024

yoshi314, the issue with producing a really small file is indeed a wrong invocation. In pixz's default mode, it auto-detects tar files so it can index them, which is useful. BUT a file that starts with 512 zero bytes is in fact a valid, empty tar file, so pixz just stops.

You should run pixz with the -t flag to tell it not to do tar detection. I hope to add at some point a feature to warn on empty tar files, so users don't run into this problem anymore.

from pixz.

yoshi314 avatar yoshi314 commented on July 20, 2024

thanks for info. i'll see if that helps.

from pixz.

justinmayer avatar justinmayer commented on July 20, 2024

Hey Dave. You may remember me from an article I wrote about parallel bzip2. I'd like to write a follow-up that covers parallel xz compression, but before I do that I'd like to get pixz functioning properly on Ubuntu 12.04. Here are the exact steps I took:

sudo aptitude install libarchive-dev liblzma-dev
git clone https://github.com/vasi/pixz
cd pixz
make
cp pixz ~/bin/

While it appears to have compiled successfully, there was a warning in the output during compilation:

gcc -I/usr/include -I//include -g -O0 -std=gnu99 -Wall -Wno-unknown-pragmas -c -o pixz.o pixz.c
gcc -I/usr/include -I//include -g -O0 -std=gnu99 -Wall -Wno-unknown-pragmas -c -o common.o common.c
common.c: In function ‘decode_index’:
common.c:247:47: warning: integer overflow in expression [-Woverflow]
[...]

I then compressed a folder of files:

tar -c myfolder | pixz -3 > myfolder.tar.xz

So far so good. But I got an error when testing decompression:

pixz -x myfolder < myfolder.tar.xz | tar -x
Error creating index decoder

Hmm. Perhaps I'll try something simpler:

pixz -d myfolder.tar.xz
Error creating index decoder

Any suggestions as to how to get pixz to function correctly on the most recent version Ubuntu? I tried the modifications @yoshi314 suggested, but the results were the same.

from pixz.

vasi avatar vasi commented on July 20, 2024

Hi justinmayer. I believe I have it working fine in a VM, so I'm curious what's going on. Could you specify exactly what your Ubuntu install looks like? x86 or amd64? Desktop or Server?

from pixz.

justinmayer avatar justinmayer commented on July 20, 2024

Certainly. I did my testing in a (nearly) fresh install of Ubuntu 12.04 Desktop in a VMware Fusion virtual machine. I don't recall whether I installed the x86 or amd64 version, but I suspect it's x86.

from pixz.

vasi avatar vasi commented on July 20, 2024

Justin, thanks so much for the bug report! It was indeed a problem with x86, I just hadn't tested there. The problem is fixed in the latest commit: ee8a340

Incidentally, I just want to make sure you're aware that in your example "pixz -x myfolder < myfolder.tar.xz" is equivalent to "pixz -d < myfolder.tar.xz" but more complex. The -x flag is used for filtering the output, if you're not doing any filtering it's just redundant. :)

from pixz.

vasi avatar vasi commented on July 20, 2024

yoshi314, epitron: This latest bout of testing confirms that it compiles fine in Ubuntu. Is Arch still a problem?

I'll look into it, but I'm not inclined to go through the rather complicated Arch install process just to test. I'd greatly appreciate if there's a VM available somewhere that I could test on!

from pixz.

vasi avatar vasi commented on July 20, 2024

Thanks to thestinger and gtmanfred in #archlinux, this should be fixed in c5f99bf . Sorry it took so long, and thank you for reporting the problem.

from pixz.

epitron avatar epitron commented on July 20, 2024

Woohoo! :D

from pixz.

Related Issues (20)

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.