tukaani-project / xz

XZ Utils
https://tukaani.org/xz/
Other
503 stars 40 forks source link

it shouldn't be this hard. #121

Closed wmjb closed 1 month ago

wmjb commented 1 month ago

I just wanted to compile the latest src for xz

in the absence of clear instructions on the opening page of the git repo, and the INSTALL file being a TLDR nightmare, after years of experience of compiling stuff, i used my intuition to try to compile it

so i git clone https://github.com/tukaani-project/xz --depth=1

(--depth=1, because i don't want to download all the commit history, which should not be necessary to build)

then i ran ./autogen.sh and then ran ./configure then ran make

(pretty standard universal compile steps, that work with most src using cmake/make)

then i got this error

lzma/lzma_decoder.c: Assembler messages: lzma/lzma_decoder.c:371: Error: no such instruction: movzw 2(%r15),%esi' lzma/lzma_decoder.c:373: Error: no such instruction:movzw 4(%r15),%edi' lzma/lzma_decoder.c:388: Error: no such instruction: movzw 6(%r15),%edx' lzma/lzma_decoder.c:398: Error: no such instruction:movzw (%r15,%r14,4),%esi' lzma/lzma_decoder.c:413: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:424: Error: no such instruction:movzw (%r15,%r14,4),%edi' lzma/lzma_decoder.c:439: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:450: Error: no such instruction:movzw (%r15,%r14,4),%esi' lzma/lzma_decoder.c:465: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:476: Error: no such instruction:movzw (%r15,%r14,4),%edi' lzma/lzma_decoder.c:491: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:502: Error: no such instruction:movzw (%r15,%r14,4),%esi' lzma/lzma_decoder.c:517: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:528: Error: no such instruction:movzw (%r15,%r14,4),%edi' lzma/lzma_decoder.c:543: Error: no such instruction: movzw 2(%r15,%r14,4),%edx' lzma/lzma_decoder.c:421: Error: no such instruction:movzw 2(%rax),%edi' lzma/lzma_decoder.c:423: Error: no such instruction: movzw 4(%rax),%r10d' lzma/lzma_decoder.c:438: Error: no such instruction:movzw 6(%rax),%ecx' lzma/lzma_decoder.c:448: Error: no such instruction: movzw (%rax,%rdx,4),%edi' lzma/lzma_decoder.c:463: Error: no such instruction:movzw 2(%rax,%rdx,4),%ecx' lzma/lzma_decoder.c:430: Error: no such instruction: movzw 2(%r15),%esi' lzma/lzma_decoder.c:432: Error: no such instruction:movzw 4(%r15),%edi' lzma/lzma_decoder.c:447: Error: no such instruction: movzw 6(%r15),%eax' lzma/lzma_decoder.c:457: Error: no such instruction:movzw (%r15,%rdx,4),%esi' lzma/lzma_decoder.c:472: Error: no such instruction: movzw 2(%r15,%rdx,4),%eax' lzma/lzma_decoder.c:483: Error: no such instruction:movzw (%r15,%rdx,4),%edi' lzma/lzma_decoder.c:498: Error: no such instruction: movzw 2(%r15,%rdx,4),%eax' lzma/lzma_decoder.c:509: Error: no such instruction:movzw (%r15,%rdx,4),%esi' lzma/lzma_decoder.c:524: Error: no such instruction: movzw 2(%r15,%rdx,4),%eax' lzma/lzma_decoder.c:535: Error: no such instruction:movzw (%r15,%rdx,4),%edi' lzma/lzma_decoder.c:550: Error: no such instruction: movzw 2(%r15,%rdx,4),%eax' lzma/lzma_decoder.c:487: Error: no such instruction:movzw (%r15,%rdi,2),%r13d' lzma/lzma_decoder.c:379: Error: no such instruction: movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:411: Error: no such instruction:movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:443: Error: no such instruction: movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:475: Error: no such instruction:movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:507: Error: no such instruction: movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:539: Error: no such instruction:movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:571: Error: no such instruction: movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:603: Error: no such instruction:movzw (%r15,%r14,2),%r10d' lzma/lzma_decoder.c:421: Error: no such instruction: movzw 2(%rax),%edi' lzma/lzma_decoder.c:423: Error: no such instruction:movzw 4(%rax),%r10d' lzma/lzma_decoder.c:438: Error: no such instruction: movzw 6(%rax),%ecx' lzma/lzma_decoder.c:448: Error: no such instruction:movzw (%rax,%rdx,4),%edi' lzma/lzma_decoder.c:463: Error: no such instruction: movzw 2(%rax,%rdx,4),%ecx' lzma/lzma_decoder.c:627: Error: no such instruction:movzw 2(%rax),%esi' lzma/lzma_decoder.c:629: Error: no such instruction: movzw 4(%rax),%edi' lzma/lzma_decoder.c:644: Error: no such instruction:movzw 6(%rax),%edx' lzma/lzma_decoder.c:654: Error: no such instruction: movzw (%rax,%r14,4),%esi' lzma/lzma_decoder.c:669: Error: no such instruction:movzw 2(%rax,%r14,4),%edx' lzma/lzma_decoder.c:627: Error: no such instruction: movzw 2(%rax),%esi' lzma/lzma_decoder.c:629: Error: no such instruction:movzw 4(%rax),%edi' lzma/lzma_decoder.c:644: Error: no such instruction: movzw 6(%rax),%edx' lzma/lzma_decoder.c:654: Error: no such instruction:movzw (%rax,%r14,4),%esi' lzma/lzma_decoder.c:669: Error: no such instruction: movzw 2(%rax,%r14,4),%edx' lzma/lzma_decoder.c:506: Error: no such instruction:movzw 2(%r10),%esi' lzma/lzma_decoder.c:508: Error: no such instruction: movzw 4(%r10),%edi' lzma/lzma_decoder.c:523: Error: no such instruction:movzw 6(%r10),%edx' lzma/lzma_decoder.c:533: Error: no such instruction: movzw 8(%r10,%r14,2),%esi' lzma/lzma_decoder.c:548: Error: no such instruction:movzw 12(%r10,%r14,2),%edx' lzma/lzma_decoder.c:559: Error: no such instruction: movzw 16(%r10,%r14,2),%edi' lzma/lzma_decoder.c:574: Error: no such instruction:movzw 24(%r10,%r14,2),%edx' lzma/lzma_decoder.c:421: Error: no such instruction: movzw 2(%rcx),%edi' lzma/lzma_decoder.c:423: Error: no such instruction:movzw 4(%rcx),%r10d' lzma/lzma_decoder.c:438: Error: no such instruction: movzw 6(%rcx),%edx' lzma/lzma_decoder.c:448: Error: no such instruction:movzw (%rcx,%rax,4),%edi' lzma/lzma_decoder.c:463: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:474: Error: no such instruction:movzw (%rcx,%rax,4),%r10d' lzma/lzma_decoder.c:489: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:500: Error: no such instruction:movzw (%rcx,%rax,4),%edi' lzma/lzma_decoder.c:515: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:526: Error: no such instruction:movzw (%rcx,%rax,4),%r10d' lzma/lzma_decoder.c:541: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:552: Error: no such instruction:movzw (%rcx,%rax,4),%edi' lzma/lzma_decoder.c:567: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:578: Error: no such instruction:movzw (%rcx,%rax,4),%r10d' lzma/lzma_decoder.c:593: Error: no such instruction: movzw 2(%rcx,%rax,4),%edx' lzma/lzma_decoder.c:627: Error: no such instruction:movzw 2(%rdi),%ecx' lzma/lzma_decoder.c:629: Error: no such instruction: movzw 4(%rdi),%esi' lzma/lzma_decoder.c:644: Error: no such instruction:movzw 6(%rdi),%eax' lzma/lzma_decoder.c:654: Error: no such instruction: movzw (%rdi,%r14,4),%ecx' lzma/lzma_decoder.c:669: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' lzma/lzma_decoder.c:680: Error: no such instruction: movzw (%rdi,%r14,4),%esi' lzma/lzma_decoder.c:695: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' lzma/lzma_decoder.c:706: Error: no such instruction: movzw (%rdi,%r14,4),%ecx' lzma/lzma_decoder.c:721: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' lzma/lzma_decoder.c:732: Error: no such instruction: movzw (%rdi,%r14,4),%esi' lzma/lzma_decoder.c:747: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' lzma/lzma_decoder.c:758: Error: no such instruction: movzw (%rdi,%r14,4),%ecx' lzma/lzma_decoder.c:773: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' lzma/lzma_decoder.c:784: Error: no such instruction: movzw (%rdi,%r14,4),%esi' lzma/lzma_decoder.c:799: Error: no such instruction:movzw 2(%rdi,%r14,4),%eax' Makefile:1482: recipe for target 'liblzma_la-lzma_decoder.lo' failed

what am i doing wrong and why are there no compile instructions on the main page?

i suggest you stick some basic compile instructions instead of that wall of text on the main page.

thesamesam commented 1 month ago

Please focus on the actual issue (failure to compile). The steps you laid out for a regular autotools project should work here. They didn't for you, so let's try figure out why:

Suggestions for improving documentation are welcome, but "it shouldn't be this hard" would apply to anyone who hits an issue. It doesn't add anything here. Anyone who files a bug ever could vent their frustration therein but it doesn't get anyone anywhere.

Larhzu commented 1 month ago

in the absence of clear instructions on the opening page of the git repo, and the INSTALL file being a TLDR nightmare

I'm sorry that the experience has been negative. As you may have noticed, the home page of XZ Utils is currently quite empty but it's one of things I've been working on recently (GitHub is not the home page, it's just a place to host the repository). That happens to include writing new instructions on how to build from the Git repository. It will include more information than just running ./autogen.sh to generate configure so hopefully it won't be too long.

