Shop OBEX P1 Docs P2 Docs Learn Events
Catalina 3.0 - Page 12 — Parallax Forums

Catalina 3.0

191012141517

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2011-05-14 22:05
    RossH wrote: »
    Can you unzip the attached version of catbind.exe into your Catalina bin directory and try that command again?
    bind output file is C:\Users\Public\storage\catalina\target\Catalina.spin
    temporary code file name = \s5js.
    temporary cnst file name = \s5js.1
    temporary init file name = \s5js.2
    temporary data file name = \s5js.3
    [COLOR="red"]cannot open temporary files[/COLOR]
    
    The only files ending up in my private temp are
    C:\Users\Public\storage\catalina\temp\lcc18082.obj
    C:\Users\Public\storage\catalina\temp\lcc18080.i
    C:\Users\Public\storage\catalina\temp\lcc18081.s
    
  • RossHRossH Posts: 5,519
    edited 2011-05-14 22:33
    kuroneko wrote: »
    bind output file is C:\Users\Public\storage\catalina\target\Catalina.spin
    temporary code file name = \s5js.
    temporary cnst file name = \s5js.1
    temporary init file name = \s5js.2
    temporary data file name = \s5js.3
    [COLOR=red]cannot open temporary files[/COLOR]
    

    Yup I see the problem - catbind is using tmpnam(), which is creating the temporary files in the root directory - something which presumably your user is not allowed to do.

    I've updated the catbind binary in the previous post to use tmpfile() instead - can you try that one?

    Thanks for your help,

    Ross.
  • kuronekokuroneko Posts: 3,623
    edited 2011-05-14 22:39
    Back to square one, cannot open temporary files.

    If I don't set CATALINA_TEMPDIR it uses my user's %APPDATA% temporary directory quite happily (for the lcc* files). What's tmpfile() doing differrently?
    VC-Help wrote:
    The tmpfile function creates a temporary file and puts a pointer to that stream in the pFilePtr argument. The temporary file is created in the root directory. To create a temporary file in a directory other than the root, use tmpnam or tempnam in conjunction with fopen.
  • RossHRossH Posts: 5,519
    edited 2011-05-14 22:56
    kuroneko wrote: »
    Back to square one, cannot open temporary files.

    If I don't set CATALINA_TEMPDIR it uses my user's %APPDATA% temporary directory quite happily (for the lcc* files). What's tmpfile() doing differrently?

    Now that's odd, because I just created a temporary account on my machine, denied it access to the root folder, and it works ok.

    These particular temp files are different to LCC's temp files, so the CATALINA_TEMPDIR setting will have no effect. I have no control over where these particular files are being created - this is up to the operating system. The standard C procedure tmpnam() creates them in the root directory, but tmpfile() is supposed to use /tmp (or its equivalent).

    Is there something strange about the user account you are using?

    This is getting really annoying, because I can never seem to reproduce anyone else's problems with Windows 7! Everything I do works fine on my machine.

    Ross.

    P.S. Have to go to VUPES shortly - I'll get back to this later tonight.
  • RossHRossH Posts: 5,519
    edited 2011-05-14 23:04
    Hi kuroneko,

    I just discovered that Windows 7 requires adminstrative access to create any tmpfiles - i.e. there is no equivalent to /tmp! How braindead can you get?

    For the moment, you will have to use an account with administrative access. I'll have to rewrite catbind to stop using temporary files at all.

    Sheesh!

    Ross.
  • kuronekokuroneko Posts: 3,623
    edited 2011-05-14 23:56
    RossH wrote: »
    For the moment, you will have to use an account with administrative access. I'll have to rewrite catbind to stop using temporary files at all.
    Why don't you copy the lcc version, at least it looks like it's working? Or is that a no-go under win7 as well?
  • RossHRossH Posts: 5,519
    edited 2011-05-15 03:54
    kuroneko wrote: »
    Why don't you copy the lcc version, at least it looks like it's working? Or is that a no-go under win7 as well?
    Yes, that's what I'll have to do. None of the ANSI C functions that are supposed to be used to create tmp files (without having to worry about where they actually get created) seem to work properly under Windows 7. LCC also does a bunch of non-portable stuff to try and find a temp directory, then generate a unique file name - they may have struck a similar problem on other platforms. It's ugly code, but I suppose that I should copy it, since if it works for LCC it will work for me, and if it doesn't work for LCC then it doesn't matter if it works for me or not!

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-15 05:15
    Attached is a screenshot of where the GUI is up to. Now have a multiline text box. Mouse is working, 20x4 LCD screen is also working. Need to work on scrollbars and also add checkboxes. And then get the menu working.

    Program is 170k. Ideally this will be a skeleton program where you can add your own code. Currently the buttons etc are being drawn on the screen from code, but there is no reason they could not be drawn on a PC screen and then the positions noted and this turned automatically into C code.

    Text is a little slow but there is always scope to speed things up by moving code into cogs. I love the way cogs can be recycled over and over within code.
    936 x 909 - 121K
  • RossHRossH Posts: 5,519
    edited 2011-05-15 15:56
    Dr_Acula wrote: »
    Attached is a screenshot of where the GUI is up to. Now have a multiline text box. Mouse is working, 20x4 LCD screen is also working. Need to work on scrollbars and also add checkboxes. And then get the menu working.

    Quite impressive, Dr_A! I presume this is HiRes VGA? Is there a TV version as well?

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-15 16:11
    Yes this is hi res VGA. It is a little 'blocky' though but I think would end up a perfect resolution for the TV, especially the little 7" LCD TV screens.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 01:37
    Hi Ross,

    I ve tried many things. now I am desperate, I tried on freshly intalled windows xp and I get the same result , I tried on about 4 different machine same result
    here attached the lmm_default. file,

    My platform is propeller C3 , I didn't even make to compile a hello_world.c :(
  • kuronekokuroneko Posts: 3,623
    edited 2011-05-18 02:02
    drRobutik wrote: »
    I ve tried many things. now I am desperate, ...
    Just to remove that possibility, can you compile a minimal SPIN file with homespun from the command line, e.g. homespun030 dummy.spin?
    ' dummy.spin
    
    PUB null
    
  • kuronekokuroneko Posts: 3,623
    edited 2011-05-18 02:07
    @RossH: I was able to reproduce the File not found error. This - as you stated already - originates from homespun not being able to find the source file, i.e you get the banner and then the error message.
  • RossHRossH Posts: 5,519
    edited 2011-05-18 02:22
    drRobutik wrote: »
    Hi Ross,

    I ve tried many things. now I am desperate, I tried on freshly intalled windows xp and I get the same result , I tried on about 4 different machine same result
    here attached the lmm_default. file,

    My platform is propeller C3 , I didn't even make to compile a hello_world.c :(

    Hi drRobutik,

    That file looks ok. I don't think there is anything wrong with your Catalina installation - it appears to be a Homespun problem. I'm sure we'll figure it out.

    Did you try step 1 in my previous post (i.e. to check if you can compile anything with Homespun?)

    Try the following:
    cd C:\Program Files\Catalina 
    set LCCDIR=C:\Program Files\Catalina 
    use_catalina 
    cd catalyst\demo 
    homespun demo.spin
    
    Please post the output of this command.

    Ross.
  • RossHRossH Posts: 5,519
    edited 2011-05-18 02:22
    kuroneko wrote: »
    @RossH: I was able to reproduce the File not found error. This - as you stated already - originates from homespun not being able to find the source file, i.e you get the banner and then the error message.

    Aha! good news. How did you reproduce it?

    Ross.
  • kuronekokuroneko Posts: 3,623
    edited 2011-05-18 02:30
    RossH wrote: »
    Aha! good news. How did you reproduce it?
    Simply by calling it manually with a non-existing file. I then went back trying a file name with full path and found that under cygwin - if I use '\' - I (obviously) have to quote the path or use '/'. From a win32 shell both variants work.

    There was a post showing the command line for homespun but is that really what is seen by homespun?
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 02:33
    [code]Microsoft Windows [S
  • RossHRossH Posts: 5,519
    edited 2011-05-18 02:37
    kuroneko wrote: »
    Simply by calling it manually with a non-existing file. I then went back trying a file name with full path and found that under cygwin - if I use '\' - I (obviously) have to quote the path or use '/'. From a win32 shell both variants work.

    There was a post showing the command line for homespun but is that really what is seen by homespun?

    Yes, if you add the -v switch to catalina, what is printed as the "assemble command (lmm) = " is just the string I then pass to the system() function call.

    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 02:38
    and for the dummy.spin

    [code]Microsoft Windows [S
  • RossHRossH Posts: 5,519
    edited 2011-05-18 02:42
    Hi drRobutik,

    Ok - that confirms it is a homespun issue - what's even stranger is that all the files you are compiling exist in the current directory. Let's try a few more things:

    1. You may have a PATH problem. Please execute the following command and post the output:
    echo %PATH%
    
    2. Verify that you can read/write the file - try editing demo.spin, add a line or two, and save it:
    notepad demo.spin
    
    Then try the homespun command again.

    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 03:02
    1.
    C:\Program Files\Catalina>set lccdir=c:\program files\catalina
    
    C:\Program Files\Catalina>echo %path%
    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
    owsPowerShell\v1.0\;D:\PROGRA~1\PICC;
    
    C:\Program Files\Catalina>use_catalina
    
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = [default]
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = c:\program files\catalina
    
    C:\Program Files\Catalina>echo %path%
    c:\program files\catalina\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32
    \Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\PROGRA~1\PICC;
    
    C:\Program Files\Catalina>
    
    
    2. seems no problem on reading and writing.
  • RossHRossH Posts: 5,519
    edited 2011-05-18 03:10
    drRobutik,

    Can you tell me what version of .NET you have installed? Go to "Control Panel->Programs->Turn Windows Features On or Off" and it should display a list of features. In there you will see one or more .NET Framworks listed. Can you tell me what you have installed?

    Also, have you installed service pack 1? Go to "Control Panel->Systems and Security->System" and it should tell you the windows edition (including service pack) you are running.

    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 03:17
    Hi RossH,
    Frame work 4
    I can't see sp1 for win7 installed
  • RossHRossH Posts: 5,519
    edited 2011-05-18 03:24
    drRobutik,

    Ok. There's a couple of possibilities - I'll try with .NET framework 4. Can you also try the homespun command again, but add -i7 - i.e:
    homespun demo.spin -i7
    
    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 03:30
    RossH wrote: »
    drRobutik,

    Ok. There's a couple of possibilities - I'll try with .NET framework 4. Can you also try the homespun command again, but add -i7 - i.e:
    homespun demo.spin -i7
    
    Ross.

    C:\Program Files\Catalina\catalyst\demo>homespun Demo.spin -i7
    Homespun Spin Compiler 0.30
    Demo.spin.spin?
    File not found
    
    C:\Program Files\Catalina\catalyst\demo>
    
  • RossHRossH Posts: 5,519
    edited 2011-05-18 03:40
    drRobutik wrote: »
    C:\Program Files\Catalina\catalyst\demo>homespun Demo.spin -i7
    Homespun Spin Compiler 0.30
    Demo.spin.spin?
    File not found
    
    C:\Program Files\Catalina\catalyst\demo>
    

    Aha! "Demo.spin.spin" is not right - how come your homespun is adding another extension? Try just:
    homespun demo
    
    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 03:41
    C:\Program Files\Catalina\catalyst\demo>homespun demo -i7
    Homespun Spin Compiler 0.30
    demo.spin?
    parsing demo.spin
    Catalyst_Arguments.spin?
    parsing Catalyst_Arguments.spin
    Error: Catalyst_Arguments.spin (85, 8): Expected "(eol)", got long
        if long[COGSTORE] == CMD_RESPONSE
           ^
    
    C:\Program Files\Catalina\catalyst\demo>
    
  • RossHRossH Posts: 5,519
    edited 2011-05-18 03:44
    drRobutik,

    Okay - we're making progress, but this is really wierd!

    Can you please post your Catalyst_Arguments.spin file?

    Ross.
  • drRobutikdrRobutik Posts: 15
    edited 2011-05-18 03:46
    here it is
    is anybody have same problem with Catalina on win7?
  • RossHRossH Posts: 5,519
    edited 2011-05-18 03:55
    drRobutik wrote: »
    here it is
    is anybody have same problem with Catalina on win7?

    No - nothing remotely like this. That file is correct, by the way - so now we have two issues:

    (1) homespun is adding an extra .spin to the file name - which it should only do if the file does not already have that extension.
    (2) homespun thinks Catalyst_Arguments.spin has a syntax error on line 85 - which it doesn't.

    It's as if your version of homespun is completely and utterly broken. Can you try the same command with homespun030?

    Is it possible for you to install SP1 for Windows 7?

    Ross.
Sign In or Register to comment.