Results 1 to 6 of 6

Thread: Problems with PATH

  1. #1
    Join Date
    Jul 2008
    Location
    Nanjing, China
    Posts
    78

    Default Problems with PATH

    I'm new to openSUSE, just came from Ubuntu, and I'm having some problems with openSUSE missing some obvious paths.

    For instance, checkinstall is installed to /usr/sbin but I have to actually type /usr/sbin/checkinstall in order to run it.
    Code:
    xxxxxx@tipping-point:~/sopcast/src>echo $PATH
    /usr/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.:/usr/lib/qt3/bin
    I'm also having problems during compiling. I'm compiling QSopcast which requires qt3 headers and the source is complaining about the file missing. I did a 'locate' and I definitely have the file installed.

    Here's the error from compiling:
    header.h:6:19: error: qvbox.h: No such file or directory

    and here's 'locate':
    Code:
    xxxxxx@tipping-point:~/sopcast/src> locate qvbox.h
    /usr/lib/qt3/doc/html/qvbox.html
    /usr/lib/qt3/include/qvbox.h
    This is really simple and any help would be greatly appreciated. Should I just edit /etc/profile or is there a better way? (I know /etc/profile is system-wide but these are things that I would like to be system-wide) Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Oregon, US
    Posts
    109

    Default Re: Problems with PATH

    As far as the path problem, sbin should only be in roots path. That is what the s in sbin stands for, super-user. So that is normal, expected behavior. If you want to change it, you can change it in either /etc/profile (system-wide) or ~.bashrc (per user), by adding the following statement
    export PATH=$PATH:/usr/sbin:/sbin:.

    On the compiling problem, you can add the path for lib files in the configure script,
    ./configure --libdir=/usr/lib/qt3/

    You may need to add the subfolder include, I'm not sure, I've never installed the qsopcast program, so I may be off in the details.

    Edit: you may also be able to symlink the missing file into the directory where it is expected. Or, you can check the configure --help to see if it has an option to specify the qt3 lib path.

  3. #3
    Join Date
    Jul 2008
    Location
    Nanjing, China
    Posts
    78

    Default Re: Problems with PATH

    Thanks! I didn't know that's what the 's' stood for. Anyway, there's no 'configure' for this app, just 'qmake'.

    EDIT: I tried adding the /usr/lib/qt3/include to the include path in 'Makefile' and got a little farther but am now running into this error:
    Code:
    main.cpp: In function ‘int main(int, char**)’:
    main.cpp:47: error: ‘srand’ was not declared in this scope
    make: *** [.obj/main.o] Error 1

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,973

    Default Re: Problems with PATH

    Quote Originally Posted by cisforcojo View Post
    I'm new to openSUSE, just came from Ubuntu, and I'm having some problems with openSUSE missing some obvious paths.

    For instance, checkinstall is installed to /usr/sbin but I have to actually type /usr/sbin/checkinstall in order to run it.
    Code:
    xxxxxx@tipping-point:~/sopcast/src>echo $PATH
    /usr/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.:/usr/lib/qt3/bin
    I do not know the product, but when it is installed in /usr/sbin as the intention of the maker, it is not the intention to be called by a normal user, but only by root, which has /usr/sbin in it's PATH.

    When on the other hand it is a program for the normal user it should not go into /usr/sbin. Adding /usr/sbin to a normal users PATH is not a good idea. The user may end up executing programs that are mentioned for root only and get error messages.
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    301

    Default Re: Problems with PATH

    Quote Originally Posted by cisforcojo View Post
    Thanks! I didn't know that's what the 's' stood for. Anyway, there's no 'configure' for this app, just 'qmake'.

    EDIT: I tried adding the /usr/lib/qt3/include to the include path in 'Makefile' and got a little farther but am now running into this error:
    Code:
    main.cpp: In function int main(int, char**):
    main.cpp:47: error: srand was not declared in this scope
    make: *** [.obj/main.o] Error 1
    Did you also install qt4-devel? There could be a conflict with the qmake from qt4 and qt3. Try to use the qmake in /usr/qt3/bin/qmake.

    The other error you received could come from an incompatibility with the new gcc 4.3. They cleaned up some include files so that sometimes it is necessary to add more includes.

    hope this helps

  6. #6
    Join Date
    Jul 2008
    Location
    Nanjing, China
    Posts
    78

    Default Re: Problems with PATH

    Yes, I've also installed qt4-devel.
    I tried running /usr/lib/qt3/bin/qmake and that definitely works better. I'm getting the same error (but without having to add the include into the 'Makefile' manually)

    I've looked it up and I think it IS a problem with gcc 4.3. I'll look into getting those missing includes in there. Thanks for the help!

    For the time being I just found a binary and installed it. I'll wait until GCC gets that squared away.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •