Re: porting: Linux to Freebsd

2010-10-03 Thread Charlie Kester

On Fri 01 Oct 2010 at 23:42:30 PDT Chetan Shukla wrote:

Hi,
Could someone please outline the steps needed in porting a general
application from Linux to FreeBSD.


As others have already pointed out, there are no shortcuts to the
righthand side of the learning curve.

For most apps, the usual "configure; make; make install" works.  It's
when it doesn't that you need to be able to draw on the kind of
experience that puts you on the righthand side of the curve.  In some
cases, you really do need to be able to debug and write some code
yourself.

Apps written in Python or Perl tend to port fairly easily, because the
folks who have ported the languages and their main libraries have
already done most of the hard work.  


C and C++ apps, on the other hand, are more likely to surface
differences in the Linux and FreeBSD API's.  If you're porting one of
those, you need to be willing and able to dig in and research those
APIs. 


For a good grounding in the UNIX API's, I'd recommend the Stevens/Rago
book "Advanced Programming in the UNIX Environment".  

The Avoiding Linuxisms article also has a lot of useful information.  


The Porter's Handbook contains most of what you'll need to know once
you've got the app built and running OK and you want to add it to the
portstree.  (I say "most" because you'll still need to have some
profiency with BSD makefiles, and the Handbook doesn't teach you that.)
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2010-10-02 Thread Eitan Adler
On Sat, Oct 2, 2010 at 2:42 AM, Chetan Shukla  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 ask a more specific question you will probably get more specific answers.

-- 
Eitan Adler
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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.

Regards
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2010-10-02 Thread Julian H. Stacey
> On 02/10/2010 07:42:30, Chetan Shukla wrote:
> 
> > Could someone please outline the steps needed in porting a general appl=
> ication from
> > Linux to FreeBSD.
> 
> Step 1) Spend time (probably several years) achieving a reasonable level
> of expertise in the languages and concepts involved.



> Step 8) Goto step 4.
> 
> Perhaps you might ask a more narrowly specified question?  The answers
> will likely be a lot more useful to you.

Right :-) 

Chetan,
First check if the port already exists
http://www.freebsd.org/ports/

If no money:
- A few years academic study helps
- Obtain source code, check licence.
- Read sources.
- Read relevant FreeBSD manuals & documentation
- Work.
- If stuck, post exact questions to lists specific to whatever aspect.
- Feed code extensions back to generic source owner.
- Use send-pr to give us a working ports/ wrapper.

If you have money but want details confidential, 
Hire a professional consultant.  
Here's a geographicly indexed list:
http://berklix.com/consultants/
PS more consultants welcome to add their details, see page for format.

Cheers,
Julian
-- 
Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Mail plain text;  Not HTML, quoted-printable & base 64 spam formats.
Avoid top posting, It cripples itemised cumulative responses.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2010-10-02 Thread Torfinn Ingolfsen
Or you could simply start at step 3, then for every problem you have in step
4, Google it. For the problems you cannot fix that way, ask (smart)
questions on the appropriate FreeBSD mailing lists, until the application
compiles. Then continue to step 5.

Note: the learning curve will be steep, take the time needed to make it.

On Sat, Oct 2, 2010 at 9:28 AM, Matthew Seaman <
m.sea...@infracaninophile.co.uk> wrote:

> On 02/10/2010 07:42:30, Chetan Shukla wrote:
>
> > Could someone please outline the steps needed in porting a general
> application from
> > Linux to FreeBSD.
>
> Step 1) Spend time (probably several years) achieving a reasonable level
> of expertise in the languages and concepts involved.
>
> Step 2) During the same time, become intimately familiar with the
> applicable bits of API and the general operating environment available
> under FreeBSD.
>
> Step 3) Copy distfile tarballs onto FreeBSD box, or otherwise obtain the
> source code.
>
> Step 4) Try to configure and compile the software, or otherwise do what
> is needed to get the software into a usable state.
>
> Step 5) Test it
>
> Step 6) If it works, stop the compile/test cycle here and publish your
> results, preferably by writing a new port and submitting it as described
> in the Porter's handbook.
>
> Step 7) Else generate fixes for any apparent problems.
>
> Step 8) Goto step 4.
>
> Perhaps you might ask a more narrowly specified question?  The answers
> will likely be a lot more useful to you.
>
>Cheers,
>
>Matthew
>
> --
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>  Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
>
>


-- 
mvh
Torfinn
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2010-10-02 Thread Matthew Seaman
On 02/10/2010 07:42:30, Chetan Shukla wrote:

> Could someone please outline the steps needed in porting a general 
> application from
> Linux to FreeBSD.

Step 1) Spend time (probably several years) achieving a reasonable level
of expertise in the languages and concepts involved.

Step 2) During the same time, become intimately familiar with the
applicable bits of API and the general operating environment available
under FreeBSD.

Step 3) Copy distfile tarballs onto FreeBSD box, or otherwise obtain the
source code.

Step 4) Try to configure and compile the software, or otherwise do what
is needed to get the software into a usable state.

Step 5) Test it

Step 6) If it works, stop the compile/test cycle here and publish your
results, preferably by writing a new port and submitting it as described
in the Porter's handbook.

