rthornton128 / goncurses

NCurses Library for Go
Other
383 stars 51 forks source link

Mac build problem #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ go version
go version devel +ab5aaf4b34f2 Tue Jan 29 14:57:11 2013 +0400 darwin/amd64

I have installed ncurses-5.9, with --prefix=/usr/local/lib. I got the head 
goncurses, and modified form_posix.go, menu_posix.go, ncurses.go and 
panel_posix.go to have
  #cgo LDFLAGS: -L/usr/local/lib -lncurses
to force it to use the new library (I couldn't get "go install" to do the right 
thing).

I have got a C ncurses hello world to work fine. I cannot get a Go hello world 
program (at the bottom of this report) to even build. It fails with
  $ go run test.go
  # command-line-arguments
  .dynsym: COLOR_PAIRS(0): not defined

-----
package main

import (
    "log"

    "code.google.com/p/goncurses"
)

func main() {
    w, err := goncurses.Init()
    if err != nil {
        log.Fatalf("goncurses.Init: %v", err)
    }
    defer goncurses.End()
    w.Print("Hello World! Press any key to quit.")
    w.Refresh()
    w.GetChar()
}
-----

Original issue reported on code.google.com by dsymo...@golang.org on 8 Feb 2013 at 2:16

GoogleCodeExporter commented 9 years ago
My uname:

Darwin xxx 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; 
root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64

Original comment by dsymo...@golang.org on 8 Feb 2013 at 2:23

GoogleCodeExporter commented 9 years ago
Judging by the output it appears to be a linker issue. It may be related to 
this Go bug: https://code.google.com/p/go/issues/detail?id=4069

You may find that the suggested work-arounds found in this thread on the Go 
mailing list may work: 
https://groups.google.com/forum/#!topic/golang-nuts/n5E-KudcoKQ

It's also possible, though unlikely, that it's linking the static library 
instead of the shared object. You may want to very this is the case as this 
will also cause the problem.

Original comment by rthornto...@gmail.com on 9 Feb 2013 at 2:09

GoogleCodeExporter commented 9 years ago
Closed due to lack of response and inability to test and resolve problem.

Original comment by rthornto...@gmail.com on 10 Mar 2013 at 3:45