[openbeos] Re: joe - haiku ports

  • From: "scott mc" <scottmc2@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 18 Aug 2008 23:24:34 -0700

On Mon, Aug 18, 2008 at 9:21 PM, scott mc <scottmc2@xxxxxxxxx> wrote:
> On Mon, Aug 18, 2008 at 6:21 PM, Nick <tonestone57@xxxxxxxxxxx> wrote:
>> From:
>> http://ports.haiku-files.org/wiki/app-editors/joe
>>
>> scottmc
>>>Had to remove a -lm from the Makefile, other than that, fairly straight
>>> forward.
>>
>> Scott,
>>
>> I noticed you removed linking to libm.so ( -lm ) for joe. You should really
>> avoid doing this - can mess up the program.
>>
>> BeOS never came with libm.so because this library was merged into libroot.so
>> ( same should be true for Haiku )
>>
>> You should really create a symbolic link libm.so->libroot.so
>>
>> This should solve linking to libm.so
>>
>> Actually, a dev for Haiku should add this symbolic link to make porting
>> POSIX programs work right.
>>
>>
>> Regards,
>>
>> ________________________________
>
> Nick,
> At first I was wondering who Joe was, then realized you were talking
> about the editor...
> That was one i started on a few months ago but never finished.  I
> wouldn't call a port done with just removing a -lm.  There's a few
> ways to fix the -lm issue, but symlinking it to libroot.so would not
> be my choice.  It'd be better to put a check into configure.in, such
> as:
>
> LIBM=
> AC_CHECK_LIB(m,sqrtf,[LIBM=-lm])
>
> When the port doesn't use the GNU tools there's other creative ways to
> work around the issue.  Lua was one such case:
> http://ports.haiku-files.org/wiki/dev-lang/lua/5.1.4rc1/1
> I initially thought I'd need to create a special case for haiku, and
> when I contacted the port maintainer he pointed out that I could just
> put LIBS= on the command line and that would clear the LIBS=-lm that
> was set in the default.
> I'll take another look at fixing Joe maybe this week.
> -scottmc
>

I think it's fixed now.  Have a look at the patch and perhaps try it
out on a non-haiku system and see if it correctly detects needing -lm
on that system.  If it does let me know, this might be worth sending
back upstream.
http://ports.haiku-files.org/wiki/app-editors/joe/3.5/1
It's nice to have joe working on haiku, now i won't have to fight with
vim to do a check in ;)
-scottmc

Other related posts: