From owner-freebsd-questions@FreeBSD.ORG Sun Jul 22 16:25:48 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26E43106566B for ; Sun, 22 Jul 2012 16:25:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 370218FC12 for ; Sun, 22 Jul 2012 16:25:47 +0000 (UTC) Received: from r56.edvax.de (port-92-195-22-218.dynamic.qsc.de [92.195.22.218]) by mx01.qsc.de (Postfix) with ESMTP id 6C8703CFAD; Sun, 22 Jul 2012 18:25:46 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q6MGPj2r002775; Sun, 22 Jul 2012 18:25:46 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 22 Jul 2012 18:25:45 +0200 From: Polytropon To: lei yang Message-Id: <20120722182545.39d6b96c.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: help about free bsp version netcat to work it on ubuntu X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 16:25:48 -0000 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, ...