It is also true that some of the docs in the package (and thus Git repository) could be improved as some of the content is quite old and possibly a bit outdated. For example, README and INSTALL were written in a time where most would download a release tarball and build from that, and Git repository was for the few who knew how to handle it anyway. In any case I'm aware that content of the docs could be improved, it's just that there are many other things to do too. This is a hobby project, after all.

then i ran ./autogen.sh and then ran ./configure then ran make

In any case, you have already correctly determined the commands to use. These are indeed quite universal steps with packages that build with Autotools. However, it seems that it didn't work. This means that it is possible that you have found a bug in XZ Utils. Thank you for reporting it!

Unfortunately you didn't include the basic information:

I understand it's easy to forget those. (Previously there were (too) fancy issue templates which asked a bunch of questions. When the other maintainer disappeared, I deleted those templates as I thought it would be easy to ask in case a bug reporter doesn't mention them in their first post.)

As @thesamesam wrote, the contents of config.log could be useful too, but getting just the above three things should help quite a bit.

then i got this error

The inline assembly is used when compiling with GCC or Clang for x86-64. However, some compilers pretend to be GCC or Clang and that could be one reason for the problem. Perhaps it's possible that a compiler pretends to target x86-64 but actually doesn't and then things go wrong too. It's not useful for me guess further until you provide the hardware, OS, and compiler information.

Thanks!

Larhzu commented 1 month ago

Please re-open if more information is available.