Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native: Linker (ld) breaks shared indices(?) #21

Open
raziel- opened this issue Jan 16, 2024 · 23 comments
Open

Native: Linker (ld) breaks shared indices(?) #21

raziel- opened this issue Jan 16, 2024 · 23 comments

Comments

@raziel-
Copy link

raziel- commented Jan 16, 2024

So, i tested a full ScummVM build with binutils 2.40 and while it compiles fines it somehow breaks at linker stage:

LINK scummvm
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 4 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 5 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 6 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 7 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 3 (>= sh_info of 2)

The binary gets linked, but always ISI crashes

@migthymax
Copy link
Member

Is this still a bug in binutils, or is that a bug, which was in ScummVM as mention here from you (and fixed in ScummVM):
https://www.amigans.net/modules/newbb/viewtopic.php?post_id=150415#forumpost150415

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

It is still a bug with the 2.40 ld

I still get LINK scummvm
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 3 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 4 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 5 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 6 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 7 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 2 (>= sh_info of 2)
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 3 (>= sh_info of 2)

This is what i used to compile the scummvm code (latest snapshot from today)

sh ./configure --enable-release --enable-plugins --disable-detection-full --disable-all-engines

You don't need to compile any engines, as the main program link will already bring up the errors

@migthymax
Copy link
Member

migthymax commented Sep 9, 2024 via email

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

zoinks...

Die Welt ist ein Dorf 😀

Lass dir Zeit, hab nur noch heute am miggy die Möglichkeit was zu tun, dann wieder Arbeit.

Im November hab ich Urlaub, also bis dahin wär schon cool...

...und clib4 wär schon auch was...aber eins nach dem anderen...

Grüße zurück aus dem südlichsten Bayern

@migthymax
Copy link
Member

Ja genau. Dachte die eMail geht nur an dich und wird hier nicht mit aufgenommen, so zurück auf english ;-)

Would it be possible to get the serial debug output when the crash happen even with enabled @setenv ELF.Debug 1@?
Because google for the error, it only seems to be a warning https://stackoverflow.com/questions/59915966/unknown-gcc-linker-error-but-builds-sucessfully

Could be that our elf loader doesn't like warnings like these.

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

which crash?

the one from the binary that was built with those warnings in place?

i could provide such, but I'm not sure it would help...at least the scummvm devs always tell me the crash logs hold no usable information and the culprits it points at were nearly always wrong in the end.

I've never heard of such a flag, where do i put/use it?

@migthymax
Copy link
Member

If you ran scummvm from the shell just before that enter:

SetEnv ELF.Debug 1

Than on the serial port, the elf.library will send debug output, and even the crash of the ScummVM should appear there. Maybe compile ScummVm with -gstabs will give additional information about where the crash happens. If you don't have the output of the serial port captured by another computer, you need to use Sashimi (I think that's the name) to redirect the output to a shell.

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

kk, give me a sec

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

it goes on and on and on printing stuff on serial...the log will be dozens of megabytes if not more and it hasnt even crashed yet...you sure you want the log (if it ever stops that is)

@migthymax
Copy link
Member

Of course. zip it and attached it here. If n ot possible, because of size limit, send it via wetranser, and copy the wetransfer link here.

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

https://gofile.me/7rpRB/2epHDYOUE

Here you go, roughly 75 MB

@raziel-
Copy link
Author

raziel- commented Sep 9, 2024

forgot to add...this is the debug build of scummvm running (-gstabs) and i waited for the crash to happen (dunno how much time went by after that where it simply recorded the ELF noise...because i was doing something else ;-)

@raziel-
Copy link
Author

raziel- commented Nov 2, 2024

anyone git a chance to look at this yet?

just curious...
reason: a lot of possible spare time :-)

@migthymax
Copy link
Member

Sorry for the late response. I had a look, and I even say all the loading of the sobjs, but no "stacktrace" or something similar.

Nice that you got a lot of spare time :-) If you want you can compile scrummvm with debug information:
-gstabs -fnoomit-frame-pointer (Hope I spelled they correctly) and share the executable with me.

@raziel-
Copy link
Author

raziel- commented Nov 3, 2024

here you go
scummvm-debug.zip or .lha

built with -g -gstabs -fno-omit-frame-pointer

sobjs/ inside

@migthymax
Copy link
Member

I'm tried no several times to download it. But probably I was too late ;-)
Can you provide a update link?

@raziel-
Copy link
Author

raziel- commented Nov 8, 2024

yes, sorry.

my router is down...I'll give you a nudge once it's back up

@raziel-
Copy link
Author

raziel- commented Nov 12, 2024

@migthymax
Copy link
Member

@raziel-

The link works, but that's only the log. How about the scummvm-debug.zip or .lha, can your provide that too?

@raziel-
Copy link
Author

raziel- commented Nov 13, 2024

wrong directory, it's up now, same link

@migthymax
Copy link
Member

@raziel-

Still only getting the putty.log as download.

@raziel-
Copy link
Author

raziel- commented Nov 14, 2024

@migthymax

https://gofile.me/7rpRB/5ibAWHnaJ

truly, sorry, i only shared the file...try now with this link

@migthymax
Copy link
Member

Worked, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants