Pelles C forum

Pelles C => General discussions => Topic started by: Jokaste on June 12, 2018, 09:55:11 AM

Title: Internal error
Post by: Jokaste on June 12, 2018, 09:55:11 AM
When compiling LZMA SDK (7Zip SDK) I egt an internal error.
This SDK can be dowloaded at [size=78%]https://7-zip.org/sdk.html (https://7-zip.org/sdk.html)[/size]
Title: Re: Internal error
Post by: TimoVJL on June 12, 2018, 05:21:13 PM
PellesC 9 x64 optimized speed:
7zArcIn.c(331): fatal error: Internal error: spill_at_range().
Title: Re: Internal error
Post by: Jokaste on June 12, 2018, 06:15:06 PM
I have used new variables to store intermediates results but no success.
In this project you have to add #include <intrin.h> and replace Memory.h with string.h
I set /MT too, for __cpuid
With the version 8 of Pelle's it did not like alloca, with this version no problem.
Programs generated with the new version seem to be faster than those made with version 8.0.
The ide editor has been improved and scrolling is easier. :-*
Clean project is welcome and useful.
The version changer does not work.
Is it possible to have a tool that reads a unix makefile and create a windows project?
Idem with MS .DSP files.
I use Pelle's compiler and assembler every day, they are the best tools for me.
For the instant, COULD YOU MAKE THE DEBUGGER RUNNING JUST FOR ME, MISTER PELLE? :) :) :) :) :) :)
Title: Re: Internal error
Post by: Pelle on June 13, 2018, 06:07:20 PM
I set /MT too, for __cpuid
Well, __cpuid is the Microsoft spelling, so /Ze (Enable Microsoft extensions) seems more appropriate...

The version changer does not work.
Not sure which version changer we are talking about -- some add-in?

Is it possible to have a tool that reads a unix makefile and create a windows project?
Sure. Someone can write an add-in...  ;)

For the instant, COULD YOU MAKE THE DEBUGGER RUNNING JUST FOR ME, MISTER PELLE? :) :) :) :) :) :)
Well, it works here. Apparently on some other peoples computers as well. I think you have to provide more info, or even better: a sample project.
Title: Re: Internal error
Post by: Pelle on June 13, 2018, 06:08:35 PM
PellesC 9 x64 optimized speed:
7zArcIn.c(331): fatal error: Internal error: spill_at_range().
Thanks. I will try to reproduce...
Title: Re: Internal error
Post by: Jokaste on June 13, 2018, 09:44:07 PM
Here is my project.
MS extensions are activated
When I launch the debugger it tells :

Error reading from file
Problem loading debug information


The only bad message I have during compiling are :

