Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257653 - net-im/pidgin-2.5.5 is not prefix aware, one-line change to ebuild required
Summary: net-im/pidgin-2.5.5 is not prefix aware, one-line change to ebuild required
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High major (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 18:40 UTC by Stuart Shelton
Modified: 2009-10-03 13:37 UTC (History)
1 user (show)

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


Attachments
pidgin-2.5.x perl.c patch (pidgin-2.5.4-r1.patch,408 bytes, patch)
2009-03-09 12:10 UTC, Stuart Shelton
Details | Diff
build.log (build.log,248.80 KB, text/plain)
2009-06-20 14:46 UTC, Jacob Godserv
Details
pidgin-2.5.6-r1.ebuild (pidgin-2.5.6-r1.ebuild,4.58 KB, text/plain)
2009-06-21 16:01 UTC, Jacob Godserv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2009-02-04 18:40:15 UTC
The net-im/pidgin-2.5.4 ebuild includes:

    if use gnutls ; then
        einfo "Disabling NSS, using GnuTLS"
        myconf="${myconf} --enable-nss=no --enable-gnutls=yes"
        myconf="${myconf} --with-gnutls-includes=/usr/include/gnutls"
        myconf="${myconf} --with-gnutls-libs=/usr/$(get_libdir)"

... which is clearly wrong for prefix installs.

On my system, configure fails as it tries to find GnuTLS libraries in /usr/lib, and the compiler bombs out as it tries to link against incompatible legacy code in /usr/lib/.  Even if this hadn't failed, both the library and include paths are wrong.
Comment 1 Stuart Shelton 2009-02-04 18:41:50 UTC
Would changing this to:

    if use gnutls ; then
        einfo "Disabling NSS, using GnuTLS"
        myconf="${myconf} --enable-nss=no --enable-gnutls=yes"
        myconf="${myconf} --with-gnutls-includes=${EPREFIX}/usr/include/gnutls"
        myconf="${myconf} --with-gnutls-libs=${EPREFIX}/usr/$(get_libdir)"

... work, or does more need altering?

Lower down, the same ebuild does already contain:

        --x-includes="${EPREFIX}/usr/include/X11" \

... so has the GnuTLS stuff just been missed?
Comment 2 Stuart Shelton 2009-02-04 18:51:11 UTC
The configure script then contains:

if test "$enable_tcl" = yes; then
    { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
    TCLCONFIG=no
    TCLCONFIGDIRS="/usr/lib \
            /usr/lib64 \
            /usr/lib/tcl8.5 \
            /usr/lib/tcl8.4 \
            /usr/lib/tcl8.3 \
            /usr/lib/tcl8.2 \
            /usr/lib64/tcl8.5 \
            /usr/lib64/tcl8.4 \
            /System/Library/Tcl/8.3 \
            /usr/local/lib"
    for dir in $with_tclconfig $TCLCONFIGDIRS; do
        if test -f $dir/tclConfig.sh; then
            TCLCONFIG=$dir/tclConfig.sh
            { echo "$as_me:$LINENO: result: yes ($TCLCONFIG)" >&5
echo "${ECHO_T}yes ($TCLCONFIG)" >&6; }
        fi
    done

... which also needs to be updated to respect $EPREFIX
Comment 3 Stuart Shelton 2009-02-04 18:56:49 UTC
libpurple/plugins/perl.c doesn't check for the compiler before using GNU directives:

cc-1079 cc: ERROR File = perl.c, Line = 688
  A type specifier is expected.

  void __attribute__ ((constructor)) my_init(void);
                      ^

cc-1137 cc: ERROR File = perl.c, Line = 688
  Unnamed prototyped parameters not allowed when body is present.

  void __attribute__ ((constructor)) my_init(void);
       ^

cc-1129 cc: ERROR File = perl.c, Line = 688
  A left brace ("{") is expected at this point.

  void __attribute__ ((constructor)) my_init(void);
                                     ^

cc-1012 cc: WARNING File = perl.c, Line = 693
  Parsing restarts here after previous syntax error.

  {
  ^

unable to proceed because of earlier errors
3 errors detected in the compilation of "perl.c".
make[5]: *** [perl.lo] Error 1
make[5]: Leaving directory `/usr/opt/portage/var/tmp/portage/net-im/pidgin-2.5.4/work/pidgin-2.5.4/libpurple/plugins/perl'
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-02-13 15:09:57 UTC
fixed the ebuild, don't have time for the other stuff atm.
Comment 5 Stuart Shelton 2009-03-09 12:06:58 UTC
pidgin-2.5.4-r1 and pidgin-2.5.5 require the following change to the ebuild to work with prefix installs (for OS without GNU ncurses):

--- net-im/pidgin/pidgin-2.5.5.ebuild   2009-03-07 17:17:56.000000000 +0000
+++ net-im/pidgin/pidgin-2.5.5.ebuild    2009-03-09 11:49:14.398486200 +0000
@@ -162,6 +162,7 @@ src_configure() {
                "--with-dynamic-prpls=${DYNAMIC_PRPLS}" \
                --disable-mono \
                --x-includes="${EPREFIX}/usr/include/X11" \
+               --with-ncurses-headers="${EPREFIX}/usr/include/ncursesw" \
                ${myconf} || die "Configuration failed"
                #$(use_enable mono) \
 }
Comment 6 Stuart Shelton 2009-03-09 12:10:23 UTC
Created attachment 184448 [details, diff]
pidgin-2.5.x perl.c patch


pidgin requires a trivial change to prevent GNU attributes from causing the build to fail.
Comment 7 Stuart Shelton 2009-03-09 12:11:52 UTC
(Patch attached in Comment #6 fixes build problem from Comment #3)
Comment 8 Stuart Shelton 2009-03-09 12:48:50 UTC
(Additionally, the 'install' step of the process includes:

Making install in po
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory
grep: ./LINGUAS: No such file or directory

... so it looks as if some variable is perhaps unexpectedly unset.

Finally, 'qmerge' outputs:

 * Installing GNOME 2 GConf schemas
/opt/gentoo/var/tmp/portage/net-im/pidgin-2.5.5/temp/environment: line 2289: pgrep: command not found
 * Updating shared mime info database ...

'pgrep' is part of procps, which is Linux-specific)
Comment 9 Jacob Godserv 2009-06-20 14:46:05 UTC
Created attachment 195284 [details]
build.log

net-im/pidgin-2.5.6 also links to stuff in OSX root. I've attached the complete build.log

(Note that I only got this far because I hand-edited nss.pc and nspr.pc to remove the -R options, per bug #274814.)


if /Users/jacob/Library/Gentoo/bin/bash ../../libtool --silent --tag=CC --mode=compile x86_64-apple-darwin9-gcc -DHAVE_CONFIG_H -I. -I. -I../..  -D_REENTRANT -I/Users/jacob/Library/Gentoo/usr/include/glib-2.0 -I/Users/jacob/Library/Gen
too/usr/lib/glib-2.0/include   -I/usr/include/ -Wall  -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED -I/Users/jacob/Library/Gentoo/usr/include/libxml2   -I/Users/jacob/Librar
y/Gentoo/usr/include/python2.6   -g -O2 -pipe -march=nocona -MT gntmain.lo -MD -MP -MF ".deps/gntmain.Tpo" -c -o gntmain.lo gntmain.c; \
        then mv -f ".deps/gntmain.Tpo" ".deps/gntmain.Plo"; else rm -f ".deps/gntmain.Tpo"; exit 1; fi
gntwm.c: In function 'work_around_for_ncurses_bug':
gntwm.c:158: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:158: error: (Each undeclared identifier is reported only once
gntwm.c:158: error: for each function it appears in.)
gntwm.c:158: error: expected ';' before 'ch'
gntwm.c:174: warning: implicit declaration of function 'mvwin_wch'
gntwm.c:174: error: 'ch' undeclared (first use in this function)
gntwm.c:180: warning: implicit declaration of function 'mvwadd_wch'
gntwm.c: In function 'dump_file_save':
gntwm.c:735: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:735: error: expected ';' before 'wch'
gntwm.c:737: error: 'wch' undeclared (first use in this function)
gntwm.c: In function 'reverse_char':
gntwm.c:995: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:995: error: expected ';' before 'ch'
gntwm.c:997: error: 'ch' undeclared (first use in this function)
make[5]: *** [gntwm.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6/work/pidgin-2.5.6/finch/libgnt'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6/work/pidgin-2.5.6/finch/libgnt'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6/work/pidgin-2.5.6/finch/libgnt'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6/work/pidgin-2.5.6/finch'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6/work/pidgin-2.5.6'
make: *** [all] Error 2
 * ERROR: net-im/pidgin-2.5.6 failed:
 *   compile failure
 *
 * Call stack:
 *               ebuild.sh:  42: <call src_compile>
 *             environment:3456: <call gnome2_src_compile>
 *             environment:2498:     emake || die "compile failure"
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
Comment 10 Fabian Groffen gentoo-dev 2009-06-20 14:48:50 UTC
if you kill the -I/usr/include somehow you might get a bit further
Comment 11 Jacob Godserv 2009-06-21 16:01:15 UTC
Created attachment 195361 [details]
pidgin-2.5.6-r1.ebuild

I attempted to kill the -I/usr/include (and it worked), but it appears that the ncurses compiled by Prefix is also bad.

I attached the ebuild I used. Here's the latest error snippet:

if /Users/jacob/Library/Gentoo/bin/bash ../../libtool --silent --tag=CC --mode=compile x86_64-apple-darwin9-gcc -DHAVE_CONFIG_H -I. -I. -I../..  -D_REENTRANT -I/Users/jacob/Library/Gentoo/usr/include/glib-2.0 -I/Users/jacob/Library/Gentoo/usr/lib/glib-2.0/include   -I/Users/jacob/Library/Gentoo/usr/include/ncursesw/ -Wall  -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED -I/Users/jacob/Library/Gentoo/usr/include/libxml2   -I/Users/jacob/Library/Gentoo/usr/include/python2.6   -g -O2 -pipe -march=nocona -MT gntwm.lo -MD -MP -MF ".deps/gntwm.Tpo" -c -o gntwm.lo gntwm.c; \
	then mv -f ".deps/gntwm.Tpo" ".deps/gntwm.Plo"; else rm -f ".deps/gntwm.Tpo"; exit 1; fi
gntwm.c: In function 'work_around_for_ncurses_bug':
gntwm.c:158: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:158: error: (Each undeclared identifier is reported only once
gntwm.c:158: error: for each function it appears in.)
gntwm.c:158: error: expected ';' before 'ch'
gntwm.c:174: warning: implicit declaration of function 'mvwin_wch'
gntwm.c:174: error: 'ch' undeclared (first use in this function)
gntwm.c:180: warning: implicit declaration of function 'mvwadd_wch'
gntwm.c: In function 'dump_file_save':
gntwm.c:735: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:735: error: expected ';' before 'wch'
gntwm.c:737: error: 'wch' undeclared (first use in this function)
gntwm.c: In function 'reverse_char':
gntwm.c:995: error: 'cchar_t' undeclared (first use in this function)
gntwm.c:995: error: expected ';' before 'ch'
gntwm.c:997: error: 'ch' undeclared (first use in this function)
make[5]: *** [gntwm.lo] Error 1
make[5]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6-r1/work/pidgin-2.5.6/finch/libgnt'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6-r1/work/pidgin-2.5.6/finch/libgnt'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6-r1/work/pidgin-2.5.6/finch/libgnt'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6-r1/work/pidgin-2.5.6/finch'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/jacob/Library/Gentoo/var/tmp/portage/net-im/pidgin-2.5.6-r1/work/pidgin-2.5.6'
make: *** [all] Error 2
 [31;01m*[0m ERROR: net-im/pidgin-2.5.6-r1 failed:
 [31;01m*[0m   compile failure
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh:  42: <call src_compile>
 [31;01m*[0m             environment:3456: <call gnome2_src_compile>
 [31;01m*[0m             environment:2498:     emake || die "compile failure"
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
 [31;01m*[0m This ebuild is from an overlay named 'Jacob Godserv's ebuilds': '/Users/jacob/Library/Gentoo/usr/local/portage/'
Comment 12 Heiko 2009-07-10 15:52:22 UTC
(In reply to comment #10)
> if you kill the -I/usr/include somehow you might get a bit further
> 

Yes, you do: Add to pidgin-2.5.8.ebuild

src_prepare() {
    sed \
        -e "s:/usr/include/ncursesw /usr/include:\
            ${EPREFIX}/usr/include/ncursesw ${EPREFIX}/usr/include:g" \
        -i configure || die "sed failed"
}

Compiles fine for me, with the following USE-flags:
[ebuild   R   ] net-im/pidgin-2.5.8  USE="bonjour dbus gstreamer gtk ncurses perl sasl spell -debug -doc -eds -gadu -gnutls -groupwise -meanwhile -networkmanager -nls -prediction -qq -silc -tcl -tk -zephyr" 0 k

Finch, the ncurses frontend of pidgin, links and runs against prefixed sys-libs/ncurses-5.7.

This all was done on amd64-linux prefix.
Comment 13 Stuart Shelton 2009-07-10 17:09:11 UTC
>     sed \
>         -e "s:/usr/include/ncursesw /usr/include:\
>             ${EPREFIX}/usr/include/ncursesw ${EPREFIX}/usr/include:g" \
>         -i configure || die "sed failed"

Please note that my ebuild change from above does this without resorting to hacking with sed by using the '--with-ncurses-headers' configure option.
Comment 14 Heiko 2009-07-13 21:41:04 UTC
(In reply to comment #13)
> 
> Please note that my ebuild change from above does this without resorting to
> hacking with sed by using the '--with-ncurses-headers' configure option.
> 

Well, i looked at that option as well, but it's unable to handle both, ncurses- and ncursesw-headers. Don't know which impact that might have on wide/non-wide ncurses systems. Let's leave that to grobian.
Comment 15 Stuart Shelton 2009-07-14 09:39:17 UTC
> (In reply to comment #13)
> Well, i looked at that option as well, but it's unable to handle both, ncurses-
> and ncursesw-headers. Don't know which impact that might have on wide/non-wide
> ncurses systems. Let's leave that to grobian.

But doesn't your patch also only affect the ncursesw headers, suggesting that the plain ncurses headers aren't being used?

The whole wide/non-wide thing strikes me as a bit of a hack in the first place ;)
Comment 16 Fabian Groffen gentoo-dev 2009-10-03 13:37:29 UTC
I went for heiko's patch as it doesn't depend on ncurses[unicode].  I added the IRIX patch.