aquarat / goncurses

Automatically exported from code.google.com/p/goncurses
Other
0 stars 0 forks source link

Cannot `go get` #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

$ go get -v code.google.com/p/goncurses code.google.com/p/goncurses

pkg-config --cflags form menu ncurses panel

Package form was not found in the pkg-config search path. Perhaps you should add the directory containing form.pc' to the PKG_CONFIG_PATH environment variable No package 'form' found Package menu was not found in the pkg-config search path. Perhaps you should add the directory containingmenu.pc' to the PKG_CONFIG_PATH environment variable No package 'menu' found Package ncurses was not found in the pkg-config search path. Perhaps you should add the directory containing ncurses.pc' to the PKG_CONFIG_PATH environment variable No package 'ncurses' found Package panel was not found in the pkg-config search path. Perhaps you should add the directory containingpanel.pc' to the PKG_CONFIG_PATH environment variable No package 'panel' found exit status 1

Original issue reported on code.google.com by peterbou...@gmail.com on 10 Jun 2013 at 9:41

GoogleCodeExporter commented 9 years ago
This does not look like a bug in goncurses but an issue with your setup. 
pkg-config can't find ncurses or any of its libraries installed. Check to make 
sure you have the dev version of ncurses and pkg-config installed properly.

A query on a search engine like Google should provide you with help to solve 
this issue. 

I will leave this issue open for now but it's likely invalid. I will require 
information like what system you're using to diagnose anything further.

Original comment by rthornto...@gmail.com on 10 Jun 2013 at 10:41

GoogleCodeExporter commented 9 years ago
Sorry, should have mentioned platform: Mac OS 10.8. I have ncurses libraries 
installed; I don't understand why pkg-config comes into the equation.

Original comment by peterbou...@gmail.com on 11 Jun 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Goncurses relies on pkg-config to supply it the correct linker and compiler 
flags for cgo. If ncurses is not installed properly, or the development 
packages aren't installed, pkg-config won't be able to pass the correct flags 
to cgo. That is why 'go get' fails. 

You may also want to look at the wiki for known issues with MacOS.

Original comment by rthornto...@gmail.com on 11 Jun 2013 at 5:52

GoogleCodeExporter commented 9 years ago
> Goncurses relies on pkg-config

This seems like a problem, no?

Original comment by peterbou...@gmail.com on 11 Jun 2013 at 5:55

GoogleCodeExporter commented 9 years ago
No, it does not seem like a problem. 

If you are at all familiar with the C language, in which ncurses has been 
written, and multi-platform programming you would know that libraries can be 
installed in many different locations, can require many different specialized 
flags and have multiple library versions installed, depending on the OS and 
system requirements. 

For example, there is no way for 'go get' to determine whether you want to use 
the wide character version of ncurses or not. It's possible another OS like BSD 
might need to pass on custom compile or linker flags. pkg-config also allows 
goncurses to be more agile with future ncurses releases where the linker and 
compile flags could change.

pkg-config greatly simplifies this and goncurses is not alone in using it to 
provide compile and linker flags to cgo. 

You're also welcome to clone the repo (go get without building or use 
mercurial) and change the cgo flags to include 'LDFLAGS: -lncurses' instead of 
pkg-config as this is an open source project.

Original comment by rthornto...@gmail.com on 11 Jun 2013 at 8:22

GoogleCodeExporter commented 9 years ago
Forgive me for my misunderstanding. Please feel free to close the issue.

Original comment by peterbou...@gmail.com on 11 Jun 2013 at 10:40

GoogleCodeExporter commented 9 years ago
No worries. Goncurses is not well tested on MacOS and I know there are 
outstanding problems with the library on that platform. I know that adding 
fixed flags might solve your immediate problem and but I feel pkg-config 
provides a better, long-term solution for all platforms.

I would be delighted if you took the time to submit further bug reports if you 
manage to get goncurses to link against ncurses. I would like very much to get 
goncurses working on MacOS.

Original comment by rthornto...@gmail.com on 12 Jun 2013 at 4:42

GoogleCodeExporter commented 9 years ago
I used this command "sudo apt-get install libncurses5-dev" to install the 
dependency and resolved this problem, but I don't know how to setup up ncurses 
dev environment on MacOSX.

Original comment by lihaohu...@gmail.com on 12 Feb 2014 at 11:34