Setting Qt Environment PATH ??
-
Hi! First of all if you want to change environment variables on Linux the places to look at are usually
/etc/profile
,/etc/profile.d
and~/.bashrc
but this might be different for your Linux distribution. Next point is: If you have a program (OBS you said) that needs to dynamically load shared objects than you'll need to know where that particular binary looks for these objects. This problem is called dynamic linking thus involves your system's dynamic linker and does not only depend on your environment variables. -
@Wieland I expected such a typical response as this, my distribution is Linux Mint, and there is nothing in
/etc/profile
or/etc/profile.d
nor~/.bashrc
so that can be ruled out that they are not in there. Qt has its own profile somewhere else where it stores its environment variable. I know for a fact that it's stored somewhere else as those things you mentioned there does not exist, all that exists is the bare-bones skeletal files for.profile
and.bashrc
.as I mention before OBS is looking for Qt core files, and I know for a fact that it's trying in the old Qt4 environment PATH, but such files do not exist as mentioned before. When I did a GDB backtrace, it points to these directories here
/usr/lib/x86_64-linux-gnu/qt4
,/usr/lib/x86_64-linux-gnu/qt5
while looking for QCoreApplicationkernel/qcoreapplication.cpp: No such file or directory.
What I need instead since I know for a fact that since I've got a proper install at
/opt/qt55
setup with all the files for programs that need it, I need to make applications look to that directory instead for all the Qt core files to load from. But this still doesn't change the fact that I need to manually correct the env PATH to what I mentioned before, and need to know where QtChooser stores or gets that information from, but obviously it's not picking up from the stuff you mentioned. -
So your actual question is: "Where does Qt Chooser store its config file?"
Answer:
/etc/xdg/qtchooser/*.conf ~/.config/qtchooser/*.conf
Protips:
find / | grep "qtchooser"
man qtchooser
-
Btw, I guess you already tried to reinstall the qt libraries your system provides (
sudo apt-get install --reinstall libqt5-*
). -
@Wieland said:
So your actual question is: "Where does Qt Chooser store its config file?"
Answer:
/etc/xdg/qtchooser/*.conf ~/.config/qtchooser/*.conf
Protips:
find / | grep "qtchooser"
man qtchooser
That there is somewhat helpful, but doesn't completely narrow down which config file it mainly reads from. Also I couldn't quite help but catch a minor error relating to
default.conf
when I ranqtpaths
it throws me this errorqtpaths: could not open config file '/usr/lib/x86_64-linux-gnu/qtchooser//default.conf': No such file or directory
a typo in the path directory, I've no idea how that ever happened, but something went wrong, not sure how to correct that mistake.@Wieland said:
Btw, I guess you already tried to reinstall the qt libraries your system provides (
sudo apt-get install --reinstall libqt5-*
).Pretty much done this already before yes, the package maintainer that I had installed for
qt55
installed under/opt/qt55
and I do find that it being installed at that path directory makes for much easier and cleaner handling when need to fix or check something in the paths there, compares to trying to scour source problems when installed under/usr/lib/x86_64-linux-gnu
and it having multiple places where it installs to. -
IMAO trying to be smarter then your package manager and the package maintainers is a stupid idea. Anyway, if you really want to force all your executables on your computer to look for shared objects in /opt/Qt/blah then this has nothing to do with the PATH variable or Qt Chooser but it's about your dynamic linker (like I already mentioned in my first posting). I don't know how it's done in your Linux distro but in every "normal" distro (LSB compliant) ld's configuration is in
/etc/ld.so.conf.d/
. -
@Wieland you might not think it's a smart idea to do it the way I'm doing it, but to me it is a smarter and cleaner way for doing it, and yes it does have something to do with the PATH variable and Qtchooser, the paths point to the older version I don't want to use by default. I came here for simple answers where it stores that information not to be told what's good or bad with second guesses. So far the information you've provided hasn't been all that helpful with some definitive answers that gives insights of where Qt stores it's PATH environment that it reads from. None of the information provided doesn't point in the said direction where they may be stored.
What is the standard environment PATHs for Qt and everything it uses? You say to dynamically link the ones I want to use, but I need to know the default environment PATHs so I can point applications to it. Qt is such a bloody mess, that it makes itself so difficult to manage and configure the littlest of things.
-
Calm down. You keep asking for where "Qt stores its PATH variables". This doesn't make sense so I have to guess what you mean. Sorry that I couldn't help you to fix the system you broke. If you neither have the expertise to repair it by yourself nor to ask questions that make sense then you should consider to reinstall your computer.
-
@Wieland Calm down? I am calm btw, it's just getting really annoying where I can't get simple straight answers that are not too vague, and what's so difficult to understand about the question? The Qt environment PATH of where it's stored and read from or the part where applications can't fully run properly because it can't find everything it needs in the old versions environment PATH?
FTR: I do have the expertise to repair it myself, but I need a given direction that shows me where to look.
If I wanted to do a system reinstall I would of done it ages ago, but I'm not interested, and it's not something I broke, the whole Qt package itself came broke, blame the maintainer of the package provider https://launchpad.net/~beineri/+archive/ubuntu/opt-qt551 that's where I got the qt55 from in the first place.
qt55-env.sh
that comes with Qt55 package is suppose to correct and change the environment PATH for Qt, but it doesn't work, it didn't fully properly change the environment PATH.**EDIT:: You can forget it now..... eventually figured it out and fixed it on my own after messing around trying out a few things. Would of probably gotten if faster if seeking help here didn't suck so bloody much with vague answers.
-
@Alkaris - you do realize that people here are trying to help out in their own free time, without getting paid?
Step away from your keyboard when you are upset.Sign a support contract if you want to get 100% guaranteed support.
Such arrogance, such rudeness..
-
@Alkaris said:
What is the standard environment PATHs for Qt and everything it uses?
Short answer: There is no such thing as "standard environment PATHs for Qt and everything it uses".
Long answer: Please note the following:
- The environment variables set by QtChooser is for building applications, not for running applications. QtChooser is not the tool you're interested in, since it does not affect how applications load Qt.
- The place where an application searches for Qt is determined by one or more of these things: (i) how the application itself was built and packaged, (ii) ldconfig, and/or (iii) distro-specific settings. Qt has no control over any of these 3 factors.
- Qt itself does not require any environment variables. Your system is the one that requires environment variables.
You would have better luck if you had asked the Linux Mint community, since your problem is a question of "How does this system help applications find the libraries they need?".
You say to dynamically link the ones I want to use, but I need to know the default environment PATHs so I can point applications to it.
@Wieland suggested that you use
ldconfig
. You don't need to know or set any PATHs to follow it.There are many places to learn
ldconfig
, including http://codeyarns.com/2014/01/14/how-to-add-library-directory-to-ldconfig-cache/I know you have now found a solution of your own, but do realize there are multiple ways to get your system to work.
it's not something I broke, the whole Qt package itself came broke, blame the maintainer of the package provider https://launchpad.net/~beineri/+archive/ubuntu/opt-qt551 that's where I got the qt55 from in the first place.
That's an unofficial package created by an Ubuntu community member. It was not created by the Qt Project or by Canonical (the company that maintains Ubuntu).
We understand that you're annoyed and frustrated. But that is no excuse to take it out on the people here.
eventually figured it out and fixed it on my own after messing around trying out a few things.
Glad to hear.