LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Issues with custom built glib (https://www.linuxquestions.org/questions/linux-software-2/issues-with-custom-built-glib-716393/)

lgp171188 04-02-2009 01:16 PM

Issues with custom built glib
 
I built the latest version of glib and installed it with appropriate usage of ldconfig. But after the install, a lot of Nautilus's behaviour has gone awry.

I want to uninstall the built glib and use ubuntu's version. But unfortunately I deleted the source folder where I built it. So I now have the tarball of the source.

When I do a make uninstall on the extracted source, it gets uninstalled but gdm doesn't start till i do a 'make install' again. I want to use the version of glib shipped with ubuntu. How to do it?

i92guboj 04-02-2009 01:36 PM

Probably both got mixed. When you did make install you overwrote your native glib, then with uninstall you removed glib completely, so you would need to reinstall whatever glib version you want to use.

For the next time I'd suggest never installing custom packages into your / system. If you are compiling them yourself it's very little extra work to add a different --prefix in your configure stage, so you will have your glib library on your system, and you will be able to use the custom version by tweaking your LD_LIBRARY_PATH for those programs that need the custom version for whatever reason.

lgp171188 04-02-2009 01:47 PM

Issues with custom built glib
 
I deleted the folder where I extracted the source and did a make install. Now with make uninstall after extracting from the tarball and a apt-get install libglib2.0-0 ( I use Ubuntu 8.04), still a lot of applications crash and the crashing stops only when I do a make install again.

Where will the custom glib installed when I did a 'make install' without specifying prefix? Will I be able to specify the prefix during make uninstall?

But what worries me is that after doing a make uninstall and then install my distro's libglib2.0-0 still things are not ok till I do a make install in the source. I'm confused.

A few undesirable things that happen are - weird behaviour Nautilus, inability to mount media automatically and etc.

i92guboj 04-02-2009 02:24 PM

Quote:

Originally Posted by lgp171188 (Post 3496368)
I deleted the folder where I extracted the source and did a make install. Now with make uninstall after extracting from the tarball and a apt-get install libglib2.0-0 ( I use Ubuntu 8.04), still a lot of applications crash and the crashing stops only when I do a make install again.

Right now I have not a clear idea of what you did. First of anything else, why are you compiling glib manually? Ubuntu should have it on the repos, there's no distro without glib, it's difficult to find one even if we are talking about embedded stuff.

Did you compile the rest of applications manually as well? Are you using the official ubuntu repos or are you using a .deb file that you downloaded from somewhere else? Glib is a core library for a lot of packages, and you need to use the same version that these packages were compiled against. As long as you stick to the ubuntu official repositories you shouldn't have to worry about that (I am no ubuntu user, but I highly doubt that they would commit such a mistake even if I feel no special sympathy for the distro).

Quote:

Where will the custom glib installed when I did a 'make install' without specifying prefix? Will I be able to specify the prefix during make uninstall?
--prefix=/whatever is specified at the ./configure stage, after that make install and make uninstall will use the same configuration, as long as you don't erase that directory or run ./configure again.

Quote:

But what worries me is that after doing a make uninstall and then install my distro's libglib2.0-0 still things are not ok till I do a make install in the source. I'm confused.
That's why it's not good to install stuff on / manually. Your package manager knows nothing about that stuff you installed, and then conflicts appear, and some of them will be very difficult to diagnose because you will have no idea where did make install put every single file.

If you have root permissions you can use something like ./configure --prefix=/usr/local, if you don't, the choose a directory under $HOME.

Quote:

A few undesirable things that happen are - weird behaviour Nautilus, inability to mount media automatically and etc.
Some of these things might have nothing to do with glib, but I guess you learned the lesson: use your package manager, and if you don't, then isolate whatever you are installing from the rest of the system, so they don't get mixed.

lgp171188 04-14-2009 01:57 PM

How do I remove the custom installed version and installed the version in the ubuntu repository? A lot of stuff right from mounting drives, functionalities of Nautilus have got affected and hence are not working properly at all. Is there a way out of this mess I have caused?

i92guboj 04-14-2009 02:53 PM

I would try to "make uninstall" everything you installed by hand. And then install all these same package one by one from the ubuntu repositories. However at this point is hard to predict if everything is going to work ok. But if something still fails we might be able to track it down and fix it if we are lucky.

lgp171188 04-14-2009 10:55 PM

I, unfortunately have deleted the extracted sources which i built - gtk, glib and pango. Can i uninstall it by doing a make on these sources afresh and then doing a make uninstall?

i92guboj 04-14-2009 11:38 PM

Yes. As long as you use the same configure options. If you didn't use any do the same now and it should work ok. I guess that tipically simply using "./configure && make uninstall should work".


All times are GMT -5. The time now is 09:35 AM.