From owner-freebsd-questions@FreeBSD.ORG Sun Feb 6 08:36:11 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E37416A4CE for ; Sun, 6 Feb 2005 08:36:11 +0000 (GMT) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 606CF43D46 for ; Sun, 6 Feb 2005 08:36:10 +0000 (GMT) (envelope-from tedm@toybox.placo.com) Received: from tedwin2k (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) j168aBj97688; Sun, 6 Feb 2005 00:36:11 -0800 (PST) (envelope-from tedm@toybox.placo.com) From: "Ted Mittelstaedt" To: "Brian John" , Date: Sun, 6 Feb 2005 00:36:07 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <4205B299.9080403@fusemail.com> Importance: Normal Subject: RE: How to compile linux apps? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2005 08:36:11 -0000 Brian, This package does some unportable stuff, one of the biggies is making assumptions about the system getopt. Your going to have to make some mods to it and no guarentees it will work even once you get it installed. Let us know, though. Anyway here's the list: 1) CD to /usr/ports/devel/libgnugetopt make DON'T DO MAKE INSTALL!!!! cd ./work/libgnugetopt-1.2 cp getopt1.c /usr/home/brian/allin1-0.5.0/src cp getopt.h /usr/home/brian/allin1-0.5.0/src cp getopt.c /usr/home/brian/allin1-0.5.0/src cd /usr/home/brian/allin1-0.5.0/src using your favorite text editor, open the Makefile located in the src directory in the distribution and make the following changes: CFLAGS = -ggdb -Wall -O2 -I /usr/X11R6/include MODULES = allin1.o dockhelper.o memory.o battery.o cpu.o \ network.o filesys.o confparse.o seti.o getopt.o getopt1.o INCLUDES = dockhelper.h memory.h battery.h cpu.h network.h filesys.h seti.h \ confparse.h getopt.h Now, in the allin1.c program, use a text editor and make the following changes: #include needs to be #include "getopt.h" add in #include line 215 of the program lists: strcpy(eth.intf_name,"eth"); change this to your network adapter interface, for example if it's "tl0" change this to: strcpy(eth.intf_name,"tl"); (this may need to be changed elsewhere in addition to this place, I did not bother looking over the code that well) Now, in the filesys.c program, use a text editor and make the following changes: get rid of the line #include and replace it with #include #include Now you can do "make" and you will get a binary. copy the allin1.conf.example to your home directory and edit it, then try running the binary on an Xterm and see what happens. It does appear to want to run best in Fluxbox I hope you have it installed. If it doesen't work, then e-mail the author of the program http://ilpettegolo.altervista.org/linux_allin1.en.shtml with the changes you have done, and he may go ahead and add in some ifdefs to the program to allow it to compile on FreeBSD out of the box, as well as fix whatever else on it doesen't work. Ted > -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Brian John > Sent: Saturday, February 05, 2005 10:01 PM > To: freebsd-questions@freebsd.org > Subject: How to compile linux apps? > > > Hello, I'm trying to compile the 'allin1' dockapp for fluxbox. When I > type 'make', I get the following errors: > n# make > gcc -ggdb -Wall -O2 -c allin1.c > allin1.c:32:22: X11/Xlib.h: No such file or directory > In file included from allin1.c:34: > dockhelper.h:86: error: syntax error before '*' token > dockhelper.h:89: error: syntax error before "p" > dockhelper.h:92: error: syntax error before '*' token > dockhelper.h:95: error: syntax error before "src" > dockhelper.h:98: error: syntax error before '*' token > dockhelper.h:98: warning: type defaults to `int' in declaration of > `dh_display' > dockhelper.h:98: warning: data definition has no type or storage class > In file included from allin1.c:37: > cpu.h:54: error: syntax error before "Pixmap" > allin1.c: In function `main': > allin1.c:174: error: syntax error before "event" > allin1.c:414: warning: implicit declaration of function `XPending' > allin1.c:415: warning: implicit declaration of function `XNextEvent' > allin1.c:415: error: `event' undeclared (first use in this function) > allin1.c:415: error: (Each undeclared identifier is reported only once > allin1.c:415: error: for each function it appears in.) > allin1.c:417: error: `Expose' undeclared (first use in this function) > allin1.c:418: warning: implicit declaration of function > `XCheckTypedEvent' > allin1.c:421: error: `DestroyNotify' undeclared (first use in > this function) > allin1.c:422: warning: implicit declaration of function `XCloseDisplay' > *** Error code 1 > > Stop in /usr/home/brian/allin1-0.5.0/src. > > > Any clue how I can compile this? > > Thanks > > /Brian > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" >