Gary-Xie / go-charset

Automatically exported from code.google.com/p/go-charset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate symbols _iconv_open_error and _iconv_error in iconv.go and list_query.go

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Install Go 1.2 on OS X Mavericks
2. Install the default Xcode command line tools (run "xcode-select --install" 
from Terminal)
3. Build go-charset

What is the expected output? What do you see instead?
I'd expect building to work, but instead it fails with:

# code.google.com/p/go-charset/charset/iconv
ld: warning: directory not found for option '-L/opt/local/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
duplicate symbol _iconv_open_error in:
    $WORK/code.google.com/p/go-charset/charset/iconv/_obj/iconv.cgo2.o
    $WORK/code.google.com/p/go-charset/charset/iconv/_obj/list_query.cgo2.o
duplicate symbol _iconv_error in:
    $WORK/code.google.com/p/go-charset/charset/iconv/_obj/iconv.cgo2.o
    $WORK/code.google.com/p/go-charset/charset/iconv/_obj/list_query.cgo2.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What version of the product are you using? On what operating system?
Fails with tip.

Please provide any additional information below.
This issue can be fixed by removing the exports of iconv_open_error and 
iconv_error from list_query.go. It looks like these symbols aren't used in this 
file at all, so removing the export should be fine. See the attached patch, 
which resolves this issue for me.

Original issue reported on code.google.com by b...@nhaminated.com on 18 Oct 2013 at 9:21

Also, there are some missing imports and returns in list_query.go. I've 
attached a patch with all the fixes to list_query.go below.

Original comment by b...@nhaminated.com on 18 Oct 2013 at 9:33

Attachments: