Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301508 - sys-libs/readline-6.1 fails on FreeBSD Prefix
Summary: sys-libs/readline-6.1 fails on FreeBSD Prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-19 12:13 UTC by Christian Faulhammer (RETIRED)
Modified: 2010-03-24 04:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log (config.log,80.10 KB, text/plain)
2010-01-21 12:54 UTC, Christian Faulhammer (RETIRED)
Details
config.log (config.log,80.10 KB, text/plain)
2010-01-21 12:54 UTC, Christian Faulhammer (RETIRED)
Details
readline freebsd (readline-fauli.patch,273 bytes, patch)
2010-01-21 17:22 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Faulhammer (RETIRED) gentoo-dev 2010-01-19 12:13:34 UTC
for x86-freebsd readline fails because it cannot find sgtty.h in examples/rlfe/os.h.  sgtty is not provided by libc anymore in FreeBSD 8.0, so termios.h should be used, but only included by os.h if we have a POSIX define.  Normally I would expect that a BSD triggers a POSIX, but it does not.  So a fix would be to use a ifdef for FreeBSD, or has anybody another idea?

By the way, readline 5 builds flawlessly.
Comment 1 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-21 08:32:35 UTC
I don't get a clue how POSIX is detected by readline's configure system...anybody can give me a hint?
Comment 2 Fabian Groffen gentoo-dev 2010-01-21 10:31:47 UTC
give us your config.log
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-21 12:54:18 UTC
Created attachment 217068 [details]
config.log

#ifdef POSIX
# include <termios.h>
# ifdef hpux
#  include <bsdtty.h>
# endif /* hpux */
# ifdef NCCS
#  define MAXCC NCCS
# else
#  define MAXCC 256
# endif
#else /* POSIX */
# ifdef TERMIO
#  include <termio.h>
#  ifdef NCC
#   define MAXCC NCC
#  else
#   define MAXCC 256
#  endif
#  ifdef CYTERMIO
#   include <cytermio.h>
#  endif
# else /* TERMIO */
#  ifndef __INTERIX
#    include <sgtty.h>
#  endif
# endif /* TERMIO */
#endif /* POSIX */
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-21 12:54:45 UTC
Created attachment 217071 [details]
config.log

#ifdef POSIX
# include <termios.h>
# ifdef hpux
#  include <bsdtty.h>
# endif /* hpux */
# ifdef NCCS
#  define MAXCC NCCS
# else
#  define MAXCC 256
# endif
#else /* POSIX */
# ifdef TERMIO
#  include <termio.h>
#  ifdef NCC
#   define MAXCC NCC
#  else
#   define MAXCC 256
#  endif
#  ifdef CYTERMIO
#   include <cytermio.h>
#  endif
# else /* TERMIO */
#  ifndef __INTERIX
#    include <sgtty.h>
#  endif
# endif /* TERMIO */
#endif /* POSIX */
Comment 5 Fabian Groffen gentoo-dev 2010-01-21 17:17:52 UTC
check your sys/param.h
Comment 6 Fabian Groffen gentoo-dev 2010-01-21 17:22:27 UTC
Created attachment 217097 [details, diff]
readline freebsd

there, try that
Comment 7 Fabian Groffen gentoo-dev 2010-01-23 12:45:29 UTC
duurtlang
Comment 8 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-28 08:21:58 UTC
Gentoo/FreeBSD did not suffer (that's the fact I wondered about) because they are based on FreeBSD 7, which still ships sgtty.h, while 8 (where I built the Prefix on) only has termios.h.  So your patch is fine.
 Should I abandon older profiles for FreeBSD prefix completely?
Comment 9 Fabian Groffen gentoo-dev 2010-01-28 09:44:13 UTC
so the patch will break older freebsd's, great.

what profiles are you talking about?  Aren't you on an freebsd/8.0/x64 (or similar) profile?
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-28 09:56:11 UTC
(In reply to comment #9)
> so the patch will break older freebsd's, great.

 Not necessarily.  I do not have an installation of FreeBSD 7, but as far as I understand, sgtty.h is shipped alongside termios.h in that releases.

> what profiles are you talking about?  Aren't you on an freebsd/8.0/x64 (or
> similar) profile?

 I am, but should I delete the older ones as I won't be able to support them anyway?


Comment 11 Fabian Groffen gentoo-dev 2010-01-28 09:59:22 UTC
no, leave the profiles as is
Comment 12 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-28 15:47:05 UTC
Can someone commit that patch as my commit system is not Prefix ready and will reject the ebuild name.
Comment 13 Christian Faulhammer (RETIRED) gentoo-dev 2010-02-07 13:32:55 UTC
Thanks mduft
Comment 14 Javier Villavicencio (RETIRED) gentoo-dev 2010-03-16 13:02:19 UTC
@base-system, can we get this patch on the main tree? It hits Gentoo/FreeBSD-8 too, and 7.2 didn't break with it.
Comment 15 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-16 13:30:19 UTC
So let's reopen, so it is not hidden in fixed bug pile.
Comment 16 SpanKY gentoo-dev 2010-03-16 21:04:32 UTC
i dont see a problem with the patch.  you're going to send it to the bash list right ? ;)
Comment 17 Javier Villavicencio (RETIRED) gentoo-dev 2010-03-23 13:52:03 UTC
Report sent. Will commit the patch later if no objections.
Comment 18 Javier Villavicencio (RETIRED) gentoo-dev 2010-03-24 04:17:27 UTC
Fixed in CVS.