You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, February 9th 2004, 2:43pm

Help installing qt3

Hello, I am trying to install qt3 and am having no luck. I am reading the qt3 install section and I'm not sure what this part means.

Quoted

Set some environment variables in the file .profile (or .login,
depending on your shell) in your home directory. Create the
file if it is not there already.

QTDIR - the directory in which you're building Qt
PATH - to locate the moc program and other Qt tools
MANPATH - to access the Qt man pages
LD_LIBRARY_PATH - for the shared Qt library


I found two profiles in my machine, one in /etc/profile.d but I'm not sure how to add it, or even if that's the file I add it to.

Thanks for the help.

[edit] my shell is bash if that helps.

138

Trainee

Posts: 81

Location: Helsinki, Finland

  • Send private message

2

Monday, February 9th 2004, 4:15pm

Hi,
The /etc/profile file is the global bash shell profile file, in your home directory there should be .bash_profile or .profile. If you are going to add those variables they should go into .profile in your home directory.
Another way to install qt is to enter sub-shell to isolate environment changes.
First write bash in command line to enter sub-shell.
Then export environmental variables:
export QTDIR=/path/to/qt (in my case /opt/qt since I have installed qt with --prefix=/opt/qt)
export LD_LIBRARY_PATH=$QTDIR/lib
export PATH=$QTDIR/bin:$PATH
now you can start configure. If you don't want the tutorials and examples, write "make sub-tools" instead of "make".

Check if there already are QTDIR and other variables in your system by executing command env.
bash-2.05a$ env
<snip>
QTDIR=/opt/qt
<snip>
SHLVL=2
SHELL=/bin/bash
<snip>
PATH=/opt/kde-3.1/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
/opt/j2sdk/j2sdk-precompiled-1.4.2/bin:/opt/apache-ant-1.5.4/bin:/usr/local/jakarta-tomcat-4.1.24/bin:/opt/j2sdkee1.3.1/bin/bin
_=/usr/bin/env
bash-2.05a$

This should get you started. btw. what is your distro?
Siili teki maalin.

3

Monday, February 9th 2004, 5:18pm

Hello 183

At first I created a file called .profile and added

[code:1]QTDIR=/usr/local/qt
PATH=$QTDIR/bin&#58;$PATH
MANPATH=$QTDIR/doc/man&#58;$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib&#58;$LD_LIBRARY_PATH

export QTDIR PATH MANPATH LD_LIBRARY_PATH[/code:1]

to it. I'm not sure if that would have worked or not as I didn't go any further. I am doing the way you suggested (enter sub-shell to isolate environment changes)
I opened a shell and typed bash, I didn't recieve any notification of any kind so I'll presume everyuthing is going ok. I then added the rest of the commands,

[code:1]
export QTDIR=/usr/local/qt
export LD_LIBRARY_PATH=$QTDIR/lib
export PATH=$QTDIR/bin&#58;$PATH[/code:1]

I then configured it. after that I ran make sub-tools. At the moment it's making.


If I open a shell and type env I get.

