Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I am sure this question had been available and asked everywhere. However I still do not understand many things about linux. Regarding Motif from Linux or Red Hat, I ...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5

    Configuring Motif for Redhat.

    Hi,

    I am sure this question had been available and asked everywhere. However I still do not understand many things about linux.

    Regarding Motif from Linux or Red Hat, I understand that it is built on top of Xm and Xt. So I have to include both Xm and Xt and even X11 libraries.

    I know it is not installable from the Red Hat CD.

    how do i tell the Red Hat OS that there is such library available. I had run the RPM to install this openMotif installer for Linux and complete the installation process. Presuming it can replace motif.

    Yet I run an executable which required MOtif.

    I built this executable from the *.CPP source code telling the compilier where the libraries and includes are.

    However Red Hat do not know where is this motif libraries are while running my executable which required motif.

    I installed the Openmotif from its RPM in Red Hat.

  2. #2
    Linux Newbie
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    243
    I don't understand. Do you mean to say, when you compile your C++ program, it does not find the libraries? Or, do you mean to say, your C++ program compiles successfully, but executing causes an error that the libmotif libraries are not found?

    First, it is better to use a trusted package repository provided with your distribution using "Yum". It might be better to try the command
    Code:
    yum -i libopenmotif-devel
    This will automatically download the RPM from a trusted source and install it safely into your system. A random RPM file downloaded from your browser is not trusted, it may have been hacked. If you are sure the RPM file is OK, you can install it using RPM. But it is recommended that you use "yum" instead.

    Secondly, did you install "libopenmotif-devel" or "libopenmotif"? The "libopenmotif" package probably does not include files you need to compile C or C++ programs. You need "libopenmotif-devel" in order to compile C or C++ programs using the these libraries. The "libopenmotif-devel" package will install the C and C++ header files into "/usr/include" (default), or possibly "/usr/local/include". GCC will automatically check these locations when trying to compile your program.

    Finally, when RPM installs new libraries, it can install them in "/usr/lib" (this is the default), or it can install them in "/usr/local/lib". The "/usr/local/lib" directory contains libraries that were compiled on your local machine. Another possibility is the software was installed into "/opt", which is used to store third-party software. I don't know how RedHat chooses which location to place libraries, but it could be possible that RPM sees you installed OpenMotif from an "untrusted" source (not the Yum repository), so it places the OpenMotif libraries in "/usr/local/lib" or "/opt". To check, you can use the "find" command:
    Code:
    find /usr/lib /usr/local /opt -iname '*motif*'
    Pay attention to the output of this command. You are looking for files with names similar to "libopenmotif.so" or "libopenmotif.so.4" or "libopenmotif.a". Also, you can check if the C or C++ header files were installed:
    Code:
    find /usr/include /usr/local/include -iname '*motif*.h' -o -iname 'Xm'
    And look for files like "motif.h", or "Xm/Xm.h".

    Using find, you can see where RPM placed the library files and C/C++ header files. You may want to uninstall the RPM file with the command
    Code:
    rpm -e <package name>
    and then try installing again using "yum -i", like I said above.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    The Xt and X11 libraries are installed by default when you install Linux with a GUI desktop manager. All Linux GUI's are X11 based, and all of the other libraries, such as GTK+, Qt, etc use Xt (intrinsics) and X11 libraries. If you are doing development work, however, you may need to install the devel packages, such as libXt-devel and libX11-devel. That will install the required headers for building GUI applications. In any case, installing the openmotif-devel package should also install those others as dependencies, if they aren't already. And FWIW, these packages should be in the standard Red Hat repositories.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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