jmacd / xdelta

open-source binary diff, delta/differential compression tools, VCDIFF/RFC 3284 delta compression
http://xdelta.org
1.14k stars 189 forks source link

Please add basic build instructions/requirements to README #237

Open markashleybell opened 7 years ago

markashleybell commented 7 years ago

Speaking as someone with a very basic knowledge of C/C++, there doesn't seem to be much information here on how to go about building the project, or where to start diagnosing build errors; several of the current open issues are just people asking how to compile the code.

I've managed to get some way towards a working build by trial and error (reading through others' issues, error logs and messages etc), but I'm not at all convinced I'm doing things correctly.

I understand that there are an awful lot of variables in the build process (and also that you're probably extremely busy), but adding some basic build instructions/requirements for the different platforms to the README file for this project would be a massive help for non-experts like me. It might also cut down on the amount of issues raised relating to the build process.

i30817 commented 6 years ago

This error is preventing me from getting mingw to cross compile (to try to proof-of-concept windows compatibility to the xdelta-python guy so my application can install with pip on windows).

bobmagicii commented 6 years ago

i cant get it to build on windows either no matter which combo of runtimes and sdk versions i pick in visual studio. my choices are it bombs on errno.h or SIZEOF_SIZE_T undeclared. so i came looking for build instructions and found this thread.

so +1

Luro02 commented 6 years ago

I got it to work partially:

fresh MSys64 installation from here: https://www.msys2.org/ (the x86_64)

commands in msys shell: pacman -S --noconfirm git pacman -S --noconfirm --needed base-devel pacman -S --noconfirm --needed msys2-devel pacman -S --noconfirm --needed mingw-w64-i686-toolchain pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain

git clone --recursive https://github.com/jmacd/xdelta.git cd xdelta/ wget https://kent.dl.sourceforge.net/project/lzmautils/xz-5.2.1.tar.gz cd xdelta3/ ./generate_build_files.sh ./run_release.sh

some errors are fixed but for some reason it fails at build-lzma, (stderr says there are errors in the xz dependency ?)

Viterkim commented 6 years ago

Download the source from the ubuntu package and compile that instead... (Hey it works...) https://launchpad.net/ubuntu/+source/xdelta3/3.0.11-dfsg-1ubuntu1

Do the following:

wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/xdelta3/3.0.11-dfsg-1ubuntu1/xdelta3_3.0.11-dfsg.orig.tar.xz tar -xf xdelta3_3.0.11-dfsg.orig.tar.xz cd xdelta3-3.0.11-dfsg ./configure make

Now use or move the xdelta3 file

codemerx commented 5 years ago

The problem is the release3_1 branch is not frozen at the state of the actual release. It seems there is live development going on there and it's state is not really stable. Instead of cloning that one should be downloading the tagged release snapshot of the source.

In there there is no generate_build_files.sh. Apparently that came as part of new work after the actual release that is still unfinished. Looks like it needs #241 to compile but it is unknown whether that way of fixing it was the original authors intention.

So anyways, one has to get the zip with the source from the link above and then building is really simple. One just has to do:

autoreconf --install ./configure make

in the folder where the source resides. Also there is configure --help which is well written and lists all available options. Also, one can do make(space)(tab)(tab) on the command line to see all make options,

dajhorn commented 2 years ago

The xdelta-3.1 head fails to build from source and hasn't been updated in five years, so the best solution here is using a fork. The https://github.com/apple-ouyang/xdelta/commit/b4beec77068fe875bae4b2bcddd447974eac1578 patch seems like the simplest fix for Linux distros that have gcc-10 or gcc-11.

Try this:

$ git clone https://github.com/apple-ouyang/xdelta.git
$ cd xdelta/xdelta3
$ ./generate_build_files.sh
$ CFLAGS=-w CXXFLAGS=-w ./configure
$ make
$ make install