[code:1]&#91;nick@zarien nick&#93;$ env
LESSKEY=/etc/.less
LC_PAPER=en_CA
KDE_MULTIHEAD=false
LC_ADDRESS=en_CA
LC_MONETARY=en_CA
HOSTNAME=zarien
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
XDM_MANAGED=/var/run/xdmctl/xdmctl-&#58;0,maysd,mayfn,sched
GTK2_RC_FILES=/usr/share/themes/Galaxy/gtk-2.0/gtkrc&#58;/etc/gtk-2.0/gtkrc&#58;/home/ni
ck/.gtkrc-2.0
TMPDIR=/home/nick/tmp
GTK_RC_FILES=/usr/share/themes/Galaxy/gtk/gtkrc&#58;/etc/gtk/gtkrc&#58;/home/nick/.gtkrc
GS_LIB=/home/nick/.kde/share/fonts
LC_NUMERIC=en_CA
QTDIR=/usr/lib/qt3/
USER=nick
LS_COLORS=no=00&#58;fi=00&#58;di=01;34&#58;ln=01;36&#58;pi=40;33&#58;so=01;35&#58;bd=40;33;01&#58;cd=40;33;0
1&#58;or=01;05;37;41&#58;mi=01;05;37;41&#58;ex=01;32&#58;*.cmd=01;32&#58;*.exe=01;32&#58;*.com=01;32&#58;*.b
tm=01;32&#58;*.bat=01;32&#58;*.sh=01;32&#58;*.csh=01;32&#58;*.tar=01;31&#58;*.tgz=01;31&#58;*.arj=01;31&#58;
*.taz=01;31&#58;*.lzh=01;31&#58;*.zip=01;31&#58;*.z=01;31&#58;*.Z=01;31&#58;*.gz=01;31&#58;*.bz2=01;31&#58;*
.bz=01;31&#58;*.tz=01;31&#58;*.rpm=01;31&#58;*.cpio=01;31&#58;*.jpg=01;35&#58;*.gif=01;35&#58;*.bmp=01;3
5&#58;*.xbm=01;35&#58;*.xpm=01;35&#58;*.png=01;35&#58;*.tif=01;35&#58;
LC_TELEPHONE=en_CA
SESSION_MANAGER=local/zarien&#58;/tmp/.ICE-unix/7649
KONSOLE_DCOP=DCOPRef&#40;konsole-3148,konsole&#41;
NLSPATH=/usr/share/locale/%l/%N
MAIL=/var/spool/mail/nick
PATH=/usr//bin&#58;/bin&#58;/usr/bin&#58;&#58;/usr/local/bin&#58;/usr/X11R6/bin&#58;/usr/games&#58;/home/nic
k/bin
LC_MESSAGES=en_US
SECURE_LEVEL=2
LC_IDENTIFICATION=en_CA
LC_COLLATE=en_US
KONSOLE_DCOP_SESSION=DCOPRef&#40;konsole-3148,session-1&#41;
INPUTRC=/etc/inputrc
PWD=/home/nick
XMODIFIERS=@im=none
LANG=en_US
HELP_BROWSER=kfmclient openProfile webbrowsing
LC_MEASUREMENT=en_CA
HISTCONTROL=ignoredups
SHLVL=2
HOME=/home/nick
LANGUAGE=en_US&#58;en
GCONF_TMPDIR=/tmp
TMP=/home/nick/tmp
LESS=-MM
LOGNAME=nick
LC_CTYPE=en_US
LESSOPEN=|/usr/bin/lesspipe.sh %s
BROWSER=kfmclient openProfile webbrowsing
DESKTOP=kde
DISPLAY=&#58;0.0
LC_TIME=en_US
G_BROKEN_FILENAMES=1
COLORTERM=
XAUTHORITY=/home/nick/.Xauthority
LC_NAME=en_CA
_=/usr//bin/env
&#91;nick@zarien nick&#93;$[/code:1]

I am on Mandrake 9.2

Thanks for the assistance :)

138

Trainee

Posts: 81

Location: Helsinki, Finland

  • Send private message

4

Monday, February 9th 2004, 8:09pm

Hi,
Hope you get everything working.

[code:1]
<snip>
QTDIR=/usr/lib/qt3/
<snip>
[/code:1]
Your qt dir seems to be /usr/lib/qt3, so now you end up getting two versions of qt because you are installing new version of qt in to the /usr/local/qt (I assume that you used --prefix=/usr/local/). So when you login as nick you will be using that new version of qt in /usr/local/qt and if you login as someone else you will be using the /usr/lib version.
You might end up messing your system pretty bad, I suggest that you make backups before executing make install.
I really can't help you much more because I am not familiar how mandrake arranges its dependencies and rpms.
But I am keeping my thumbs up for you. :)
Siili teki maalin.

5

Monday, February 9th 2004, 8:28pm

I think I'm going to quit while I'm ahead, I don't want to mess anything up. I'm downloading Slackware at the moment and I'm going to play with that next. You don't happen to be on Slackware do you? :oops:

138

Trainee

Posts: 81

Location: Helsinki, Finland

  • Send private message

6

Monday, February 9th 2004, 9:51pm

Hello,
it is always difficult to install programs and libraries from the sources to a rpm system, because every distro seems to place everything to a differnt place. I learned that the hard way when I had suse 8 installed, messed up things quite many times. :)
I don't have Slackware installed, althoght I have an iso image on my hard disk, I just have to burn it to a cd and get larger disk. Too many operating systems to fit into my 6GB disk. :)
I've heard good things about Slackware, so good luck to your exploration! And don't feel afraid to fiddle with your system, its man made and google exists... :)
I have LFS/BLFS on my computer http://www.linuxfromscratch.org/ , a great learning experience if you have enough time.
Siili teki maalin.