YACReader / yacreader

This repo contains the code of YACReader's desktop version.
https://www.yacreader.com
GNU General Public License v3.0
972 stars 95 forks source link

Missing symbols when linking YACReaderLibraryServer on odroid XU4 #293

Open Witos opened 2 years ago

Witos commented 2 years ago

The error message: linking YACReaderLibraryServer /usr/bin/ld: uncompress-rar.o: in function rar_parse_codes': uncompress-rar.c:(.text+0x728): undefined reference toPpmd7a_RangeDec_Init' /usr/bin/ld: uncompress-rar.c:(.text+0xcbc): undefined reference to Ppmd7a_RangeDec_Init' /usr/bin/ld: uncompress-rar.o: in functionrar_expand': uncompress-rar.c:(.text+0x1b94): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x1e88): undefined reference toPpmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x27b8): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x2818): undefined reference toPpmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x285c): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.o:uncompress-rar.c:(.text+0x286c): more undefined references toPpmd7a_DecodeSymbol' follow collect2: error: ld returned 1 exit status make: *** [Makefile:711: YACReaderLibraryServer] Error 1

The master unarr is at compressed_archive/unarr Toolchain: gcc (GCC) 10.2.0 Architecture: Linux alarm 4.14.180-3-ARCH #1 SMP PREEMPT Sat Jun 5 22:29:47 UTC 2021 armv7l GNU/Linux

selmf commented 2 years ago

That is happening because you are using the latest git version of Unarr which has a new file, lzmasdk/Ppmd7a.c

This is missing from the file list for the embedded Unarr build, so linking fails. You can either add it or you can build and install Unarr as well library, which also should give you better performance.

Am 30. Dezember 2021 18:20:37 MEZ schrieb "Piotr Witosławski" @.***>:

The error message: linking YACReaderLibraryServer /usr/bin/ld: uncompress-rar.o: in function rar_parse_codes': uncompress-rar.c:(.text+0x728): undefined reference toPpmd7a_RangeDec_Init' /usr/bin/ld: uncompress-rar.c:(.text+0xcbc): undefined reference to Ppmd7a_RangeDec_Init' /usr/bin/ld: uncompress-rar.o: in functionrar_expand': uncompress-rar.c:(.text+0x1b94): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x1e88): undefined reference toPpmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x27b8): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x2818): undefined reference toPpmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.c:(.text+0x285c): undefined reference to Ppmd7a_DecodeSymbol' /usr/bin/ld: uncompress-rar.o:uncompress-rar.c:(.text+0x286c): more undefined references toPpmd7a_DecodeSymbol' follow collect2: error: ld returned 1 exit status make: *** [Makefile:711: YACReaderLibraryServer] Error 1

The master unarr is at compressed_archive/unarr Toolchain: gcc (GCC) 10.2.0 Architecture: Linux alarm 4.14.180-3-ARCH #1 SMP PREEMPT Sat Jun 5 22:29:47 UTC 2021 armv7l GNU/Linux

-- Reply to this email directly or view it on GitHub: https://github.com/YACReader/yacreader/issues/293 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

Witos commented 2 years ago

Great! Thanks, it helped. Exactly this patch: diff --git a/compressed_archive/unarr/unarr.pro b/compressed_archive/unarr/unarr.pro index d23c3c19..4a18a937 100644 --- a/compressed_archive/unarr/unarr.pro +++ b/compressed_archive/unarr/unarr.pro @@ -30,6 +30,7 @@ SOURCES+=$$PWD/unarr-master/common/conv.c\ $$PWD/unarr-master/lzmasdk/Ppmd8.c\ $$PWD/unarr-master/lzmasdk/LzmaDec.c\ $$PWD/unarr-master/lzmasdk/Ppmd7Dec.c\

xthursdayx commented 1 year ago

I'm having the same issue when trying to compile for ARM32. Can you tell me how to apply this patch? Thanks!

selmf commented 1 year ago

The simplest way is to just edit compressed_archive/unarr/unarr.pro and add the missing line.

The slightly advanced way is to use the patch tool from the command line to apply the patch. It ain't rocket science and there is a ton of tutorials on the web on how to do that, so I'm not going to explain that here. Just google away and I'm sure you'll find a solution.

Witos commented 1 year ago

Yes, thanks, fixed it already