On 12/6/06, Keith Gable <[EMAIL PROTECTED]> wrote:
Hello,I'm working on making OHRRPGCE installable under Gentoo Linux. Gentoo is a source-based distro. That is, you compile everything from scratch. I've gotten FreeBASIC compiling and working (had to patch some files that refer to places they shouldn't), and it compiles normal QB apps fine. Now, I'm getting errors while building WIP from Subversion:
I may not be the best person to ask about Linux, but I do know the quirks of both FB and the OHR, so I'll give this a shot.
>>> Compiling source in /var/tmp/portage/ohrrpgce-custom-wip-1/work/ohrrpgce-custom-wip-1 ... * Graphics backend: gfx_fb * Music backend: music_sdl FreeBASIC Compiler - Version 0.16 for linux (target:linux) Copyright (C) 2004-2006 Andre Victor T. Vicentini ([EMAIL PROTECTED]) compiling: verprint.bas -o verprint.asm assembling: /usr/bin/as --strip-local-absolute "verprint.asm" -o "verprint.o" linking: -dynamic-linker /lib/ld-linux.so.2 -T "/usr/lib/freebasic/elf_i386.x" -s -L "/usr/bin/lib/linux" -L "./" -L "/lib" -L "/usr/lib/freebasic" -L "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1" "/usr/lib/freebasic/crt1.o" "/usr/lib/freebasic/crti.o" "/usr/lib/freebasic/crtbegin.o" "verprint.o" "$$fb_icon$$.o" -o "verprint" -( -lfb -lgcc -lc -lm -lpthread -ldl -lncurses -) "/usr/lib/freebasic/crtend.o" "/usr/lib/freebasic/crtn.o"
Ok, so verdump compiles properly. That (probably) means that your version of FB is working properly.
Version ID 20061206 Codename wip FreeBASIC Compiler - Version 0.16 for linux (target:linux) Copyright (C) 2004-2006 Andre Victor T. Vicentini ([EMAIL PROTECTED]) compiling: custom.bas -o custom.asm custom.bas(766) : error 96: Branch crossing local array, var-len string or object definition, to label: EXPORTFONT, local string: NEWFONT
This is an odd error. At first glance, it's gibberish. How does one cross a local array, var-len string, or object definintion with a branch? However, if you think about it for a second, it might mean that a GOSUB (which is messily emulated using C-Runtime functions I don't understand) is trying to access a local variable or something from a previous compiler context in a way FB doesn't like. However, if you think about it longer than a second, you realize that FB can't possibly know about the new GOSUB, as it only sees the labels, and code. Odd.
custom.bas(1090) : error 96: Branch crossing local array, var-len string or object definition, to label: SSTUF, local string: THING custom.bas(1090) : error 96: Branch crossing local array, var-len string or object definition, to label: SSTUF, local string: NIT custom.bas(1164) : error 96: Branch crossing local array, var-len string or object definition, to label: LSTUF, local string: NIT custom.bas(1166) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(1180) : error 96: Branch crossing local array, var-len string or object definition, to label: SSTUF, local string: NIT custom.bas(1182) : error 96: Branch crossing local array, var-len string or object definition, to label: LSTUF, local string: NIT custom.bas(1183) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(1186) : error 96: Branch crossing local array, var-len string or object definition, to label: SSTUF, local string: NIT custom.bas(1193) : error 96: Branch crossing local array, var-len string or object definition, to label: LSTUF, local string: NIT custom.bas(1194) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(1209) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(1211) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(1220) : error 96: Branch crossing local array, var-len string or object definition, to label: ITSTRSH, local string: NIT custom.bas(122) : error 96: Branch crossing local array, var-len string or object definition, to label: READSTUFF, local string: HSFILE custom.bas(122) : error 96: Branch crossing local array, var-len string or object definition, to label: READSTUFF, local string: A custom.bas(122) : error 96: Branch crossing local array, var-len string or object definition, to label: READSTUFF, local string: RPAS custom.bas(122) : error 96: Branch crossing local array, var-len string or object definition, to label: READSTUFF, local string: PAS custom.bas(129) : error 96: Branch crossing local array, var-len string or object definition, to label: MAKEWORKINGDIR, local string: A custom.bas(157) : error 96: Branch crossing local array, var-len string or object definition, to label: CHECKPASS, local string: A custom.bas(188) : error 96: Branch crossing local array, var-len string or object definition, to label: HSIMPORT, local string: A custom.bas(188) : error 96: Branch crossing local array, var-len string or object definition, to label: HSIMPORT, local string: RPAS custom.bas(188) : error 96: Branch crossing local array, var-len string or object definition, to label: HSIMPORT, local string: PAS custom.bas(217) : error 96: Branch crossing local array, var-len string or object definition, to label: RELUMP, local string: A custom.bas(218) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: A custom.bas(218) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(218) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS custom.bas(246) : error 96: Branch crossing local array, var-len string or object definition, to label: RELUMP, local string: A custom.bas(247) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: A custom.bas(247) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(247) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS custom.bas(332) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: A custom.bas(332) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(332) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS custom.bas(338) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: A custom.bas(338) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(338) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS custom.bas(347) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: A custom.bas(347) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(347) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS custom.bas(438) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: RPAS custom.bas(438) : error 96: Branch crossing local array, var-len string or object definition, to label: FINIS, local string: PAS WIP is obviously compiling for some people on FreeBASIC 0.16b, at least I think, and this looks like syntax errors to me. Is there anything I can do to help fix this (yes, I know BASIC ^_^)?
Yup, WIP most certainly does compile. At least, for me it does. I don't know why it doesn't work for you... unless the Linux scripts compile differently... Nope, same flags... *sigh* I'm thinking that this is an FB compatability problem, not an OHR problem. However, I can't isolate this at all. Erm... then again, I wasn't experiencing it in the first place >_> I've attached my little test program to this email. Please try it out, and see if you get an error similar to what you've been getting. The expected output should be the following: D:\ohrrpgce>fbc gosubtest.bas D:\ohrrpgce>gosubtest first, a top level gosub test top of main (foo = 1, globaltest = "") foo now = 11 foo now = 12 bottom of main (foo = 12, globaltest = "!!") next, a sub-gosub test top of test (foo = 100, globaltest = "!!") foo now = 110 foo now = 111 bottom of test (foo = 111, globaltest = "!!!!") -- Mike Caron Final Fantasy Q http://finalfantasyq.com
gosubtest.bas
Description: Binary data
_______________________________________________ ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
