Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
94 user(s) are online (86 user(s) are browsing Forums)

Members: 0
Guests: 94

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 11 12 13 (14) 15 16 17 ... 21 »
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@elfpipe

In case it's because of GCC and/or binutils changes just make sure old software using shared objects still works, the most complex ones using shared objects are probably
http://os4depot.net/?function=showfil ... /qt-amicygnix-user.tar.gz
and
http://os4depot.net/?function=showfil ... browser/owb_blastoise.lha

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@joerg

I have now tested OWN Blastoise. It fails, but this is probably due to the missing dependencies in libstdc++.so mentioned by afxgroup.

@afxgroup

Do you have an idea how to fix this?

Go to top
Re: Qt 6 progress
Amigans Defender
Amigans Defender


See User information
well, that means that it isn't find libstdc++.so. So most probably you should put gcc4 (iirc owb blastoise was compiled with it) in the same OWB dir.

regard my issue we are working on it. Basically we are changed all .so libs creation under adtools to use -use-dynld because at moment everything is linked against .a files and it is an error

i'm really tired...
Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup

I can confirm, that OWB Blastoise still works, if libstdc++.so is replaced by an older version.

Quote:
regard my issue we are working on it. Basically we are changed all .so libs creation under adtools to use -use-dynld because at moment everything is linked against .a files and it is an error


That sounds sensible. Looking forward to see the result.

Go to top
Re: Qt 6 progress
Just popping in
Just popping in


See User information
@elfpipe

That's great progress. Nothing is stopping you to continue with QT6, or?

I think the solution from you performing de/constructors resolving in the elf library, without we need for the __shlib_call_de-/constructors in the c library is right solution. With this solution sobjs can be realized transparent to the used c library.

BTW, i ruined my setup with misspelled entry in the Kicklayout file, without having a USB rescue stick , and the 4.1 FE iso has no recent version of the gfx driver, .... But i can boot again. Now i have only somehow a corrupted filesystem

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@MigthyMax
Quote:
BTW, i ruined my setup with misspelled entry in the Kicklayout file
You should always have (at least) 2 kickstart entries in your Kicklayout file, and a copy of the SYS:Kickstart dir for it, for example in SYS:Kickstart/failsafe:
- The one currently used (default).
- An old one using known working versions of the kickstart files (using the kickstart modules in SYS:Kickstart/failsafe instead of the SYS:Kickstart ones).
That way you can always boot and fix possible problems, not only in case of a misspelled entry, but for example in case a new version of a kickstart module doesn't work as well, which is a more common problem.

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@MigthyMax

Quote:
That's great progress. Nothing is stopping you to continue with QT6, or?


Well... There seems to be more issues with dynamic linking. Some ui functions are off, and they used to work, even with dynamic link. So I am off to try a different compiler version (most likely gcc 11) and reconfigure my Qt6 setup.

One thing : I have a suspicion, that something is off with the

Quote:
__attribute__((section))


tag in gcc. If someone can come up with a test and/or solution, it will be rewarded.

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@elfpipe
Quote:

One thing : I have a suspicion, that something is off with the

Quote:
__attribute__((section))

tag in gcc. If someone can come up with a test and/or solution, it will be rewarded.
No idea if something is wrong in current GCC versions, but it used to work in GCC 2.95.x and 3.4.x.
To check if it still works use something like
__attribute__((section("foobar"))) int foobar = 1;
and either check the assembler output (GCC -S foobar.c -o foobar.s), or readelf on the object file.

Go to top
Re: Qt 6 progress
Just popping in
Just popping in


See User information
@elfpipe

Just out of curiosity, TLS (ThreadLocalStorage) isn't required/needed by QT 6?

@joerg

I don't really know, but my personal feeling is that binutils are more broken currently as the gcc, compared to the old working gcc/binutils version.

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup
Quote:
Basically we are changed all .so libs creation under adtools to use -use-dynld because at moment everything is linked against .a files and it is an error
Unless I'm mixing something, or something changed in recent GCC/binutils versions, that's wrong and can't work.
-use-dynld is for linking executables using shared objects only, crtbegin.o and crtend.o are used for linking.
To create shared objects you have to use something like "gcc -shared foo.o bar.o ... -llibabc -llibxyz -olibfoobar.so" instead which will link with shcrtbegin and shcrtend.o instead. The code in shcrtbegin.o calls the constructor/destructor functions in the shared object.

