Re: I think, everyone can'T compile xmule in Mandrake, can you? - was Re: Anyone compiled XMULE ?

From: Dave Gibson (dave02_at_gibson-hrd.abelREMOVEgratis.co.uk)
Date: 09/12/03


Date: Fri, 12 Sep 2003 03:49:19 +0100

Kasek <klasyk99@friko2.onet.pl> wrote:
>>Does this work?
>>
>>CFLAGS="-I/usr/include/gtk-2.0 -I/usr/include/glib-2.0" ./configure
>
> No, I try it and hundred other

First, an apology. I didn't read your original post carefully enough,
I should have suggested:

CXXFLAGS="-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" ./configure

Give that a go and see what happens.

> Bacause I try compiled xmule and I can't (no file gtk/gtk.h, but it
> was)
> I reinstal my Mandrake 9.1
> New system.
> I have xmule-1.6.0-1plf.src.rpm, xmule-1.6.0-1plf.src.rpm and
> xmule-1.6.0.tar.gz
>
> #>rpm -rebuild xmule-1.6.0-1plf.src.rpm
> error: niespe?nione zale?no?ci:
> libgtk+2.0_0-devel jest wymagany przez xmule-1.6.0-1plf
> #>rpm --rebuild xmule-1.6.0-5.fr.src.rpm
> error: niespe?nione zale?no?ci:
> wxGTK-devel jest wymagany przez xmule-1.6.0-5.fr
>
> OK, no problem

Those were missing dependencies?

> #>urpmi libgtk+2.0_0-devel
> Przygotowywanie...
> ##################################################
> 1:libgtk+2.0_0-devel
> ##################################################
> #>Zostan? zainstalowane nast?puj?ce pakiety w celu spe?nienia
> zale?no?ci (12
> MB):
> libwxgtk2.4-2.4.0-3mdk.i586
> libwxgtk2.4-devel-2.4.0-3mdk.i586
> libwxgtkgl2.4-2.4.0-3mdk.i586
> wxGTK-2.4.0-3mdk.i586
> W porz?dku? (T/n) T

Ok, dependencies fixed.

> excellent !!! ;-)
>
> #>rpm -rebuild xmule-1.6.0-1plf.src.rpm
> echo './'
> ddFriend.cpp
> In file included from wintypes.h:44,
> from AddFriend.cpp:22:
> mfc.h:27:18: glib.h: No such file or directory
> In file included from xmuleDlg.h:41,
> from xmule.h:30,
> from AddFriend.cpp:23:
> SysTray.h:20:21: gtk/gtk.h: No such file or directory

gcc can't find the headers.

[snip many build attempts, all failed on inability to find headers]

> I add
> /usr/local/lib
> in /etc/ld.so.conf
> and
> #>ldconfig

I don't think this is getting anywhere near the linker yet. But
that won't hurt.

[snip more build attempts, more failure to find headers]

> A n y i d e a s ? ?? !!!!#!#!#!#!#!#!#!

Well, maybe.

> I thing, maybe this warning
>
> checking if wxWindows was linked with GTK2... yes
> checking for pkg-config... /usr/bin/pkg-config
> checking for GTK+ - version >= 2.0.3... no

Hmm, pkg-config. That's interesting.

> *** Could not run GTK+ test program, checking why...
> *** The test program failed to compile or link. See the file

[snip]

> #> cat ./config.log | grep -i gtk
>
> configure:7538: checking if wxWindows was linked with GTK2
> configure:7627: checking for GTK+ - version >= 2.0.3
> configure:7860:21: gtk/gtk.h: No such file or directory

configure is trying to find out where the includes are, but
pkg-config doesn't seem to know.

[snip]

> CXXFLAGS='-D__GTK2__ -g -I/usr/lib/wx/include/gtk2-2.4
> -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
> -Isrc '

This is interesting, too. That line above should have contained
the gtk and glib include statements (-I/usr/include/gtk-2.0 etc).
It's not so much pkg-config, as the gtk and glib devel rpms, they
don't seem to have installed the pkgconfig support files.

[snip]

> Maybe bad xmule*.src.rpm
>
> No, it is good.
>
> http://rpm.pbone.net
> You have choosen search rpm in world FTP resources.
> Display 1 - 4 hits of 4. Search took 0.00 seconds.
>
> 1
> Search results for xmule* :
> ftp.pbone.net xmule-1.6.0-1plf.src.rpm Mandrake
> ^^^^^^^ I try it, all the time
>
> ftp.pbone.net xmule-1.6.0-1plf.i586.rpm Mandrake 9.X
> ftp.pbone.net xmule-1.6.0-1plf.i586.rpm Mandrake Other
> ftp.pbone.net xmule-1.6.0-1plf.i586.rpm Mandrake 9.X
> ^^^^^^^^^^^^^^^^^^^^^
> It's OK, I can run xmule, but I need change sources,
> and recompile. :-(

Ok, I think we're dealing with a pkg-config/libgtk+/libglib
problem.

Even if the CXXFLAGS thing works, it would be a good idea to fix
the pkg-config system.

Assuming the CXXFLAGS thing failed, give these a go:

  pkg-config --version
  pkg-config --modversion gtk+-2.0
  pkg-config --modversion glib-2.0

If you get this kind of message:

  Package foo was not found in the pkg-config search path.
  Perhaps you should add the directory containing `foo.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'foo' found

your system is missing one or both of these files:

  /usr/lib/pkgconfig/gtk+-2.0.pc
  /usr/lib/pkgconfig/glib-2.0.pc

Note, those are the paths on my system (Slackware), Mandrake may
have them in a different path. You may be able to find out what
that path is by doing

  strings /usr/bin/pkg-config | grep "^/"

If the .pc files are actually on your system, try this:

  PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure

adjust that path as necessary.

If the .pc files are not on your system, you may be able to
install them by hand. Look for them in the libglib-2.0_0-devel
and libgtk+2.0_0-devel rpms and the libglib-2.0_0-devel and
libgtk+2.0_0-devel *source* rpms. (I hope that isn't another
download for you.)

That's about all I can think of. You'll probably get a better
answer on

  news:alt.os.linux.mandrake

perhaps someone there has had the same problem (and fixed it).

One last attempt, let's throw everything at it:

export CFLAGS="-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
 -I/usr/X11R6/include -I/usr/include/freetype2
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include"
export CXXFLAGS="-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
 -I/usr/X11R6/include -I/usr/include/freetype2
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include"
export LDFLAGS="-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0
 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0
 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0"
./configure
make

Good luck.

-- 
Dave.


Relevant Pages