Step 7) Else generate fixes for any apparent problems.

Step 8) Goto step 4.

Perhaps you might ask a more narrowly specified question?  The answers
will likely be a lot more useful to you.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


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. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-22 Thread Matthias Andree
Am 08.06.2009, 21:15 Uhr, schrieb Peter Jeremy  
:



On 2009-Jun-08 11:33:27 -0400, Robert Huff  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 "==".


Same result.


 >   Relevant bit is:
 >
 > 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 's:-O[123]::g'`


No change here either.


Obvious question but if you edited configure.ac, you did remember to
rerun autoconf afterwards didn't you?  Can you post the configure
script?

Note that your problems with configure do not surprise me.  Despite
claims otherwise, it appears to have been designed (using the word
very loosely) as a tool to impede application portability.


I beg to differ on "impede". It's a tool, as you're writing, and as such,  
it can only be as powerful as its operator. Programmers using non-portable  
shell code are subverting the tool, not using it.


Operating systems also have their share there. For instance, all too many  
FreeBSD system header files are _not_ standalone, but have undocumented  
dependencies on other headers, even if that runs counter to IEEE Std.  
1003.1 (aka Single Unix Specification or POSIX). While such bugs are  
easily fixed, it's often hard for the learning porter to do...


So rather than spraying non-helpful comments over the thread (if you have  
issues with autoconf, file bug reports or contribute to make autoconf - or  
another tool you deem more suitable - better).


--
Matthias Andree
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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...

True.  I only have freetype2 installed; we'll see if that does
the trick.
Um - looks like not.  Installing freetype1.
AH-hah.  print/freetype2 installs libfreetype; print/freetype
installs libttf.  That fixed it.

The program compiles and installs.
Before running (for which I may be back for more help) I'm
going to re-initialize the code base and check to make sure my
change notes work.

Profuse thanks to everyone for the help.



Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-09 Thread Alexander Leidinger
Quoting Robert Huff  (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. :-)

 Not knowing C/++ when you want to port a C/C++ program makes it very
 hard for you to reach your goal...


C, I know.  (Though not as much as other folks.)
GNU build tools ... not so much.
:-)

Anyway: many hours of compilation later, I hit this:

/usr/bin/ld: cannot find -lttf

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...

Bye,
Alexander.

--
Legalize free-enterprise murder: why should governments have all the
fun?

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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 it very  
 hard for you to reach your goal...



C, I know.  (Though not as much as other folks.)
GNU build tools ... not so much.
:-)

Anyway: many hours of compilation later, I hit this:

/usr/bin/ld: cannot find -lttf

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?


Robert Huff


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
  
Seems that way 
(http://fixunix.com/redhat/139735-fly-make-problem-fc3.html). Anyway, it 
will be sure to complain about not being able to find the symbols it's 
looking for if it's not the case.


-Boris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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 for you to reach your goal...

C, I know.  (Though not as much as other folks.)
GNU build tools ... not so much.
:-)

Anyway: many hours of compilation later, I hit this:

/usr/bin/ld: cannot find -lttf

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?


Robert Huff


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-09 Thread Alexander Leidinger
Quoting Robert Huff  (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}/}
 >>  > CXXFLAGS=${CXXFLAGS//${ac_remove_CFLAG}/}
 >>  > done
 >>
 >>  Quick try:
 >>  CFLAGS=`echo $CFLAGS | sed -e 's:-O[123]::g'`
 >
 >   No change here either.

 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 for you to reach your goal...



Ran autoconf(-2.62).
That seems to have fixed the "configure" stage.
I'm into compilation, and:

/usr/include/malloc.h:3:2: error: #error " has been  
replaced by "


You didn't provide enough info. There should have been a line or two  
more which referenced files in the src of what you want to compile. In  
those places you have to replace the '#include ' with  
'#include '.


Bye,
Alexander.

Bye,
Alexander.

--
1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's
the law!

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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 
#endif

What is the FreeBSD magic tag corresponding to "LINUX"?
"__FREEBSD__"?


Robert Huff



___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
  

#ifdef __FreeBSD__

-Boris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff

Robert Huff writes:

>   Done.  Merrily compiling away.

New problem.
One of the files has:

#ifdef LINUX
#include 
#endif

What is the FreeBSD magic tag corresponding to "LINUX"?
"__FREEBSD__"?


Robert Huff



___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Robert Huff

Lowell Gilbert writes:

>  > /usr/include/malloc.h:3:2: error: #error " has been replaced by 
> "
>  
>  Whichever file is being compiled has a line that should be changed from 
>   #include 
>  to 
>   #include 

Done.  Merrily compiling away.




___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Lowell Gilbert
Robert Huff  writes:

> 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 's:-O[123]::g'`
>>  >
>>  >   No change here either.
>>  
>>  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. :-)
>   Ran autoconf(-2.62).
>   That seems to have fixed the "configure" stage.
>   I'm into compilation, and:
>
> /usr/include/malloc.h:3:2: error: #error " has been replaced by 
> "

Whichever file is being compiled has a line that should be changed from 
 #include 