Go to top
Re: Qt 6 progress
Amigans Defender
Amigans Defender


See User information
@joerg

Yes. This is another problem we found. In .so creation for clib2 crtbegin/end is used instead of shrtbegin/end and we we'll fix also this.
And the main problem is that _init function is called inside the program and instead of loading that one in libc.so it is calling that one present (and is wrong) in the exe file. So the constructors are not called and (for example) libstdc++.so crash because files are not opened.
It is more easy to see that to explain..

i'm really tired...
Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@MigthyMax

Quote:
Just out of curiosity, TLS (ThreadLocalStorage) isn't required/needed by QT 6?


Qt has some form of tls, but I don't know enough on the subject to give you the details.

EDIT : Qt6 has some problem with threading at the moment. Apparently thread.wait() is called on the main thread, which is not good. I have troubles understanding, how this could be connected to dynamic vs. static linking. It works on static.

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup

Quote:
And the main problem is that _init function is called inside the program and instead of loading that one in libc.so it is calling that one present (and is wrong) in the exe file. So the constructors are not called and (for example) libstdc++.so crash because files are not opened.


Please make sure, that you update elf.library before testing this. In the new version, the correct constructors should be called from the entries in the .ctors section, and there should be no need to double it. I'm not sure, if calling a constructor twice could be a problem (Qt does this), but better to make sure.

The latest version of elf.library is 53.37.

Are you planning on a new release of adtools? If you get there, please let me know.

Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup
Quote:
Yes. This is another problem we found. In .so creation for clib2 crtbegin/end is used instead of shrtbegin/end and we we'll fix also this.
And the main problem is that _init function is called inside the program and instead of loading that one in libc.so it is calling that one present (and is wrong) in the exe file. So the constructors are not called and (for example) libstdc++.so crash because files are not opened.
It is more easy to see that to explain..
Looks like the specs file wasn't update to support shared objects with clib2.
You need an entry for -use-dynld linking using crtbegin.o (with the _start() function setting up argv[], interfaces, etc. and calling IElf->InitSHLibs(elfhandle, TRUE), main(), and IElf->InitSHLibs(elfhandle, FALSE)) and crtend.o and an entry for -shared linking using shcrtbegin.o (with the __shlib_call_constructors() and __shlib_call_destructors() functions) and shcrtend.o instead.
Simply adding/updating the missing clib2 parts using the newlib ones should work.


Edited by joerg on 2023/2/1 15:20:30
Edited by joerg on 2023/2/1 15:20:51
Go to top
Re: Qt 6 progress
Amigans Defender
Amigans Defender


See User information
It is working in this way. Except for adtools part that needs to be fixed. I've made some changes in my source (for example that oune you are wrote) but there are others things to do..

i'm really tired...
Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup
You don't need to update adtools for changing the specs, if no specs file is included in current versions you can use "gcc -dumpspecs > specs" to get the internal one.
I don't remember in which gcc directory it has to be stored, though.

Go to top
Re: Qt 6 progress
Amigans Defender
Amigans Defender


See User information
Yes. There is also a spec file on github with my changes but .so libraries in adtools are not created with -use-dynld. I think that there is something different to change somewhere

i'm really tired...
Go to top
Re: Qt 6 progress
Just can't stay away
Just can't stay away


See User information
@afxgroup
.so Libraries must not be created with -use-dynld but with -shared, just like on Linux/BSD/etc.

Go to top
Re: Qt 6 progress
Amigans Defender
Amigans Defender


See User information
but if you use only -shared they are not linked against libc.so or libgcc.so. So the problem persists

i'm really tired...
Go to top
Re: Qt 6 progress
Quite a regular
Quite a regular


