• Print

Author Topic: Anyone have QB64 running on Raspberry Pi  (Read 1797 times)

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Anyone have QB64 running on Raspberry Pi
« on: February 11, 2013, 09:57:36 AM »
I am trying to get it running.  Removed the ASM and added the commented out selection and get tons of warnings and no ./qb64

Here is what I did:

Code: [Select]
/*    FLDT=load long double
      inline int64 qbr(long double f){
      static int64 i;
      __asm__ (
              "fldt %1;"
              "fistpll %0;"
              :"=m" (i)
              :"m" (f)
              );
              return i;
      }
      inline uint64 qbr_longdouble_to_uint64(long double f){
              static uint64 i;
              __asm__ (
              "fldt %1;"
              "fistpll %0;"
              :"=m" (i)
              :"m" (f)
              );
              return i;
      }
      inline int32 qbr_float_to_long(float f){
              static int32 i;
              __asm__ (
              "flds %1;"
              "fistpl %0;"
              :"=m" (i)
              :"m" (f)
              );
              return i;
      }
      inline int32 qbr_double_to_long(double f){
              static int32 i;
              __asm__ (
              "fldl %1;"
              "fistpl %0;"
              :"=m" (i)
              :"m" (f)
              );
              return i;
      }   */
#endif
/* Alternate rounding routines (may have to be used on non-x86 based processors) */
    inline int64 qbr(long double f){if (f<0) return(f-0.5f); else return(f+0.5f);}
    inline uint64 qbr_longdouble_to_uint64(long double f){if (f<0) return(f-0.5f); else return(f+0.$
    inline int32 qbr_float_to_long(float f){if (f<0) return(f-0.5f); else return(f+0.5f);}
    inline int32 qbr_double_to_long(double f){if (f<0) return(f-0.5f); else return(f+0.5f);}
« Last Edit: March 01, 2013, 04:43:21 AM by mramos »

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #1 on: February 11, 2013, 10:00:55 AM »
I got close to getting it compiled. I have the 256MB version and the RPI ran out of memory for me before QB64 compiled, I never managed to get past that point before moving onto other things I had to do. I do believe that at least one community member got it running though, so perhaps if they have their binary they could post it here.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

OlDosLover

  • Hero Member
  • *****
  • Posts: 3859
  • OlDosLover
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #2 on: February 11, 2013, 03:08:53 PM »
Hi all,
    Welcome to the forum mramos. It would be great having QB64 run on the Pi. Unfortunetly i dont have one of the units myself.
OlDosLover.

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #3 on: February 13, 2013, 07:20:43 AM »
Thanks for the info and welcome.

I saw the person's post that claimed it worked, but they never uploaded the binary or source changes. 

Looks like a good program.  I removed the asm and uncommented the /* */ and it went down hill for me. Lots of warning and a long hang and no ./qb64 :( 

I might look at is again, as BaCON has no real support I can see (and not 100% QB45 like).  I am very happy with X11Basic (no easy C code embedding, but I think QB64 is what I really want.

I have the other two running on the PI and the old QB2C as well (I like the embed C in the code).  But I like the looks of QB64.

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #4 on: February 14, 2013, 05:54:46 AM »
Quote from: OlDosLover on February 11, 2013, 03:08:53 PM
Hi all,
    Welcome to the forum mramos. It would be great having QB64 run on the Pi. Unfortunetly i dont have one of the units myself.
OlDosLover.

How good are you with *nix?  I can add an account on one of mine if you are really good at making QB64 compile on Unix based machines and gcc or c++? 

With over 3000 post, that I have not read, I can only assume you are.

I can PM you a static IP, username and password if you like.

Since I'm running Linux on it,  you really do not need a Raspberry Pi to use one.  A simple ssh -l IP (from say putty) and you are there.

Let me know

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #5 on: February 14, 2013, 11:58:08 AM »
Mramos:

So you have the 512MB version? And either way, could you possible run the ./setup.sh and pipe it to a file? ("./setup.sh | tee ./output.txt"). If I can see that output.txt I may be able to figure out what the problem is, I've installed QB64 on nurmous Linux setups so I may be able to get this working.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #6 on: February 15, 2013, 05:18:48 AM »
512 version.

Errors are so many putty defaults will not scroll back that far.  Will paste some here.  I think there is a default gcc issue with signed and unsigned maybe.  As I remove the ASM and add the C and it gets 1000's of warnings.

Here is a sample.  The pipe to tee did not get the errors. 

./temp/main.txt:45193:125: warning: passing NULL to non-pointer argument 2 of âvoid sub_put2(int32_t, int64_t, void*, int32_t)â [-Wconversion-null]
../temp/main.txt:45197:39: warning: passing NULL to non-pointer argument 1 of âdouble func_timer(double, int32_t)â [-Wconversion-null]
../temp/main.txt:45206:56: warning: passing NULL to non-pointer argument 2 of âvoid sub_get2(int32_t, int64_t, qbs*, int32_t)â [-Wconversion-null]
../temp/main.txt:45217:97: warning: passing NULL to non-pointer argument 1 of âint32_t func_instr(int32_t, qbs*, qbs*, int32_t)â [-Wconversion-null]
../temp/main.txt:45231:79: warning: passing NULL to non-pointer argument 1 of âint32_t func_instr(int32_t, qbs*, qbs*, int32_t)â [-Wconversion-null]
../temp/main.txt:45246:79: warning: passing NULL to non-pointer argument 1 of âint32_t func_instr(int32_t, qbs*, qbs*, int32_t)â [-Wconversion-null]
../temp/main.txt:45280:176: warning: passing NULL to non-pointer argument 3 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45280:176: warning: passing NULL to non-pointer argument 4 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45280:176: warning: passing NULL to non-pointer argument 6 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45296:176: warning: passing NULL to non-pointer argument 3 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45296:176: warning: passing NULL to non-pointer argument 4 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45296:176: warning: passing NULL to non-pointer argument 6 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45306:126: warning: passing NULL to non-pointer argument 2 of âvoid sub_put2(int32_t, int64_t, void*, int32_t)â [-Wconversion-null]
../temp/main.txt:45324:47: warning: passing NULL to non-pointer argument 1 of âdouble func_timer(double, int32_t)â [-Wconversion-null]
In file included from qbx.cpp:2529:0:
../temp/main.txt: In function âvoid SUB_HELP_PREVIEW()â:
../temp/main.txt:45657:73: warning: passing NULL to non-pointer argument 3 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45657:73: warning: passing NULL to non-pointer argument 4 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45657:73: warning: passing NULL to non-pointer argument 6 of âvoid sub_open(qbs*, int32_t, int32_t, int32_t, int32_t, int64_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45711:20: warning: passing NULL to non-pointer argument 1 of âvoid sub_cls(int32_t, uint32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45711:20: warning: passing NULL to non-pointer argument 2 of âvoid sub_cls(int32_t, uint32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45744:88: warning: passing NULL to non-pointer argument 3 of âvoid qbg_sub_color(uint32_t, uint32_t, uint32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45757:29: warning: passing NULL to non-pointer argument 3 of âvoid qbg_sub_color(uint32_t, uint32_t, uint32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45761:43: warning: passing NULL to non-pointer argument 1 of âint32_t func__width(int32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45770:88: warning: passing NULL to non-pointer argument 3 of âvoid qbg_sub_color(uint32_t, uint32_t, uint32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45773:17: warning: passing NULL to non-pointer argument 1 of âvoid sub_sleep(int32_t, int32_t)â [-Wconversion-null]
../temp/main.txt:45777:88: warning: passing NULL to non-pointer argument 3 of âvoid qbg_sub_color(uint32_t, uint32_t, uint32_t, int32_t)â [-Wconversion-null]
In file included from qbx.cpp:2529:0:
../temp/main.txt: In function âvoid SUB_WIKIPARSE(qbs*)â:
../temp/main.txt:46340:92: warning: passing NULL to non-pointer argument 1 of âint32_t func_instr(int32_t, qbs*, qbs*, int32_t)â [-Wconversion-null]
../temp/main.txt:46356:98: warning: passing NULL to non-pointer argument 1 of âint32_t func_instr(int32_t, qbs*, qbs*, int32_t)â [-Wconversion-null]


DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #7 on: February 15, 2013, 06:10:24 AM »
Warnings are fine really, they just come from how QB64 converts it's code and are nothing to worry about in this situation. And, any idea why tee didn't get all the output? If the file's big you can just attach it to your post and I can open it that way. The output you posted though is what I expected, so I really need to see the part including the error.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #8 on: February 15, 2013, 06:44:50 AM »
What I could get before the session dropped.


DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #9 on: February 15, 2013, 06:55:16 AM »
Well, the error's not in that long. If your connection dropped, perhaps you shouldn't SSH while compiling QB64. Any chance you can hook your RPI to a TV and then run it directly?

the other option could be to use screen to run the command. screen can separate your running program from your session, so what you can do is (first install screen) run the command 'screen' and then try to compile QB64 using the original command ./setup.sh | tee ./output.txt. Because screen will run independent of your session, even if your SSH disconnects the compilation won't be killed. I would just let it sit for a while, and then try pinging the RPI (And reconnecting via SSH.) and when you et in you can see if QB64 compiled, reconnect to the screen if wanted, and check if the output.txt recorded the error.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #10 on: February 15, 2013, 07:32:27 AM »
I have screen on the rasp-pi.  I will compile in one screen and run top in another for a crude keep-a-live  And see how that works.  I had putty logging the output.  No sure why tee did not work unless I need to pipe stderr maybe?

I have to call home and get it rebooted.  It seems to have froze up.
« Last Edit: February 17, 2013, 06:32:39 AM by mramos »

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #11 on: February 15, 2013, 08:59:33 AM »
Got it all this time.

Thanks for the help  DSMan195276

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #12 on: February 15, 2013, 09:10:37 AM »
Quote from: mramos on February 15, 2013, 08:59:33 AM
Got it all this time.

Thanks for the help  DSMan195276

Thanks, and no problem. However, the log doesn't paint a very good picture, g++ crashed from an internal error, more then likely because the system ran out of RAM.

I would recommend making a swap file on your SD card, loading that up, and then trying again. That will fix the RAM problem, It's not a great solution though. Swapping to and from a SD card isn't very fast nor very good for the SD card.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

mramos

  • Newbie
  • *
  • Posts: 25
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #13 on: February 15, 2013, 01:21:21 PM »
Will do that, get qb64 going, then take swap back off.  Will keep you posted.


DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Anyone have QB64 running on Raspberry Pi
« Reply #14 on: February 15, 2013, 01:38:19 PM »
Quote from: mramos on February 15, 2013, 01:21:21 PM
Will do that, get qb64 going, then take swap back off.  Will keep you posted.

Thanks, I'm interested to hear how it goes for you. Like I said I never got it going, but if you do get it going I would love a copy of that binary.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

  • Print