[opensuse-factory] CMake & ncurses
Hi, new kid on the block here. I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it. Is this just an oversight, or done deliberately for some reason? Can anyone suggest an alternative way for CMake to identify ncurses? -- Will J Godfrey -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed 09 Nov 2016 10:54:42 PM CST, Will Godfrey wrote:
Hi, new kid on the block here.
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Can anyone suggest an alternative way for CMake to identify ncurses?
Hi Until the version is at =>6 it looks like no pc file... Add SET(LIBNCURSES_LDFLAGS "-lncurses -ltinfo") in your CMakeLists.txt? -- Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890) openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default up 11 days 6:19, 3 users, load average: 0.40, 0.42, 0.37 CPU AMD Athlon(tm) II X4 635 @ 2.90GHz | GPU Nvidia GeForce 8800 GT -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday 2016-11-10 00:23, Malcolm wrote:
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Well yes, AFAICS, upstream does not ship any .pc files to begin with. Whatever pc file you have been relying on, it smells like a distro-specific hack.
Add SET(LIBNCURSES_LDFLAGS "-lncurses -ltinfo") in your CMakeLists.txt?
That sort of eschews ncurses6. It would appear that ncurses is still config scripts, i.e. `ncursesw6-config --libs` and so on. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 11/10/2016 11:07 AM, Jan Engelhardt wrote:
On Thursday 2016-11-10 00:23, Malcolm wrote:
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Well yes, AFAICS, upstream does not ship any .pc files to begin with. Whatever pc file you have been relying on, it smells like a distro-specific hack.
Add SET(LIBNCURSES_LDFLAGS "-lncurses -ltinfo") in your CMakeLists.txt?
That sort of eschews ncurses6.
It would appear that ncurses is still config scripts, i.e. `ncursesw6-config --libs` and so on.
Cmake upstream has a separate FindCurses package which should also be in openSUSE, this doesn't need the .pc file and you should be using that instead of the generic find_package function probably. https://cmake.org/cmake/help/v3.0/module/FindCurses.html -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adeliade Australia, UTC+9:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
Hello, On Thu, 10 Nov 2016, Simon Lees wrote:
On 11/10/2016 11:07 AM, Jan Engelhardt wrote: [..]
It would appear that ncurses is still config scripts, i.e. `ncursesw6-config --libs` and so on.
Cmake upstream has a separate FindCurses package which should also be in openSUSE, this doesn't need the .pc file and you should be using that instead of the generic find_package function probably. https://cmake.org/cmake/help/v3.0/module/FindCurses.html
ncurses can generate .pc files since at least v5.8, it just needs to be configured with --enable-pc-files. -dnh -- I distinctly remember forgetting that. -Clara Barton -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Nov 09, 2016 at 10:54:42PM +0000, Will Godfrey wrote:
Hi, new kid on the block here.
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Can anyone suggest an alternative way for CMake to identify ncurses?
You might read /usr/share/doc/packages/ncurses/README.devel Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr
On 11/10/2016 07:13 PM, Dr. Werner Fink wrote:
On Wed, Nov 09, 2016 at 10:54:42PM +0000, Will Godfrey wrote:
Hi, new kid on the block here.
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Can anyone suggest an alternative way for CMake to identify ncurses?
You might read
/usr/share/doc/packages/ncurses/README.devel
Werner
CMake already does this, it is just used slightly differently to the way many other projects are found with cmake which is probably causing the issue here. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adeliade Australia, UTC+9:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
On Thu, 10 Nov 2016 19:53:34 +1030 Simon Lees <sflees@suse.de> wrote:
On 11/10/2016 07:13 PM, Dr. Werner Fink wrote:
On Wed, Nov 09, 2016 at 10:54:42PM +0000, Will Godfrey wrote:
Hi, new kid on the block here.
I'm one of the developers for the Yoshimi soft-synth, and have recently been informed that it won't compile on Leap 42.1/42.2. It seems that the version of ncurses here doesn't have a .pc file, so CMake's find_package function is unable to locate it.
Is this just an oversight, or done deliberately for some reason?
Can anyone suggest an alternative way for CMake to identify ncurses?
You might read
/usr/share/doc/packages/ncurses/README.devel
Werner
CMake already does this, it is just used slightly differently to the way many other projects are found with cmake which is probably causing the issue here.
Thanks everyone for such a quick response. After studying the docs, I now have it compiling without ncurses.pc on my usual distros. I try to dig out a spare machine to install leap on and try there too. -- Will J Godfrey http://www.musically.me.uk Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
It seems the answer to this was remarkably simple :o <magic_incantation> set(CURSES_NEED_NCURSES TRUE) find_package (Curses REQUIRED) </magic_incantation> That works across all the distros I can get my hands on :) -- Will J Godfrey http://www.musically.me.uk Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (6)
-
David Haller
-
Dr. Werner Fink
-
Jan Engelhardt
-
Malcolm
-
Simon Lees
-
Will Godfrey