See User information
Building ADTOOLS (master [https://github.com/sba1/adtools.git], gcc 11, binutils 2.23.2, EXP_CLIB2=1 CLIB2_SHA1=beta8)
===

After completion of the build I ran:
    > 
find . -name "libstdc++.so"
        
./gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src/.libs/libstdc++.so
        
./gcc-cross-build-11.3.0/ppc-amigaos/libstdc++-v3/src/.libs/libstdc++.so

Creation of "libstdc++.so" (NEWLIB):

libtoollink:  /home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/./gcc/xgcc
-shared-libgcc
-B/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/./gcc
-nostdinc++
-
L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/libstdc++-v3/src
-L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/libstdc++-v3/src/.libs
-L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/libstdc++-v3/libsupc++/.libs
-B/home/rjd/projects/adtools_gcc11/ppc-amigaos/bin/
-
B/home/rjd/projects/adtools_gcc11/ppc-amigaos/lib/
-
isystem /home/rjd/projects/adtools_gcc11/ppc-amigaos/include
-
isystem /home/rjd/projects/adtools_gcc11/ppc-amigaos/sys-include
-
fPIC
-DPIC
-D_GLIBCXX_SHARED
-shared
-nostdlib
/home/rjd/projects/adtools_gcc11/ppc-amigaos/SDK/newlib/lib/shcrtbegin.o
.libs/compatibility.o
.libs/compatibility-debug_list.o
.libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o
.libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o
.libs/compatibility-chrono.o
.libs/compatibility-condvar.o
-Wl,--whole-archive
../libsupc++/.libs/libsupc++convenience.a
../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/libc++11convenience.a
../src/c++17/.libs/libc++17convenience.a
../src/c++20/.libs/libc++20convenience.a
-Wl,--no-whole-archive
/home/rjd/projects/adtools_gcc11/ppc-amigaos/SDK/newlib/lib/shcrtend.o
-Wl,-O1
-Wl,-z
-Wl,relro
-Wl,--gc-sections
-Wl,-soname
-Wl,libstdc++.so
-.libs/libstdc++.so

Creation of "libstdc++.so" (CLIB2):

libtoollink: /home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/./gcc/xgcc
-shared-libgcc
-B/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/./gcc
-nostdinc++
-
L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src
-L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src/.libs
-L/home/rjd/projects/rjd_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/libsupc++/.libs
-B/home/rjd/projects/adtools_gcc11/ppc-amigaos/bin/
-
B/home/rjd/projects/adtools_gcc11/ppc-amigaos/lib/
-
isystem /home/rjd/projects/adtools_gcc11/ppc-amigaos/include
-
isystem /home/rjd/projects/adtools_gcc11/ppc-amigaos/sys-include
-
mcrt=clib2
-fPIC
-DPIC
-D_GLIBCXX_SHARED
-shared
-nostdlib
/home/rjd/projects/adtools_gcc11/ppc-amigaos/SDK/clib2/lib/crtbegin.o
/home/rjd/projects/adtools_gcc11/ppc-amigaos/SDK/clib2/lib/crt0.o
.libs/compatibility.o
.libs/compatibility-debug_list.o
.libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o
.libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o
.libs/compatibility-chrono.o
.libs/compatibility-condvar.o
-Wl,--whole-archive
../libsupc++/.libs/libsupc++convenience.a
../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/libc++11convenience.a
../src/c++17/.libs/libc++17convenience.a
../src/c++20/.libs/libc++20convenience.a
-Wl,--no-whole-archive
/home/rjd/projects/adtools_gcc11/ppc-amigaos/SDK/clib2/lib/crtend.o
-mcrt=clib2
-Wl,-O1
-Wl,-z
-Wl,relro
-Wl,--gc-sections
-mcrt=clib2
-Wl,-soname
-Wl,libstdc++.so
-.libs/libstdc++.so


There are the current flags used when creating the std c++ library.

Implicitly, the library is linked with the c library (and gcc etc), right? So to do that you would still need to use -use-dynld?

I will finally get around to making the change in adtools in the coming days so that:

- for creating shared, also use -use-dynld
- link with shcrtbegin/shcrtend for clib2

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post
« 1 ... 11 12 13 (14) 15 16 17 ... 21 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project