Date: Sun, 22 Jul 2012 18:25:45 +0200 From: Polytropon <freebsd@edvax.de> To: lei yang <yanglei.fage@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: help about free bsp version netcat to work it on ubuntu Message-ID: <20120722182545.39d6b96c.freebsd@edvax.de> In-Reply-To: <CAHsH0E_mj-g3YZcuMe0%2BDYLy_6=gzJNrhFE=CAy2SmiufUCAYA@mail.gmail.com> References: <CAHsH0E_mj-g3YZcuMe0%2BDYLy_6=gzJNrhFE=CAy2SmiufUCAYA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 22 Jul 2012 22:41:57 +0800, lei yang wrote: > Hi, > > I want to build a "netcat" on my local pc (ubuntu) with gcc, is it > possible? I'm new to free bsd I hope I don't misunderstand your intention: You are trying to build a Linux executable of netcat from FreeBSD's sources? You _do_ know that FreeBSD and Linux (here: Ubuntu) are two totally different operating systems. I'm not sure code is compatible at this level (but it maybe _could_ be, you'd have to try it). The netcat program (nc) is part of the FreeBSD operating system for some time now. There's also a port of netcat in /usr/ports/net/netcat (which can also be used). That port's Makefile lists some sources: ftp://coast.cs.purdue.edu/pub/tools/unix/netutils/netcat/ ftp://ftp.cuhk.edu.hk/pub/packages/security/purdue/netutils/netcat/ http://www.planetmirror.com/pub/lprng/TOOLS/ You could try to use that source distribution as well. > I have to quesion: > 1)where to download it's source it for "netcat" They can be found in /usr/src/contrib/netcat/ once you have extracted the source distribution of FreeBSD. Depending on which version of the OS (branch, revision, platform) you need, you have to select the corresponding archive from one of the download mirrors. Visit http://www.freebsd.org/ to find out where and how to obtain FreeBSD (or components of it). I would suggest using one of the FTP servers that are accessible for you at a good speed. > 2)how to build it on ubuntu with gcc? only make? I'm not even sure Linux will be able to compile FreeBSD sources. A "typical Linux build" would consist of the three commands # ./configure # make # make install but FreeBSD's OS sources don't need the 1st step. The Makefiles distributed also do use "BSD make", not "GNU make" (often refered to as gmake on non-Linux systems). If this isn't the answer to your question, feel free to be more specific. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120722182545.39d6b96c.freebsd>