[M3devel] pixmap problem
Jay
jayk123 at hotmail.com
Sat May 10 11:19:59 CEST 2008
Randy, I strongly recommend you install Python. It is trivial, and gives you something good.
"Try it. You'll like it."
It is WAY more pleasant than dealing with sh or cmd or Perl, and I've spent quite a while fighting with cmd and Perl.
scripts\win\do-cm3-std buildship will probably work too.
I'm hoping to find some excuse to delete that directory, like some grand new important feature in the *.sh and *.py files.
I put up an updated distribution, and cleaned out older ones.
I do consider it a bit of a flaw that cm3 has a "builder", but not a "multi directory builder".
As well, it should be easy to put the build intermediates outside of the source tree.
As well, it should be possible to build outputs directly into the install, for the very optimistic scenario.
I went to build distributions with make-dist.cmd and make-dist.py at the same time and that fails because they fight over intermediate directories.
> I am not seeing hand.obj in the .lst file.
You REALLY need to fix that, besides building std.
Linking to hand.obj is THE FIX, at least the current form of it.
My config files always link to it.
You do have to rebuild m3core in order to produce and ship it, which do-cm3-std will do, and upgrade will do.
The .lst file I speak of..oh, I guess there's others now, but the main one is the linker output.
Which is really to say, it is the linker dumping the response file contents.
Or you can check the _m3response0.txt, _m3response1.txt files.
There are now a few more .lst files where there is a C compilation, in order to quash the C compiler output that upsets Olaf and Tony. But these are rare, hand.lst, dtoa.lst, RTLinkerC.lst, we could remove two of them.
I can probably remove hand.obj, but a reason to push people away from wierdo heavily customized config files is a good thing.
I am certain this bug is fixed.
- Jay
Date: Sat, 10 May 2008 04:51:23 -0400From: rcoleburn at scires.comTo: m3devel at elegosoft.comSubject: Re: [M3devel] pixmap problem
Jay:
I do not have python installed on my computer, so I can't run your scripts.
I used the scripts in scripts\win to upgrade a few days ago.
I am not seeing hand.obj in the .lst file.
I will do a CVS update and try the upgrade again followed by do-cm3-standard.
Regards,
Randy>>> Jay <jayk123 at hotmail.com> 5/9/2008 5:10 AM >>>
> Also, more bad news, the pixmap problem is not solved. Randy, this DOES actually fix it, but you have to rebuild more. Try: cd scripts\python .\do-cm3-std.py realclean .\upgrade.py (probably not needed) do-cm3-std.py buildship Make sure "hand.obj" occurs in the various NT386\foo.lst files. I think the fix should be restated to have the code reference *__imp__highbits instead of highbits, and go back to dynamic linking the data.But ok for now. The std distribution I put yesterday should work, though it is missing the RTArgs fix.I'll see about making another. - Jay
Date: Mon, 5 May 2008 23:28:10 -0400From: rcoleburn at scires.comTo: m3devel at elegosoft.com; jayk123 at hotmail.comSubject: RE: [M3devel] pixmap problem
Jay:
Ok, I've copied your NT386 config stuff into the bin folder and I've copied NT386 to bin\cm3.cfg.
The good news is that my -gui mode programs now link and run. The bad news is that now I am getting a command window opening up in addition to the GUI window when the program runs. This behavior does not occur on v4.1. The command window seems to be the stdout/stderr of the GUI program.
Also, more bad news, the pixmap problem is not solved.
And more bad news, your config stuff breaks the CM3-IDE program which needs to find certain definitions in cm3.cfg like PKG_USE, etc.
Regards,
Randy>>> Jay <jayk123 at hotmail.com> 5/5/2008 10:47 PM >>>Randy, Yes.The NT386 config files are all checked in.You can use them verbatim. You don't need cminstall, I never use it, and you shouldn't need to edit the config files at all, any edits I make, I check in, and should be usable on all machines.As long as you set %PATH%/%INCLUDE%/%LIB%.If I'm wrong, I'd like to know why and try to fix. Consider the config files just part of cm3.exe.Not generally to be changed locally. Unless, well, unless you intend to, and you should strive to make one form that is usable by all. - Jay
Date: Mon, 5 May 2008 22:42:30 -0400From: rcoleburn at scires.comTo: jayk123 at hotmail.comSubject: RE: [M3devel] pixmap problem
Jay,
When you say "took the updated config file", what do you mean? Are you saying I need a different cm3.cfg file?
Regards,
Randy>>> Jay <jayk123 at hotmail.com> 5/5/2008 9:54 PM >>>And you took the updated config file?The way you can tell is that, roughly speaking, hand.obj should be in NT386\_m3responsefile0.txt.Or _m3responsefile1.txt, or, well, somewhere.Anyway, I think I saw the attachment, I can check later..and with 4.1 as I said.. I can see about making the fix not depend on config file changes...but it's not terrible asis, and I'd really like to merge more of the quake code into cm3.exe.. - Jay
Date: Mon, 5 May 2008 21:18:12 -0400From: rcoleburn at scires.comTo: m3devel at elegosoft.comSubject: Re: [M3devel] pixmap problem
Jay:
I've updated my sandbox via CVS and I've rebuilt everything.
I rebuilt the TestPixmap program, but it still does not work properly when the buildstandalone() directive is used.
Regards,
Randy>>> Jay <jayk123 at hotmail.com> 5/5/2008 7:04 PM >>>Thanks. I'll look into this tonight probably, as well as with 4.1 assuming I can find my binaries and source for it (probably).COULD BE the pixmap problem is something else and 4.1 also has the problem I fixed. We'll see. No need to speculate (unless I can't find my 4.1). - Jay
Date: Mon, 5 May 2008 10:59:27 -0400From: rcoleburn at scires.comTo: jayk123 at hotmail.comCC: m3devel at elegosoft.comSubject: RE: [M3devel] pixmap problem
Jay:
The TestPixmap.zip is attached.
I will attempt to update all my sources and try again.
Not sure what you mean when you say that I must use your config files or edit what I am using. Please elaborate.
The pixmap problem does not occur on 4.1.
Regards,
Randy>>> Jay <jayk123 at hotmail.com> 5/4/2008 11:46 AM >>>Randy, Please try with /current/ source, as of this morning Sunday May 4 -- the changes are ALL in NT386.common, so you MUST use MY config files, which are checked in verbatim, or you should be able edit whatever config files you are using. (It's not really a config file issue, don't blame the general confusion people have with them.) I'll try to try later, but I don't have the source right now, gotta look on other machines, and I think it's on a machine on loan. Or send it to me again.I'd also like to know if this worked with 4.1, or with any release that offered dynamic linking to m3core.dll, on Windows. I recall a claim that it did. If today's change fixes it, I should be able to investigate 4.1.3.6 did not have such linking.If today's change does not help, well, I still plan on debugging it at some point.. If you aren't current and getting so is difficult, just send the attachment again, it's easy for me to test. Thanks, - Jay
From: jayk123 at hotmail.comTo: hosking at cs.purdue.edu; rcoleburn at scires.comDate: Sat, 19 Jan 2008 08:52:08 +0000CC: m3devel at elegosoft.comSubject: Re: [M3devel] pixmap problem
I can repro the two different behaviors on XP.I was going to try on PPC_DARWIN but I guess Tony's info suffices. I tried rolling hand.c back to before I changed (months/year ago), since it is involved in bit twiddling, no change, phew. Debugging here is a big humungous pain.NT386 has good stacks and line numbers, but no locals or type info, I'd really sometime like to get Codeview info into those .objs...I think it is documented well enough, but still not necessarily easy, or maybe have a C generating backend partly for this reason (and to bring up more targets, using native tools), and function calls in disassembly I think don't resolve; NT386GNU can't yet build this, though it will soon, but I'm not familiar with gdb and there appears to be no type info. I'm building m3gdb right now, I don't know if it will work, I hope it has type info, and I'm not familiar with the relevant code. In gdb I struggle just to view bytes in memory, add numbers to addresses and see those, etc. I think for MY problem, I'm going to link in C code to dump the structs. There is tracing code and I enabled it, but even it crashes in Text_Length. At least MY problem crashes, hopefully near the problem, whereas your problem goes all the way through to completion with no stopping to hint where the problem is. Darn it. :) on the mock rudeness and :( on the lack of a crash. You write the bundle out and it matches, so that doesn't rule out bundles as being the problem? (darn)And bundles look pretty simple, a bundle is just a generated source file with a constant in it.Maybe newline problems? That wouldn't make sense. I just downloaded some program that might let me separately view the ppm, maybe it'll reveal something. The bad behavior has like regularly spaced solid color veritical bars a few pixels side across the whole picture, and regularly spaced vertical stripes from the correct picture alternating with that. Perhaps someone with ppm/bitmap/graphics experience has seen this behavior and it results from some common pixmap mismanagement we could look for? I have to say this is very surprising. I always wondered, and now I pretty much assume -- Modula-3 never imports/exports data in its dynamic linking, right? It alway imports/exports functions, right?On Windows, functions have an optional optimization, but data must be handled differently at compile time if it is going to be dynamically imported.For functions, if you don't apply the optimization at compile time, the linker will just generate a single instruction thunk instead. That is, given a symbol Foo, there is a symbol __imp__Foo that is a pointer to the actual foo in another .dll/.so.The loader only patches pointers, one per import if you build your .dll correctly, it doesn't patch instructions or code strewn throughout a .dll, just one contiguous array of pointers. MAYBE they don't have to be contiguous for each .dl you import from. That is, if call msvcrt!fopen, msvcrt!fclose, kernel32!Sleep, my .dll/.exe typically has an array: pointer to msvcrt!fopenpointer to msvcrt!fclosenullpointer to kernel32!Sleep But perhaps kernel32.dll's pointers and msvcrt.dll's pointers need not be adjacent. So, going back, my point/question is that, if the compiler knows the function is imported, it can call through __imp__Foo instead of calling Foo.But if it calls Foo and you import Foo, the linker will create the function Foo that just jmps through __imp__Foo.That doesn't work for data though. There's no ability to intervenve like that.So for imported data, the compiler must generated a read and dereference of the pointer __imp__Foo for accesses to Foo, if Foo is to be imported.Data imports may be faster when appropriate, but for this reason, I'd say they aren't worth it.And for this reason, I HOPE Modula-3 never imports/exports data. Oh, you could, for data, always reference the pointer __imp_Foo, and if non materializes, create one.However that would suck perf in order to make an uncommon case work.I hope Modula-3 doesn't do that either. :)Though I guess since this global data in question...maybe it is rare??? Later, - Jay
> From: hosking at cs.purdue.edu> Date: Sat, 19 Jan 2008 03:09:47 -0500> To: rcoleburn at scires.com> CC: m3devel at elegosoft.com> Subject: Re: [M3devel] pixmap problem> > Looks fine to me on I386_DARWIN.> > On Jan 19, 2008, at 12:31 AM, Randy Coleburn wrote:> > > <TestPixmap.zip>>
Need to know the score, the latest news, or you need your Hotmail®-get your "fix" Check it out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080510/adfc91cf/attachment-0002.html>
More information about the M3devel
mailing list