Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.49k stars 173 forks source link

Add missing fmt lib file #1474

Closed Onek8 closed 12 months ago

Onek8 commented 12 months ago

Ran into a couple issues without it for the armory networking such as /usr/bin/ld: kore_sources.o: in function haxe_crypto_Sha1_make': kore_sources.c:(.text+0x49ea4): undefined reference tofmt_digest'

RobDangerous commented 12 months ago

Wait a minute, that's not right, fmt.c is right there. I reverted your change and changed the existing fmt.c instead.

Onek8 commented 12 months ago

Thank you for your work in making everything khampatible! Hopefully I can be more helpful soon I am still learning. I am currently receiving the same error without the fmt_crypto.c file however it is only one now with your changes to the fmt.c file As a side note the hl kfile is still referencing the crypto file on line 6 project.addFiles('hl/include/mbedtls/library/', 'hl/include/zlib/', 'hl/libs/fmt/fmt_crypto.c', 'hl/libs/fmt/sha1.c', 'hl/libs/ssl/ssl.c');

RobDangerous commented 12 months ago

Not true: https://github.com/Kode/Kha/blob/main/Backends/Kinc-HL/kfile.js#L6

Onek8 commented 12 months ago

How embarrassing :D I didnt reload the page

RobDangerous commented 12 months ago

So what error is left now?

Onek8 commented 12 months ago

..... -static-libgcc -static-libstdc++ -pthread -lasound -ldl -ludev -lGL -lEGL

/usr/bin/ld: kore_sources.o: in function haxe_crypto_Sha1_make': ../haxe/crypto/Sha1.c:20: undefined reference tofmt_digest' /usr/bin/ld: kore_sources.o:(.data.rel+0x2a80): undefined reference to `fmt_digest' collect2: error: ld returned 1 exit status

RobDangerous commented 12 months ago

Can't repro that. Replaced https://github.com/Kha-Samples/Shader/blob/main/Sources/Main.hx#L47 with "i[2] = haxe.crypto.Sha1.make(haxe.io.Bytes.alloc(4)).get(0);" to test it and that compiles fine.

Onek8 commented 12 months ago

Can confirm all is working well! It was mixup between my own project folders, thank you for your patience.