porting: Linux to Freebsd

2010-10-02 Thread Chetan Shukla
Hi, Could someone please outline the steps needed in porting a general application from Linux to FreeBSD. Thanks Regards, Chetan DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed.

Re: porting: Linux to Freebsd

2010-10-02 Thread Dominic Fandrey
On 02/10/2010 08:42, Chetan Shukla wrote: Hi, Could someone please outline the steps needed in porting a general application from Linux to FreeBSD. If the thing is not tightly coupled to the kernel, the general compile guide to the software you try to compile will suffice most of the time.

Re: porting: Linux to Freebsd

2010-10-02 Thread Eitan Adler
On Sat, Oct 2, 2010 at 2:42 AM, Chetan Shukla chetan.shu...@aricent.com wrote: Hi, Could someone please outline the steps needed in porting a general application from Linux to FreeBSD. Thanks Regards, Chetan You may want to have a look at http://wiki.freebsd.org/AvoidingLinuxisms If you

Re: porting: Linux to Freebsd

2009-06-22 Thread Matthias Andree
Am 08.06.2009, 21:15 Uhr, schrieb Peter Jeremy peterjer...@optushome.com.au: On 2009-Jun-08 11:33:27 -0400, Robert Huff roberth...@rcn.com wrote: Alexander Leidinger writes: Right: I re-ran under bash, and got the same problems. Looking at configure.ac, I see:

Re: porting: Linux to Freebsd

2009-06-09 Thread Alexander Leidinger
Quoting Robert Huff roberth...@rcn.com (from Mon, 8 Jun 2009 16:36:58 -0400): Peter Jeremy writes: for ac_remove_CFLAG in -O1 -O2 -O3 ; do CFLAGS=${CFLAGS//${ac_remove_CFLAG}/} CPPFLAGS=${CPPFLAGS//${ac_remove_CFLAG}/}

Re: porting: Linux to Freebsd

2009-06-09 Thread Robert Huff
Alexander Leidinger writes: Obvious question but if you edited configure.ac, you did remember to rerun autoconf afterwards didn't you? Uh ... no. (When I said complete novice, wasn't kidding. :-) Not knowing C/++ when you want to port a C/C++ program makes it very hard

Re: porting: Linux to Freebsd

2009-06-09 Thread Boris Kochergin
Robert Huff wrote: Alexander Leidinger writes: Obvious question but if you edited configure.ac, you did remember to rerun autoconf afterwards didn't you? Uh ... no. (When I said complete novice, wasn't kidding. :-) Not knowing C/++ when you want to port a C/C++ program makes

Re: porting: Linux to Freebsd

2009-06-09 Thread Alexander Leidinger
Quoting Robert Huff roberth...@rcn.com (from Tue, 9 Jun 2009 08:34:46 -0400): Alexander Leidinger writes: Obvious question but if you edited configure.ac, you did remember to rerun autoconf afterwards didn't you? Uh ... no. (When I said complete novice, wasn't kidding. :-)

Re: porting: Linux to Freebsd

2009-06-09 Thread Robert Huff
Alexander Leidinger writes: Quick checking suggests libttf is a Linux-ism, replaced by libfreetype. Is this correct, and if so can I just (temporarily) make the change in the list of libraries? Why not just try it? Note, there is/was freetype1 and freetype2...

Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff roberth...@rcn.com (from Mon, 8 Jun 2009 01:01:32 -0400): Is there anyone out there with experience porting from Linux to FreeBSD and/or writing code for both who can spare a few cycles to help a complete novice figure out what's different (and how to fix

Re: porting: Linux to Freebsd

2009-06-08 Thread Peter Jeremy
On 2009-Jun-08 01:01:32 -0400, Robert Huff roberth...@rcn.com wrote: Is there anyone out there with experience porting from Linux to FreeBSD and/or writing code for both who can spare a few cycles to help a complete novice figure out what's different (and how to fix it)? That's

Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff roberth...@rcn.com (from Mon, 8 Jun 2009 08:07:08 -0400): First problem: Looks like bash-isms in configure. When following the instructions here http://ctp2.darkdust.net/anonsvn/branches/linux/doc/README.linux; I get to step 2 (configure) and get this:

Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff
Alexander Leidinger writes: First problem: Looks like bash-isms in configure. for (i = 0; i 10; i++) hit_forehead_with_desk(); I had already figured out replacing make with gmake; this should have been obvious. When following the instructions here

Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff roberth...@rcn.com (from Mon, 8 Jun 2009 09:53:29 -0400): Alexander Leidinger writes: First problem: Looks like bash-isms in configure. for (i = 0; i 10; i++) hit_forehead_with_desk(); I had already figured out replacing make with gmake; this

Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff
Alexander Leidinger writes: Right: I re-ran under bash, and got the same problems. Looking at configure.ac, I see: AC_PATH_PROG(YACC,byacc,no) if test x$YACC == xno This should be a =, not a ==. Same result. Relevant bit is: for ac_remove_CFLAG in

Re: porting: Linux to Freebsd

2009-06-08 Thread Peter Jeremy
On 2009-Jun-08 11:33:27 -0400, Robert Huff roberth...@rcn.com wrote: Alexander Leidinger writes: Right: I re-ran under bash, and got the same problems. Looking at configure.ac, I see: AC_PATH_PROG(YACC,byacc,no) if test x$YACC == xno This should be a =, not a ==.

Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff
Peter Jeremy writes: for ac_remove_CFLAG in -O1 -O2 -O3 ; do CFLAGS=${CFLAGS//${ac_remove_CFLAG}/} CPPFLAGS=${CPPFLAGS//${ac_remove_CFLAG}/} CXXFLAGS=${CXXFLAGS//${ac_remove_CFLAG}/} done Quick try: CFLAGS=`echo $CFLAGS | sed -e

Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff
Lowell Gilbert writes: /usr/include/malloc.h:3:2: error: #error malloc.h has been replaced by stdlib.h Whichever file is being compiled has a line that should be changed from #include malloc.h to #include stdlib.h Done. Merrily compiling away.

Re: porting: Linux to Freebsd

2009-06-08 Thread Boris Kochergin
Robert Huff wrote: Robert Huff writes: Done. Merrily compiling away. New problem. One of the files has: #ifdef LINUX #include sys/mman.h #endif What is the FreeBSD magic tag corresponding to LINUX? __FREEBSD__?