howcrazy / go-charset

Automatically exported from code.google.com/p/go-charset
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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: