FreeBSD/PureBasic/FASM issues

Linux specific forum
pthien
Enthusiast
Enthusiast
Posts: 145
Joined: Sun Jun 29, 2003 9:39 pm

FreeBSD/PureBasic/FASM issues

Post by pthien »

I have FreeBSD 5.0 running on a notebook which (for reasons I won't bother you with) will remain FreeBSD. As I use this machine quite commonly, I thought it would be kinda cool to try PureBasic on it.

I have another machine running RedHat 9.0, and I had PureBasic on that one some time ago. I created a "Hello, world" executable and I still had that executable. So I ftp'd it to the FreeBSD box, made certain the Linux compatibility stuff was loaded, and ran the program and it worked wonderfully. It doesn't do much, but it does say "Hello, world."

So, I decided to try installing the PureBasic development system. I put all the files where they go and was able to use the "pbcompiler" command. However, fasm gives me this:

/usr/bin/fasm: Exec format error. Binary file not executable.

So I examined the file using "brandelf" and found it is a SVR4 (I think) header, which is the same as "pbcompiler." Just for kicks, I did a:

brandelf -t Linux fasm

but it didn't help.

Any ideas? Anyone else gotten the compiler/fasm to work on FreeBSD?

Thanks,
Phil
pbdep
User
User
Posts: 68
Joined: Fri Apr 25, 2003 5:18 pm
Location: Netherlands

freeBSD

Post by pbdep »

Hiya,

Yes the idea of PB linux version is that it is compiled for Linux code,
There BSD code is different it wont work!

Regards, Norman.
pthien
Enthusiast
Enthusiast
Posts: 145
Joined: Sun Jun 29, 2003 9:39 pm

Post by pthien »

Well, yes and no. FreeBSD has Linux compatibility built into it. I believe it actually has a Linux kernel it loads if you specify Linux compatibility. As I said in my post, I'm able to execute PB-compiled code, and other Linux executables. Just not FASM. I believe for complex files, FASM hoses the Elf header. Others over at the FASM user group have confirmed this, I believe.

Thanks!
Phil
pbdep
User
User
Posts: 68
Joined: Fri Apr 25, 2003 5:18 pm
Location: Netherlands

BSD

Post by pbdep »

I did not know Fred included the possibility of BSD code because
it failed on my OpenBSD (which is different that FreeBSD) machine last year...(where it was using NASM)..

Well in that case Fasm is the problem.. I dont know the differance between
the ASM code or System calls in the kernel between Linux and BSD but its compatibility option is a way of using linux code under FreeBSD...

If you get it running post me a code example...:-)

Greetings, Pbdep.
kwag
User
User
Posts: 35
Joined: Thu Jul 17, 2003 10:03 pm
Contact:

Post by kwag »

Hi pthien,

I found this: http://viewcvs.dataloss.nl/index.cgi/fasm-freebsd/

I haven't tried it. If you try it and it works, please let me know ;)

-Karl
Linux Lunatyk
User
User
Posts: 15
Joined: Sun Apr 18, 2004 8:01 pm
Location: Conroe TX

Re: FreeBSD/PureBasic/FASM issues

Post by Linux Lunatyk »

I don't know if this is what you are looking for but the following link takes you to flat-assembler which supports FreBSD, Linux and Windows.

http://flatassembler.net/download.php
Cheers, & Best Wishes
Linux user #169067

Mike T.
Post Reply