Libgio Dev Files


daniel3000

Still Fresh
Joined
Mar 20, 2009
Messages
89
Hi all,

when I try to compile GTK applications, they want to be linked against libgio often.
the libgio package is installed, but there is no libgio-dev package available.
And for some reason I am not able to find the header files on the Internet.

Could anyone please point me to these file(s)? It would be a great help.

(I am compiling on the Pandora itself, so I don't have access to packages of other distributions easily).

Thanks!
Daniel
 
daniel3000 said:
Hi all,

when I try to compile GTK applications, they want to be linked against libgio often.
the libgio package is installed, but there is no libgio-dev package available.
And for some reason I am not able to find the header files on the Internet.

Could anyone please point me to these file(s)? It would be a great help.

(I am compiling on the Pandora itself, so I don't have access to packages of other distributions easily).

Thanks!
Daniel
GIO is a part of glib. gio header are part of the libglib-dev package.
Now if the *.am files are not well done then configure won't issue the PKG_CONFIG call for gio thuss fail (as the header are not in the near standard place : $PREFIX/include/gio but in $PREFIX/include/glib-2.0/gio);
Setting your CPPFLAGS resolv this
 
Last edited by a moderator:
sebt3 said:
GIO is a part of glib. gio header are part of the libglib-dev package.
Now if the *.am files are not well done then configure won't issue the PKG_CONFIG call for gio thuss fail (as the header are not in the near standard place : $PREFIX/include/gio but in $PREFIX/include/glib-2.0/gio);
Setting your CPPFLAGS resolv this

You are right, I have found the files indeed in /usr/include/glib-2.0/gio/.

How does that CPPFLAGS thing work?

Would another solution be to dimply move all directories in glib-2.0 one directory level higher?
There is also glib-2.0/glib/... and when compiling another program I had the same issue with glib.

Thanks a lot!
Daniel
 
Last edited by a moderator:
daniel3000 said:
You are right, I have found the files indeed in /usr/include/glib-2.0/gio/.

How does that CPPFLAGS thing work?

Would another solution be to dimply move all directories in glib-2.0 one directory level higher?
There is also glib-2.0/glib/... and when compiling another program I had the same issue with glib.

Thanks a lot!
Daniel
to cheap shot :
Code:
cd /usr/include
for i in glib-2.0/*;do sudo ln -s $i .;done

about the CPPFLAGS, see this post. You'll want to adapt the PATH as i'm cross-compiling
 
Last edited by a moderator:
Thanks, sebt3, but....

sebt3 said:
to cheap shot :
Code:
cd /usr/include
for i in glib-2.0/*;do sudo ln -s $i .;done

about the CPPFLAGS, see this post. You'll want to adapt the PATH as i'm cross-compiling


I did the linking in /usr/include now, but still get ".../ld: cannot find -lgio-2.0".
I renamed /usr/include/gio to /usr/include/gio-2.0 but also to no avail.
I also tried with /usr/include/libgio-2.0. No dice.
What am I doing wrong?

(I try to compile leafpad currently)

Thanks a lot
Daniel
 
Last edited by a moderator:
daniel3000 said:
Thanks, sebt3, but....

I did the linking in /usr/include now, but still get ".../ld: cannot find -lgio-2.0".
I renamed /usr/include/gio to /usr/include/gio-2.0 but also to no avail.
I also tried with /usr/include/libgio-2.0. No dice.
What am I doing wrong?

(I try to compile leafpad currently)

Thanks a lot
Daniel

this means that the linker can't find the library. so first find the library and then set LDFLAGS="-L/path/to/giolib/directory/"
 
Last edited by a moderator:
crow_riot said:
this means that the linker can't find the library. so first find the library and then set LDFLAGS="-L/path/to/giolib/directory/"

it is installed in /usr/lib, just as a lot of other libs too:


/usr/lib/libgio-2.0.so.0
/usr/lib/libgio-2.0.so.0.2400.0

Could there be another reason?

Thanks,
Daniel
 
Last edited by a moderator:
crow_riot said:
this means that the linker can't find the library. so first find the library and then set LDFLAGS="-L/path/to/giolib/directory/"


okay, just tried this.
I feel like an idiot. ;-) Don't get it. :unsure:

What I do:
In the leafpad source directory, I do a ./configure, which doesn't produce any errors, then make.

After a while compiling several source files successfully, I get that error message (I'm posting the full gcc command with its error message here, in case there is something in it which reveals the actual source of the problem):


Code:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -g -O2 -Wall   -o leafpad leafpad-main.o leafpad-window.o leafpad-menu.o leafpad-callback.o leafpad-view.o leafpad-undo.o leafpad-font.o leafpad-linenum.o leafpad-indent.o leafpad-hlight.o leafpad-selector.o leafpad-file.o leafpad-encoding.o leafpad-search.o leafpad-dialog.o leafpad-gtkprint.o leafpad-gnomeprint.o leafpad-about.o leafpad-dnd.o leafpad-utils.o leafpad-emacs.o leafpad-gtksourceiter.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0     
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lgio-2.0
collect2: ld returned 1 exit status
make[2]: *** [leafpad] Error 1
make[2]: Leaving directory `/home/daniel/devel/leafpad-0.8.17/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/daniel/devel/leafpad-0.8.17'
make: *** [all] Error 2
daniel-openpandora:~/devel/leafpad-0.8.17$


Then I do what you suggested:


Code:
set LDFLAGS="-L/usr/lib/gio/"
(I also tried /usr/lib/gio/modules/, as there are the actual library files located, and I tried /usr/lib/.
I also created a symbolic link in /usr/lib for "gio" called "gio-2.0". Everything to no avail).
When I restart "make", I get the same error.

What am I doing wrong?

Thank you,
Daniel
 
Last edited by a moderator:
daniel3000 said:
Code:
set LDFLAGS="-L/usr/lib/gio/"
All the libs are in /usr/lib so use that :huh:
But i'm surprise you have to set any -L as common path should be known be ldconfig.
Maybe not having its config file don't help, as root :
Code:
cat >/etc/ld.so.conf<<END
/lib
/usr/lib
END

ldconfig
 
Last edited by a moderator:
oookay, thanks for your help guys. Unfortunately (and strange to say) none of these suggestions helped only a little.
However, what helped was reinstalling libgio via opkg.
The files were there before, and after installing there were not more files in /usr/lib related to libgio, but somehow reinstalling libgio fixed the "ld: cannot find -lgio-2.0" problem.
However, then came the same problem with libgobject. Reinstalling that solved the problem, too.
Then the same with libgmodule, then libgthread, and finally libglib.

After reinstalling all these libs, leafpad finally successfully linked.

Don't ask me why. Maybe the files in /usr/lib were corruped, empty (I didn't check) or there is some magic which I don't know anything about.

Anyway, expect a leafpad PND soon :)
And some others too, probably.


Daniel
 
Back
Top