Bug 1129026

Summary: Can't build whdd, cmake wrote message "Could NOT find dialog (missing: DIALOG_INCLUDE_DIR)"
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: dialogAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: i, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-15 10:37:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikhail 2014-08-12 06:46:50 UTC
Description of problem:
Can't build whdd, cmake wrote message "Could NOT find dialog (missing:  DIALOG_INCLUDE_DIR)"

https://github.com/krieger-od/whdd/blob/master/cmake/modules/FindDIALOG.cmake

Comment 1 Miroslav Lichvar 2014-08-13 15:43:09 UTC
That looks like a problem in the cmake file, it looks for dialog.h only in /usr/include. It should use dialog-config to get the right CFLAGS and LDFLAGS.

Comment 2 Christopher Meng 2014-08-15 10:37:30 UTC
Mik, Fedora doesn't do anything wrong.

If you can't solve the problem, use the srpm from my review and rebuild it. When it gets approved into the repository, use yum install again.

I hope it's a "better" solution for a while. As the cmake module upstream ships in the whdd doesn't work on many OSs. I'm finding a best solution about this and will submit a PR when I think my commit is "acceptable".

Comment 3 Mikhail 2015-06-09 19:44:29 UTC
Miroslav, just one question. Why no symbolic link for dialog.h in /usr/include ?
Problem in #1 can be simple solved with command:
ln -s /usr/include/dialog/dialog.h /usr/include/dialog.h

Comment 4 Miroslav Lichvar 2015-06-10 06:23:46 UTC
(In reply to Mikhail from comment #3)
> Miroslav, just one question. Why no symbolic link for dialog.h in
> /usr/include ?

A compatibility link in /usr/include is easy to add. But it will take years before it is in Fedora and all distributions based on it, so it might be faster to fix whdd to look at /usr/include/dialog or use dialog-config.

Comment 5 Mikhail 2015-06-10 07:52:36 UTC
Ok, I try make patch for whdd. How I can get include path for dialog?

Method with pkg-config not worked :(
Why?

$ pkg-config --cflags-only-I dialog
Package dialog was not found in the pkg-config search path.
Perhaps you should add the directory containing `dialog.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dialog' found


Only dialog-config --cflags works, but in this way i needed parsing output for get clean path.

Comment 6 Miroslav Lichvar 2015-06-26 12:53:40 UTC
(In reply to Mikhail from comment #5)
> Ok, I try make patch for whdd. How I can get include path for dialog?
> 
> Method with pkg-config not worked :(
> Why?

The dialog-devel package doesn't include a pc file.

> $ pkg-config --cflags-only-I dialog
> Package dialog was not found in the pkg-config search path.
> Perhaps you should add the directory containing `dialog.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'dialog' found
> 
> 
> Only dialog-config --cflags works, but in this way i needed parsing output
> for get clean path.

I think you could use the --cflags output directly. Or you don't want to mix preprocessor flags with compiler flags?