PongoOS icon indicating copy to clipboard operation
PongoOS copied to clipboard

Ubuntu Build Error : ld: could not process llvm bitcode object file

Open ghost opened this issue 2 years ago • 11 comments

I tried to build PongoOS on ubuntu 22.04 and this error happened : ld: could not process llvm bitcode object file, because /usr/bin/../lib/llvm/libLTO.so could not be loaded file '/tmp/stage3-c42f2a.o' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:99 : build/Pongo] Erreur 1

Here there is the complete return after make command (txt file because long): https://anonfiles.com/u9sdl9x5z0/Pongo_Error_txt If someone can help me it can be great, thanks in advance !

ghost avatar Jun 17 '23 10:06 ghost

Nobody had a solution ?

slayy2357 avatar Jun 22 '23 08:06 slayy2357

You need to build ld64 against the version of clang that you're using. You can use new ld64 with old clang, but not the other way round.

I've been meaning to update the build on the checkra1n repo, but... time.

Siguza avatar Jun 22 '23 20:06 Siguza

Thanks for the reply, i will test this x)

slayy2357 avatar Jun 23 '23 10:06 slayy2357

But can you send me the ld64 repo that i need to build ? I think i don't have found the good repo to build...

slayy2357 avatar Jun 25 '23 14:06 slayy2357

I've been using this: https://github.com/Siguza/ld64

The real work has been done in tpoechtrager/cctools-port though. Unfortunately that hasn't been updated to the latest ld64 source yet, but I'm hoping it'll work on newest LLVM anyway.
I'm planning to clean up the toolchain situation, among many other things, and have prebuilt binaries for arm64 and x86_64 Debian. But it all takes time...

Siguza avatar Jun 26 '23 23:06 Siguza

Thanks, but it was the repo that i have tested so the make command is not working, i got errors... Could you just tell me with which version of llvm you managed to compile it?

slayy2357 avatar Jun 27 '23 16:06 slayy2357

Just for the information and maybe for version-checking. Got exactly the same issue with debian 12, clang version 14.0.6, ld64 530-2, cctools-strip 949.0.1-2.

51mpl1 avatar Jul 09 '23 20:07 51mpl1

Did you found an solution ?

slayy2357 avatar Aug 05 '23 12:08 slayy2357

I had to add LD_LIBRARY_PATH="/usr/lib/llvm-11/lib/" to the commandline for make (before make). Your command may vary depending on the location of your llvm libraries (i.e. a different version will have a different number there, etc.)

polypolyman avatar Sep 17 '23 00:09 polypolyman

Try update your shell command lines , make sure you run root modr

On Sat, Jun 17, 2023, 10:41 AM Slayy @.***> wrote:

I tried to build PongoOS on ubuntu 22.04 and this error happened : ld: could not process llvm bitcode object file, because /usr/bin/../lib/llvm/libLTO.so could not be loaded file '/tmp/stage3-c42f2a.o' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:99 : build/Pongo] Erreur 1

Here there is the complete return after make command (txt file because long): https://anonfiles.com/u9sdl9x5z0/Pongo_Error_txt If someone can help me it can be great, thanks in advance !

— Reply to this email directly, view it on GitHub https://github.com/checkra1n/PongoOS/issues/166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXBJO3PXAG5G43MO7G2AA2LXLWCWPANCNFSM6AAAAAAZKE3XQE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gsmadjaa05 avatar Sep 17 '23 01:09 gsmadjaa05