- - - - - - - - - - Chloe.exe
Building Chloe.exe.
Writing debug information
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfl.lib(libgfl340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfl.lib(libgfl340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfle.lib(libgfle340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfle.lib(libgfle340.dll)'; ignored.
Compacting debug information
Done.

libgfl comes from XnView. i use it since many years. It can be found at https://www.xnview.com/fr/ (https://www.xnview.com/fr/)
Title: Re: Internal error
Post by: TimoVJL on June 13, 2018, 10:06:23 PM
\forum\Jokaste\Includes.h(4): fatal error #1035: Can't find include file "MaxStruct.h".

This one ?
http://download.xnview.com/GflSDK-win.zip
Title: Re: Internal error
Post by: Jokaste on June 13, 2018, 11:19:56 PM
Yes.
I join all the workspace except ZipLibrary (I don't use it).
Title: Re: Internal error
Post by: Pelle on June 14, 2018, 07:55:17 PM
The only bad message I have during compiling are :
Writing debug information
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfl.lib(libgfl340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfl.lib(libgfl340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfle.lib(libgfle340.dll)'; ignored.
POLINK: warning: Unrecognized signature of debug symbols in object 'libgfle.lib(libgfle340.dll)'; ignored.
Compacting debug information
I have looked at the lib files, like libgfle.lib, and there is no useful debug info to be found. Only info about which Microsoft tool was used to create these files. This is enough to fool the linker into thinking there is some debug info to use, but there isn't.

Since Microsoft CodeView debug info was removed in Pelles C version 9.0, you get warnings about "Unrecognized signature of debug symbols". Again, this info only names the Microsoft tools used, so nothing would really change even if CodeView debug info was still supported.

If you don't compile any of your own source code with (Pelles C) debug info, it's possible the whole debug info area is empty. This could explain why you have problems loading the debug info. If so, I'm not going to do anything about it since this case is too uncommon.
Title: Re: Internal error
Post by: Pelle on June 14, 2018, 08:13:51 PM
I set /MT too, for __cpuid
About this:

There is a check in CpuArch.c
Code: [Select]
#if !defined(USE_ASM) && _MSC_VER >= 1500
#include <intrin.h>
#endif
which must be changed.

For compatibility reasons (which may change in the future), Pelles C will report version 1100 for _MSC_VER when the /Ze option is used. The file intrin.h will never be included unless this is changed.

Not sure this is the best way, but maybe something like this:
Code: [Select]
#if !defined(USE_ASM) && (_MSC_VER >= 1500 || defined(__POCC__))
#include <intrin.h>
#endif


Title: Re: Internal error
Post by: Jokaste on June 14, 2018, 08:46:23 PM
Quote
If you don't compile any of your own source code with (Pelles C) debug info, it's possible the whole debug info area is empty. This could explain why you have problems loading the debug info. If so, I'm not going to do anything about it since this case is too uncommon.


There are only assembler files that I don't compile with debug info because I know they are good.

Quote
For compatibility reasons (which may change in the future), Pelles C will report version 1100 for _MSC_VER when the /Ze option is used. The file intrin.h will never be included unless this is changed.

Ok I will do that.

I make the test and I get you the result

Thanks.
Title: Re: Internal error
Post by: Jokaste on June 16, 2018, 07:02:07 AM
All my files are compiles with Pelles C and PoAsm.
I have found the problem.
Into my project ther are C and ASM files.
They all are compiled using DEBUG directives
This kind of project can't be used into the debugger.


If I replace ASM files with C files I can use the debugger
Title: Re: Internal error
Post by: Jokaste on June 16, 2018, 03:34:46 PM
The goal of this project is to display asteroids orbits. See the graph atteched to this post. I must create bitmaps of 7 000 x 7 000 pixels! My pc only has 2Gb of RAM! I need the program is fast and don't consume too much memory.
Title: Re: Internal error
Post by: Pelle on June 16, 2018, 03:38:32 PM
All my files are compiles with Pelles C and PoAsm.
I have found the problem.
Into my project ther are C and ASM files.
They all are compiled using DEBUG directives
This kind of project can't be used into the debugger.

If I replace ASM files with C files I can use the debugger
Not sure what you mean. Debugging ASM files, C files, and a mix of them in a project works fine here. There must be more to this story...
Title: Re: Internal error
Post by: TimoVJL on June 16, 2018, 04:20:53 PM
Here are those problematic exe&dbg files only.
It can't load debug info.
Title: Re: Internal error
Post by: Pelle on June 16, 2018, 08:03:33 PM
Ah, OK, thanks.

I created a test project and found a similar problem (hopefully the same). "Full" debug info from POASM in X64 mode have a problem, but "Only line numbers" seems to work. No problem with X86 mode, AFAICT. Will try to fix this for the next Release Candidate.
Title: Re: Internal error
Post by: Jokaste on June 17, 2018, 08:06:02 AM
It's a good news... for me :)
Title: Re: Internal error
Post by: Jokaste on June 17, 2018, 10:29:12 AM
Here is my updated project. Many changes because I expect that could help the compiler and the debugger.