to 
 #include 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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 's:-O[123]::g'`
>  >
>  >No change here either.
>  
>  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. :-)
Ran autoconf(-2.62).
That seems to have fixed the "configure" stage.
I'm into compilation, and:

/usr/include/malloc.h:3:2: error: #error " has been replaced by 
"


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Peter Jeremy
On 2009-Jun-08 11:33:27 -0400, Robert Huff  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 "==".
>
>   Same result.
>
>>  >   Relevant bit is:
>>  >
>>  > 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 's:-O[123]::g'`
>
>   No change here either.

Obvious question but if you edited configure.ac, you did remember to
rerun autoconf afterwards didn't you?  Can you post the configure
script?

Note that your problems with configure do not surprise me.  Despite
claims otherwise, it appears to have been designed (using the word
very loosely) as a tool to impede application portability.

-- 
Peter Jeremy


pgpXyJZsU2fTs.pgp
Description: PGP signature


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 "-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 's:-O[123]::g'`

No change here either.


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff  (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
should have been obvious.



 >   When following the instructions here
 > "http://ctp2.darkdust.net/anonsvn/branches/linux/doc/README.linux"; I
 > get to step 2 ("configure") and get this:
 >
 > test: x/usr/bin/byacc: unexpected operator

 Some possibilities:
   - In the test for byacc they maybe forgot quotes to protect an  
empty value.

   - wrong operator used in test
   - unknown bashism


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 "==".


 Looks like bashism. Someone tries to substitute something in CFLAGS,
 but this kind of advanced substitution is not supported in a posix
 compliant sh. You can test this assumption by installing bash and
 runnging "bash ./configure" instead. If it is true, you need to fix
 configure.in or configure.ac.


Relevant bit is:

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 's:-O[123]::g'`

Bye,
Alexander.

--
MANAGER:
A man known for giving great meeting.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


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
>  > "http://ctp2.darkdust.net/anonsvn/branches/linux/doc/README.linux"; I
>  > get to step 2 ("configure") and get this:
>  >
>  > test: x/usr/bin/byacc: unexpected operator
>  
>  Some possibilities:
>- In the test for byacc they maybe forgot quotes to protect an empty value.
>- wrong operator used in test
>- unknown bashism

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"
then
   AC_MSG_ERROR([

byacc could not be found!

Make sure byacc is in your path.
 
   ])
else
   YACC="${YACC}"
   YFLAGS="-d -v"
   AC_SUBST(YACC)
   AC_SUBST(YFLAGS)
   AC_DEFINE(AUTOMAKE_INVOKES_YACC,1,[Defined when automake runs yacc and 
renames the output files])
fi


>  > checking for acroread... /usr/local/bin/acroread
>  > ./configure: ${CFLAGS/...}: Bad substitution
>  
>  Looks like bashism. Someone tries to substitute something in CFLAGS,  
>  but this kind of advanced substitution is not supported in a posix  
>  compliant sh. You can test this assumption by installing bash and  
>  runnging "bash ./configure" instead. If it is true, you need to fix  
>  configure.in or configure.ac.

Relevant bit is:

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


Robert Huff

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff  (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:

appending configuration tag "F77" to libtool
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for byacc... /usr/bin/byacc
test: x/usr/bin/byacc: unexpected operator


Some possibilities:
 - In the test for byacc they maybe forgot quotes to protect an empty value.
 - wrong operator used in test
 - unknown bashism


checking for unzip... /usr/local/bin/unzip
test: x/usr/local/bin/unzip: unexpected operator


The same as above.

[...]

checking for acroread... /usr/local/bin/acroread
./configure: ${CFLAGS/...}: Bad substitution


Looks liek bashism. Someone tries to substitute something in CFLAGS,  
but this kind of advanced substitution is not supported in a posix  
compliant sh. You can test this assumption by installing bash and  
runnging "bash ./configure" instead. If it is true, you need to fix  
configure.in or configure.ac.


Bye,
Alexander.

--
This unit... must... survive.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: porting: Linux to Freebsd

2009-06-08 Thread Peter Jeremy
On 2009-Jun-08 01:01:32 -0400, Robert Huff  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 an extremely open-ended question.  Probably the biggest issue
is the use of GNU extensions in system utilities - particularly the
assumption that /bin/sh is bash.

You would probably be better off asking specific questions on problems
that you run into.

-- 
Peter Jeremy


pgpKgMCicra7N.pgp
Description: PGP signature


Re: porting: Linux to Freebsd

2009-06-08 Thread Alexander Leidinger
Quoting Robert Huff  (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
it)?


Have a look at http://wiki.freebsd.org/AvoidingLinuxisms for some  
generic advise. Feel free to propose things to add there (or add them  
yourself, we hand out write access upon request).


If you do not know how to port a specific part of an application to  
FreeBSD, feel free to ask here (or on a more specific ML, e.g. if it  
is network related, the network ML of FreeBSD is maybe better suited).


Bye,
Alexander.

--
The plural of spouse is spice.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


porting: Linux to Freebsd

2009-06-07 Thread Robert Huff

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)?

Respectfully,


Robert Huff


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"