error in quickbms src 0.11.0 compilation for arch linux

Programming related discussions related to game research
Garo
Posts: 20
Joined: Wed Nov 18, 2020 5:54 pm

error in quickbms src 0.11.0 compilation for arch linux

Post by Garo »

i installed some libs like mcrypt and capstone, and also removed the -m32 flag from the makefile because im using a x64 machine. after doing all that and running make, i get a whole bunch of errors like "/usr/bin/ld: quickbms.c:(.text+0x4bcfa): undefined reference to `__ashrdi3'

actually ill just show all the messages

/usr/bin/ld: /tmp/ccT0oDIh.o: in function `os_tmpname':
loslib.c:(.text+0x1e6): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /tmp/ccRp7lSc.o: in function `TCC_libtcc_symbols':
quickbms.c:(.text+0x4bce7): undefined reference to `__ashldi3'
/usr/bin/ld: quickbms.c:(.text+0x4bcfa): undefined reference to `__ashrdi3'
/usr/bin/ld: quickbms.c:(.text+0x4bd0d): undefined reference to `__divdi3'
/usr/bin/ld: quickbms.c:(.text+0x4bd20): undefined reference to `__lshrdi3'
/usr/bin/ld: quickbms.c:(.text+0x4bd33): undefined reference to `__moddi3'
/usr/bin/ld: quickbms.c:(.text+0x4bd46): undefined reference to `__udivdi3'
/usr/bin/ld: quickbms.c:(.text+0x4bd59): undefined reference to `__umoddi3'
/usr/bin/ld: /tmp/ccRp7lSc.o: in function `perform_compression':
quickbms.c:(.text+0x62d3d): undefined reference to `packfire'
/usr/bin/ld: quickbms.c:(.text+0x62da0): undefined reference to `DMSUNP'
/usr/bin/ld: quickbms.c:(.text+0x62dee): undefined reference to `LhDecode'
/usr/bin/ld: quickbms.c:(.text+0x62e21): undefined reference to `UTSQ80'
/usr/bin/ld: quickbms.c:(.text+0x62e54): undefined reference to `UTSQ61'
/usr/bin/ld: quickbms.c:(.text+0x65916): undefined reference to `crunchmania_FastDecruncherHuff'
/usr/bin/ld: quickbms.c:(.text+0x65961): undefined reference to `crunchmania_FastDecruncher'
/usr/bin/ld: quickbms.c:(.text+0x659a6): undefined reference to `UCRMAS'
/usr/bin/ld: quickbms.c:(.text+0x659ee): undefined reference to `stonecracker403'
/usr/bin/ld: quickbms.c:(.text+0x65a49): undefined reference to `stonecracker3'
/usr/bin/ld: quickbms.c:(.text+0x65ab1): undefined reference to `stonecracker2'
/usr/bin/ld: quickbms.c:(.text+0x65b1b): undefined reference to `pp_DecrunchBuffer'
/usr/bin/ld: quickbms.c:(.text+0x65b64): undefined reference to `crunchmania_17b'
/usr/bin/ld: quickbms.c:(.text+0x65bbd): undefined reference to `ByteKiller2'
/usr/bin/ld: quickbms.c:(.text+0x65c39): undefined reference to `DeCr00'
/usr/bin/ld: quickbms.c:(.text+0x65cb5): undefined reference to `UPHD'
/usr/bin/ld: quickbms.c:(.text+0x65d21): undefined reference to `UPCOMP'
/usr/bin/ld: quickbms.c:(.text+0x65d68): undefined reference to `ISC3P'
/usr/bin/ld: quickbms.c:(.text+0x65daf): undefined reference to `ISC2P'
/usr/bin/ld: quickbms.c:(.text+0x65df6): undefined reference to `ISC1P'
/usr/bin/ld: quickbms.c:(.text+0x65e56): undefined reference to `IAMATM'
/usr/bin/ld: quickbms.c:(.text+0x65eb3): undefined reference to `IAMICE'
/usr/bin/ld: quickbms.c:(.text+0x65ef7): undefined reference to `UFLSP'
/usr/bin/ld: quickbms.c:(.text+0x65f47): undefined reference to `BYTUNP'
/usr/bin/ld: quickbms.c:(.text+0x6630c): undefined reference to `UTETR'
/usr/bin/ld: quickbms.c:(.text+0x66353): undefined reference to `USPIKE'
/usr/bin/ld: quickbms.c:(.text+0x6639a): undefined reference to `PACIT'
/usr/bin/ld: quickbms.c:(.text+0x663e1): undefined reference to `UMEGA'
/usr/bin/ld: quickbms.c:(.text+0x66424): undefined reference to `MAX12'
/usr/bin/ld: quickbms.c:(.text+0x66467): undefined reference to `UMAST31'
/usr/bin/ld: quickbms.c:(.text+0x664ad): undefined reference to `LIGHT15'
/usr/bin/ld: quickbms.c:(.text+0x66508): undefined reference to `UNDIMP'
/usr/bin/ld: quickbms.c:(.text+0x6654d): undefined reference to `TRY101'
/usr/bin/ld: quickbms.c:(.text+0x66592): undefined reference to `time_decrunch'
/usr/bin/ld: quickbms.c:(.text+0x665d8): undefined reference to `UTUC'
/usr/bin/ld: quickbms.c:(.text+0x6cbcd): undefined reference to `UCMAT'
/usr/bin/ld: /tmp/ccRp7lSc.o: in function `amiga_unsquash':
quickbms.c:(.text+0x2ad5a): undefined reference to `UnSquash'
collect2: error: ld returned 1 exit status
make: *** [Makefile:54: all] Error 1

thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: error in quickbms src 0.11.0 compilation for arch linux

Post by aluigi »

They were mentioned in a couple of other posts somewhere in the "Help with QuickBMS" section.
In short the first set of error is in src/utils.c in the TCC_libtcc_symbols function (the part dedicated libtcc.a), you can just delete/comment that part.

While the second set of errors is related to the Amiga code, try commenting that whole part in perform.c starting from AMIGA_UNSQUASH to AMIGA_PACKFIRE (the one withing the #if branch).