Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2000 10:31:35 -0700
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        John Daniels <jmd526@hotmail.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: linux application
Message-ID:  <38FB4A77.C437E132@cup.hp.com>
References:  <20000416175640.51290.qmail@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Daniels wrote:

> With that said, if the API binaries are linked in, it would seem logical
> that I would then then have to develop "under Linux" as you outlined -- but
> wouldn't I need to "brand" the programs that I develop? (If they are not
> branded, I would think that they would then only run under the linux
> "development" shell.)  And, if the API is implemented with *shared*
> binaries, couldn't I just "brand" those and develop my programs under
> FreeBSD?

You only need to brand static binaries. Shared binaries have the name of
the interpreter (dynamic linker) embedded in them, which automaticly
tells what kind of binary it is. Note that branding an ELF file doesn't
limit its use on other systems...

> Also, I know that I have the Linux compatibility installed (I did that when
> I installed the system and I am running Linux Netscape and Star Office), but
> how can I know if I already have linux_devtools installed (I may have
> installed it, I'm not sure)?

See pkg_info(1). 

> Your remarks lead me to believe that as long as I am working in a "linux
> shell" I am developing under linux, otherwise I am developing under FreeBSD.
>   Please let me know if this assumption is not correct.

Technically it's not correct. Practically, it is. When you're using a
Linux shell, then every external command will basicly be looked up under
/compat/linux first (depending on path). This means that you use the
Linux binaries if they are installed and the FreeBSD binaries otherwise
(loosely speaking). Thus, within a Linux shell, you will use the Linux
compiler and not the FreeBSD compiler (in general). This is not
hardcoded anywhere and is therefore not a "rule". If you know how things
work, you can easily change this behaviour and create a setup in which
this doesn't work. But, again: In general your assumption is right.

> Did you specifically mention C/C++ because that is what is supported by
> linux_devtools?

Yes.

> Do I have to have be running the Linux versions of other
> languages (e.g. Java) if I want to use them for development under the linux
> shell?

In general, if you are creating Linux binaries or need to link with
Linux libraries (either at compile-time or at run-time), you need a
Linux version of the language tools. Otherwise you should be able to use
FreeBSD native tools.

-- 
Marcel Moolenaar
  mail: marcel@cup.hp.com / marcel@FreeBSD.org
  tel:  (408) 447-4222


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38FB4A77.C437E132>