porting: Linux to Freebsd

Alexander Leidinger Alexander at Leidinger.net
Tue Jun 9 10:11:12 UTC 2009


Quoting Robert Huff <roberthuff at 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}/}
>>  >>  > 	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 "<malloc.h> has been  
> replaced by <stdlib.h>"

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 <malloc.h>' with  
'#include <stdlib.h>'.

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.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-ports mailing list