-
Notifications
You must be signed in to change notification settings - Fork 64
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
Missing wide char support for C++ #19
Comments
both are tasks for the lib maintainers... |
But clib2 works with C++ and gcc 5.5 on OS4. Shouldn't it work for 68k then too?
|
no idea - here is a mixture of headers used... |
Do you use the most recent sources of clib2? Because only the latest clib2 can produce wide char libstdc++ support...
|
updated clib2 and added newlib2 - both with wchar support |
Unfortunately, I get lots of errors trying to compile a C++11 project with
|
I modified the include order, maybe it helps here, if not: please share the info how to reproduce. EDIT: never mind - hello-iostream.cpp does produce these errors. |
Btw, how can I reopen this issue then? I don't see where this is possible. |
please retest |
What do I need to enter in order to retest? just "make update"?
|
Safest
But I guess
Should be ok too. The clib2 Makefile does not recognize changes properly. Other modules do better. |
Well, saying
results in an endless loop of the following messages:
I guess I have to delete the build folder and start from scratch... |
try to update manually:
increase the depth as needed. it seems that the loop which should increase the depth does not work. => are you using the cygwin bash shell? |
No, I'm on Linux Mint. Deleting the build directory and building from scratch again gave me a working compiler now and there are only a few errors left, so we're getting there hopefully. Here's what I'm getting with the latest version:
|
please retest. note: at least clean the clib2 folder inside your prefix folder, safest is to run |
Looks like we're getting there. Only one error left in the latest version, namely:
|
added max_align_t to stdint.h.
|
Hmm, when I say "make newlib" it says "make: Nothing to do for target newlib". Also note that I'm using clib2.
|
first |
Oops, sorry, I forgot I have to say "make update -j" first.
|
The general problem is: libstdc++ is compiled for ONE library. Before adding newlib, it was compiled using libnix. Now it's compiled using newlib. And the challenge is to adapt libnix and clib2 to conform with its layouts to be compatible. Thus libnix and clib2 are partially using newlib headers, libnix only provides some own headers, clib2 a lot... |
Ok, but now I get this:
I could probably fix this in the code I'm trying to compile, i.e. by changing |
Which gcc version are used with the other platforms? You could also provide the git url of this project plus Amiga-Gcc build instructions. Then I'm able to check more. |
On AmigaOS 4 and MorphOS I'm using gcc 5. On Linux it's gcc 4.8. Mac OS and Android uses clang and Windows Visual C++. Unfortunately, the project is not on Github but I can send you a tar if you want to check it out... |
I created an example:
And gcc 6.4 complains as m68k-amigaos-gcc 6.4. |
gcc 7.3 is complaining too => I would fix it in the code - somehow. Create an enum ColorType for COLORTYPE_TRANSPARENT and so then change the 2nd ct to CFX_Color(ColorType type = COLORTYPE_TRANSPARENT, |
IMHO this issue is resolved. |
I've tested with linux gcc 6.4 and 7.3 and both do complain. I won't fix this. |
FWIW, I've also tested it on gcc 7.3 now and it compiles just fine so it must be a problem that is specific to amiga-gcc and not to gcc... |
Well, you tested your little demo source but not my full blown project :) As I said, compiles fine on gcc 7.3 and gcc 6.3 for Linux and errors out on amiga-gcc 6.4... |
maybe a future merge with upstream will fix this. Since I did not touch the c++ parser, I won't act here. |
IMHO it is rather related to some messed up includes. Just take a look at the first error: It seems to be confused when |
please attach the preprocess file (use -E instead of -c) - also mail me the mentioned archive. |
You've got mail. |
got it and there is progress until it's hitting clib2's dirent structure ^^ |
Yes, that's normal. You can just comment out the dirent stuff. It's not working on OS4 either because of clib2's incompleteness. If it compiles everything except the dirent stuff it would be great!
|
core/fxcrt/fx_stream.cpp143:
next: |
all changes are live - good luck |
Thanks, we're almost there I guess. Just extend the
I guess this needs your attention one more time... |
I pushed the gcc fix to the build system, if tests are passed, the change is live in ~15 mins. make finishes now:
|
Hmm, I made a fresh rebuild but it still shows the error shown above. Maybe the change isn't live yet... I'll try again tomorrow :) |
gcc version 6.4.1b 20180603-213430 (GCC) |
Alright, I had an older version but now I'm on the latest one and it compiles through. On linking, however, I now get the following error:
Google says that this error means that I should link against |
the provided makefile does not link^^ do I need an update? |
You've got mail.
|
I've found a new error. Enabling 68020 + 68881 results in this error:
|
please test |
Thanks, that fixes it. The resulting executable basically works but for some PDF pages the whole program terminates with the following error printed to the console: "Abnormal program termination". Do you know what could be causing this? |
This is printed by
set a debugger breakpoint on __print_termination and check the stack for function addresses to identify the caller. |
How can I do that? Isn't that only possible with gdb which we don't have for OS3 68k? |
I'm using DBug from O.M.A. but barfly should work too. |
I don't have O.M.A. but I could try Barfly. Do I have to compile with |
|
Ok, I've tried to link with
However, when I now start the host program that communicates with the program started through BDebug, the system locks up completely. Any idea what could be causing this? |
I need some basic wide char functions in my C++11 project. The wide char functions that Sebastian has recently added to clib2 are already sufficient for my purposes. But I'm unable to use them with m68k-amigaos-gcc because C++ is only supported for libnix.
Thus, to give us basic wide char support one of the following things should be implemented:
or
Thanks!
The text was updated successfully, but these errors were encountered: