pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ast-ksh fails to build on NetBSD 7



>   | I have not had any luck building ast-ksh 2012-08 on NetBSD 7 beta
>   | (20141103) from either source or pkgsrc (2014Q2).
>   | When compiling on 7 no binary is produced.
>
> That's not really useful information - there are link errors (or at
> least I saw some when I just tried to build it), it would have helped
> if you had mentioned them ... it can help get the (perhaps just one)
> person who recognises what happened, and how it should be fixed, to
> look at it.   "It doesn't work" is likely to be treated as "someone
> else's problem, probably"...

Hear, hear!

> + cc -O2 '-L.' '-L/usr/obj/pkg/shells/ast-ksh/work.testnb7/arch/netbsd.amd64/lib' -o 'suid_exec' 'suid_exec.o' '/usr/obj/pkg/shells/ast-ksh/work.testnb7/arch/netbsd.amd64/lib/libast.a' '/usr/obj/pkg/shells/ast-ksh/work.testnb7/arch/netbsd.amd64/lib/libast.a'
> /usr/obj/pkg/shells/ast-ksh/work.testnb7/arch/netbsd.amd64/lib/libast.a(sfcvt.o): In function `_sfcvt':
> sfcvt.c:(.text+0x2f1): undefined reference to `frexpl'
> sfcvt.c:(.text+0x306): undefined reference to `ldexpl'
> sfcvt.c:(.text+0x3bb): undefined reference to `ldexpl'
> mamake [cmd/ksh93]: *** exit code 1 making suid_exec

These sound like modernish floating functions, and they're apparently
not part of our math library (yet).  However, frexp()/frexpf() and
ldexp()/ldexpf() exist, but where frexp() and ldexp() take a double
argument, frexpl()/ldexpl() appear to take a "long double".  Why a
shell needs these functions, though, is a bit beyond me...

A quick & dirty fix might be to use frexp() / ldexp() instead, and
cast the offending argument from "long double" to "double" (or let
prototype visibility do that for you).

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index