Patch to make FindQwt.cmake work on OpenSuse 12.1

I tried to install gnuradio from git on my machine. The only problem I
encountered is that the qwt library could not be found (ie. gr-qtgui
was disabled). Attached is a patch, to solve this problem. It includes
the /usr/lib64 directory and qwt5 library.

Furthermore, if anyone is interested, the list of packages I needed to
add to a fresh install of opensuse 12.1:
sudo zypper install cmake cppunit-devel doxygen fftw3-devel git
gsl-devel libjack-devel libqt4-devel libqwtplot3d-devel libSDL-devel
libusb-1_0-devel orc portaudio portaudio-devel python-cheetah
python-devel python-lxml python-wxGTK python-wxWidgets-devel qwt-devel
wxWidgets-devel xmlto

lsb_release -a
LSB Version: n/a
Distributor ID: SUSE LINUX
Description: openSUSE 12.1 (x86_64)
Release: 12.1
Codename: Asparagus

On Sat, May 12, 2012 at 5:07 PM, Kire P. [email protected]
wrote:

I tried to install gnuradio from git on my machine. The only problem I
encountered is that the qwt library could not be found (ie. gr-qtgui
was disabled). Attached is a patch, to solve this problem. It includes
the /usr/lib64 directory and qwt5 library.

Hi Kire,

I have a bit of heartburn over constantly adding new directories to
look for QWT libraries. It seems like we would just be introducing a
new directory for every platform we want to work on.

The alternative way is to handle it by passing the directories to
cmake via the command line:

cmake -DQWT_INCLUDE_DIRS=/usr/include/qwt5

Since the library is in /usr/lib64, you don’t need to tell cmake this,
since it’s a standard library path already.

Distributor ID: SUSE LINUX
Description: openSUSE 12.1 (x86_64)
Release: 12.1
Codename: Asparagus

I added these directions to the wiki build guide for Suse:
http://gnuradio.org/redmine/projects/gnuradio/wiki/SuseInstall

Thanks,
Tom

On 05/13/2012 08:49 AM, Tom R. wrote:

new directory for every platform we want to work on.

The alternative way is to handle it by passing the directories to
cmake via the command line:

cmake -DQWT_INCLUDE_DIRS=/usr/include/qwt5

Since the library is in /usr/lib64, you don’t need to tell cmake this,
since it’s a standard library path already.

Theres not PC file for qwt it seems. So we dont have the advantage of
knowing the correct library and include paths. So a list is somewhat
necessary. There there are qwt5 and qwt4 specific directories, but maybe
on some systems.

/usr/lib64 may be the install library path for all x64 redhat systems,
but its missing from the list. Has anyone configured gnuradio with qwt
on fedora x64 for example (without specifying manually).

I would recommend replacing the lists there with the paths actually used
by fedora* and ubuntu* systems. The other deb and rpm distros will
probably fall into one of those two categories.

My ubuntu x64 11.10 is using /usr/include/qwt-qt4/
/usr/lib/libqwt-qt4.so, but thats already in there.

File in question for reference:
http://gnuradio.org/cgit/gnuradio.git/tree/cmake/Modules/FindQwt.cmake

Dont think /sw is a common install prefix.

-Josh

Dont think /sw is a common install prefix.

Once upon a time /sw was the default install prefix for external
packages on MacOSX with the fink distro (apt/dpkg) … but I have no
idea what macports defaults and that seems to be the more popular way
to install on MacOSX in the GNURadio community.

my $0.02

Jason

On Sun, May 13, 2012 at 1:56 PM, Josh B. [email protected] wrote:

since it’s a standard library path already.

Theres not PC file for qwt it seems. So we dont have the advantage of
knowing the correct library and include paths. So a list is somewhat
necessary. There there are qwt5 and qwt4 specific directories, but maybe
on some systems.

No, there is no PC file, so that’s the problem. I’m just saying that
I’m not sure that the solution is really to just keep adding to this
file for every system out there when it can be specified from the
command line. And you’re right, the qwt5, qwt4, and possibly qwt6, so
the list could continue to grow. It’d be great if we could get a
pkgconfig file out of them, but I don’t know if there’s a reason or
history from their side preventing them from doing so.

/usr/lib64 may be the install library path for all x64 redhat systems,
but its missing from the list. Has anyone configured gnuradio with qwt
on fedora x64 for example (without specifying manually).

I’d like to hear anything like this, too. Adding /usr/lib64 is
probably something we should add, anyways, since it’s generic over a
lot of systems.

Dont think /sw is a common install prefix.

-Josh

Sure, we can try to figure out the best list to put in this file that
covers the majority of systems. As Jason said in his other email, the
/sw was an OSX thing, which may or may not still be the right thing.

Tom

Hi,

File in question for reference:
FindQwt.cmake « Modules « cmake - gnuradio.git - GNU Radio

Could the find that dependency be automatized using locate and grep
instead of hard-coding where to look in?
I’m using latest qwt for other delvel projects also. A quick lookup
(using
Fedora) could look like this:

$ locate libqwt.so
/usr/local/qwt-6.0.2-svn/lib/libqwt.so
/usr/local/qwt-6.0.2-svn/lib/libqwt.so.6
/usr/local/qwt-6.0.2-svn/lib/libqwt.so.6.0
/usr/local/qwt-6.0.2-svn/lib/libqwt.so.6.0.2

$ locate qwt_plot.h
/usr/local/qwt-6.0.2-svn/include/qwt_plot.h

Patrik

----- Original Message -----
From: “Josh B.” [email protected]
To: [email protected]
Sent: Sunday, May 13, 2012 20:56
Subject: Re: [Discuss-gnuradio] patch to make FindQwt.cmake work on
OpenSuse
12.1

2012/5/14 Patrik T. [email protected]:

Fedora) could look like this:

Patrik

The FILE GLOB could do the same trick as you suggest:
“FILE(GLOB qwt_files ${qwt_dir}/include/qwt*/qwt_plot.h)”

I tried to write a patch which uses exactly that.
It tries to locate the header files in:
/usr/local/qwt*/include
/usr/local/include/qwt*
/usr/qwt*/include
/usr/include/qwt*
/opt/local/qwt*/include
/opt/local/include/qwt*
/sw/local/qwt*/include
/sw/local/include/qwt*
Furthermore, the libraries are searched in the same order. So if I
have the packaged version for qwt in /usr/include/qwt5 and I have a
manually compiled qwt in /usr/local/qwt-6.0.2-svn, it prefers the
manually compiled version, and makes sure that it will then search the
libraries in exactly the same order. On 64bit machines, the lib64 will
be preferred over lib.
This patch is pure cmake language, so it should not break on windows.
Furthermore, no maintenance should be needed with new versions of qwt.
Kire.

On Tue, May 15, 2012 at 2:55 AM, Kire P. [email protected]
wrote:

I’m using latest qwt for other delvel projects also. A quick lookup (using

/usr/qwt*/include
be preferred over lib.
This patch is pure cmake language, so it should not break on windows.
Furthermore, no maintenance should be needed with new versions of qwt.
Kire.

Kire,

This sounds good. I’ll have a look at it next week when I get back
home and can process it better. Using cmake’s GLOB is a lot more
attractive, too, since it’s (I assume) cross-platform.

Thanks!
Tom

Perfect,
Patrik

----- Original Message -----
From: “Kire P.” [email protected]
To: “Patrik T.” [email protected]
Cc: [email protected]
Sent: Tuesday, May 15, 2012 9:55
Subject: Re: [Discuss-gnuradio] patch to make FindQwt.cmake work on
OpenSuse
12.1