Closed damnms closed 3 years ago
Looks like your cross compilation setup isn't correct. Did you follow the instructions https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Installation_Instructions/Linux-Installation-Instructions.md ?
yes i did, and iirc it was working with fedora 34, so it might be a problem with fedora's cross compile package, but i am not sure.
https://wiki.osdev.org/GCC_Cross-Compiler
ld: cannot find -lgcc
You specified that you want to link the GCC low-level runtime library into your executable through the -lgcc' switch, but forgot to build and properly install the library.
If you got no warnings or errors while installing libgcc and you still have problems you can copy the library in your project and link it with -L. -lgcc
The libgcc is at $PREFIX/lib/gcc/$TARGET/<gcc-version>/libgcc.a .
I doubt its a pm3 source code issue. Could be that Fedora35 needs another instruction how to setup its dev-env...
Quite a rabbit hole because there are issues to get Fedora 35 running in Docker but the "good" news is that I managed to get a Fedora 35 running in my Docker and I could reproduce the bug. I suspect a missing cross-compiler library, still investigating...
Hmm there seems to be no arm-none-eabi libgcc.a packaged for Fedora 35, even in another package. In comparison, the same arm-none-eabi-gcc package from Archlinux (https://archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/) contains properly the libgcc.a so it seems to be more a problem of Fedora than a problem of recent arm-none-eabi versions. What you can do, as a workaround, is to take the libgcc.a from Arch. I tested it, using libgcc.a from v11.2 and compiling the fw with Fedora gcc 11.1, flashing, it didn't brick my proxmark but still be prudent and avoid touching the bootrom if not needed.
usr/lib/gcc/arm-none-eabi/11.2.0/libgcc.a
to proxmark3 common_arm/
Apply this change:
+++ b/common_arm/Makefile.common
@@ -92,7 +92,7 @@ CROSS_CFLAGS ?= $(DEFCFLAGS)
CROSS_CFLAGS += $(ARMCFLAGS) -c $(INCLUDE) -std=c99 -DON_DEVICE $(APP_CFLAGS)
CROSS_LDFLAGS += -nostartfiles -nodefaultlibs -Wl,-gc-sections -Wl,--build-id=none -n
-LIBS = -lgcc
+LIBS = -L ../common_arm -lgcc
BTW someone opened a bugreport on Fedora for that : https://bugzilla.redhat.com/show_bug.cgi?id=2010474
Feel free to provide extra information, I won't create an account on Redhat Bugzolla myself.
arm-none-eabi-gcc-cs-11.1.0-0.fc35.x86_64.rpm
is missing all the usual target binary libs & stubs.
Easy to see:
arm-none-eabi-gcc-cs-11.1.0-0.fc35.x86_64.rpm
26Mbarm-none-eabi-gcc-cs-10.2.0-4.fc34.x86_64.rpm
173Mbthat someone was me, forgot to mention that bugreport, my bad.
many thanks for your effort, i really appreciate that! i will try that workaround later that day and update the fedora bugreport, thanks!!
edit: can confirm that workaround worked like a charm, again many thanks for your great help :)
its not possible to build proxmark client for fedora 35
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior that everything compiles fine
Screenshots
Desktop (please complete the following information):
hw version
hw status [usb] pm3 --> hw status [#] Memory [#] BigBuf_size............. 42368 [#] Available memory........ 42368 [#] Tracing [#] tracing ................ 1 [#] traceLen ............... 0 [#] Current FPGA image [#] mode.................... HF image built for 2s30vq100 on 2020-07-08 at 23:08:19 [#] Flash memory [#] Baudrate................ 24 MHz [#] Init.................... OK [#] Memory size............. 2 mbits / 256 kb [#] Unique ID............... 0xD5690C23DF8E3E2A [#] Smart card module (ISO 7816) [#] version................. v3.10 [#] LF Sampling config [#] [q] divisor............. 95 ( 125.00 kHz ) [#] [b] bits per sample..... 8 [#] [d] decimation.......... 1 [#] [a] averaging........... yes [#] [t] trigger threshold... 0 [#] [s] samples to skip..... 0 [#] LF Sampling Stack [#] Max stack usage......... 3944 / 8480 bytes [#] LF T55XX config [#] [r] [a] [b] [c] [d] [e] [f] [g] [#] mode |start|write|write|write| read|write|write [#] | gap | gap | 0 | 1 | gap | 2 | 3 [#] ---------------------------+-----+-----+-----+-----+-----+-----+------ [#] fixed bit length (default) | 29 | 17 | 15 | 47 | 15 | N/A | N/A | [#] long leading reference | 29 | 17 | 18 | 50 | 15 | N/A | N/A | [#] leading zero | 29 | 17 | 18 | 40 | 15 | N/A | N/A | [#] 1 of 4 coding reference | 29 | 17 | 15 | 31 | 15 | 47 | 63 | [#] [#] HF 14a config [#] [a] Anticol override.... std ( follow standard ) [#] [b] BCC override........ std ( follow standard ) [#] [2] CL2 override........ std ( follow standard ) [#] [3] CL3 override........ std ( follow standard ) [#] [r] RATS override....... std ( follow standard ) [#] Transfer Speed [#] Sending packets to client... [#] Time elapsed................... 503ms [#] Bytes transferred.............. 79872 [#] Transfer Speed PM3 -> Client... 158791 bytes/s [#] Various [#] Max stack usage......... 4088 / 8480 bytes [#] Debug log level......... 1 ( error ) [#] ToSendMax............... -1 [#] ToSend BUFFERSIZE....... 2308 [#] Slow clock.............. 30001 Hz [#] Installed StandAlone Mode [#] HF - Reading Visa cards & Emulating a Visa MSD Transaction(ISO14443) - (Salvador Mendoza) [#] Flash memory dictionary loaded [#] Mifare.................. 1142 keys [#] T55x7................... 119 keys [#] iClass.................. 10 keys [#]
data tune
(*) Q factor must be measured without tag on the antenna
[+] Displaying LF tuning graph. Divisor 88 (blue) is 134,83 kHz, 95 (red) is 125,00 kHz.