Menu

compiling on amd64

Help
sloco
2006-02-17
2014-07-23
  • sloco

    sloco - 2006-02-17

    i've run into problems.
    seems compiling and availability on 64 bit platform is not there.

    altought pre-compiled programs still run ok.

    is this project dormant or ... ?

    cheers

     
    • Steven V. Gunhouse

      There is an email list named xbasic@yahoogroups where most discussion takes place, but then again most people there would be Windows users.

      Actually, you didn't indicate whether this was a 64-bit Windows or Linux, but really I guess it has to be Linux.

      XBasic is a 32-bit program, the runtime is 32-bit as well, so you'd have to add some flags to the compiler to indicate it should be compiled for i386 architecture. As you've seen, 32-bit code runs fine on 64-bit processors ...

      Oh, not having one to actually test on, I can't say how your development packages are arranged. Are the 32-bit development packages separate from the 64-bit? If so, you may have a few packages you need to install.

      Eddie is the project manager and our primary Linux guru, while I work in Linux I can't claim to know as much as he does. He's trying to work on XB2, an XBasic to C converter and tools so that we can remove the limitation to i386 architecure. He may also respond, if he isn't too busy on that.

       
      • sloco

        sloco - 2006-02-20

        Indeed we are talking linux. To be specific it's fedora 4.
        Now the binaries of xbasic programs compiled elsewhere (i still have a slackware 9 32bit machine), run fine except for complaining about

        Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.

        ok, fine with that. also i think it is fedora/rhat specific.
        compiling xbasic code would run fine, as well as running it (i've installed 386 libs).
        what wouldn't work is "linking":

        [root@home .vnc]# make testprogram
        cc    testprogram.s   -o testprogram
        testprogram.s: Assembler messages:
        testprogram.s:120: Error: suffix or operands invalid for `push'
        testprogram.s:137: Error: suffix or operands invalid for `push'
        testprogram.s:155: Error: suffix or operands invalid for `push'
        testprogram.s:252: Error: suffix or operands invalid for `pop'
        testprogram.s:282: Error: suffix or operands invalid for `push'
        testprogram.s:288: Error: suffix or operands invalid for `pop'
        make: *** [testprogram] Error 1

        this seems similar problem to compiling xbasic itself from sources:

        [root@home xbasic-6.2.3]# make
        (cd src; make mkdir; make all)
        make[1]: Entering directory `/usr/local/src/xbasic-6.2.3/src'
        mkdir bin
        mkdir: cannot create directory `bin': File exists
        make[1]: [mkdir] Error 1 (ignored)
        make[1]: Leaving directory `/usr/local/src/xbasic-6.2.3/src'
        make[1]: Entering directory `/usr/local/src/xbasic-6.2.3/src'
        gcc -c linux/lib/xstart.s -o linux/lib/xstart.o
        linux/lib/xstart.s: Assembler messages:
        linux/lib/xstart.s:38: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:40: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:41: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:42: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:43: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:44: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:45: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:46: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:47: Error: suffix or operands invalid for `push'
        linux/lib/xstart.s:51: Error: suffix or operands invalid for `pop'
        make[1]: *** [linux/lib/xstart.o] Error 1
        make[1]: Leaving directory `/usr/local/src/xbasic-6.2.3/src'
        make: *** [all] Error 2

        regards
        michele

         
        • Steven V. Gunhouse

          I thought you said the problem was linking. Those are all compiler errors, due to the incorrect architecture. Eddie might know what to change in the makefile, I'll have to do some research.

          You see, gcc can compile for various processors, including some that would be completely incompatible with your hardware. Your system should be able to run programs compiled for it, or also for any generic x86 system. But XBasic's compiler produces i386 assembler code. When gcc sees that this is an assembler file but you haven't specified the architecture then of course it treats it as amd64 assembler, the default on your system. And of course, you get a bunch of errors since the code is actually i386 assembler.

          Since gcc is cross-platform, there must be a commandline switch we could add to the arguments in the *.mak file to identify that the assembler code is i386, and to compile it as a 32-bit executable. I will see what I can find.

           
  • hans

    hans - 2014-07-22

    I just want to make a .exe of a simple xbasic program after compiling
    and already seen in the console of XBasic.

    How can i do that ? Where is the .exe? Normally compiled automaticly.

     
    • Steven V. Gunhouse

      Xbasic is a 32-bit program, you may need to install some 32-bit libraries and the corresponding header files, and to add an architecture specification in the template used to generate the make file. A 64-bit system will normally assume you want to generate a 64-bit program, but Xbasic has no 64-bit option.

      Steve

      -----Original Message-----
      From: hans zaboberger@users.sf.net
      To: "[xbasic:discussion] " 4705@discussion.xbasic.p.re.sf.net
      Sent: Tue, 22 Jul 2014 1:13 PM
      Subject: [xbasic:discussion] compiling on amd64

      I just want to make a .exe of a simple xbasic program after compiling
      and already seen in the console of XBasic.

      How can i do that ? Where is the .exe? Normally compiled automaticly.


      compiling on amd64


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/xbasic/discussion/4705/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.