moovweb/gokogiri

clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'

Closed this issue · 9 comments

I seem to get this both when trying to use Gokogiri and when I tried to go get gokogiri again. :S Hope this isn't just me being stupid haha.

Cheers

George

Can you give us more information about your system? Also, have you tried this recently? We cleaned up the code base earlier this week to make go get cleaner. Try using it with the -u flag to make sure it gets the latest code:

go get -u github.com/moovweb/gokogiri

I can't get most CGO stuff working against clang on Mavericks at all....

On Sun, Oct 27, 2013 at 4:23 PM, Manoj Dayaram notifications@github.comwrote:

Can you give us more information about your system? Also, have you tried
this recently? We cleaned up the code base earlier this week to make go
get cleaner. Try using it with the -u flag to make sure it gets the
latest code:

go get -u github.com/moovweb/gokogiri


Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-27178301
.

Ah I see I think this is mavericks fault. I get the error even when running go get.

go get -u github.com/moovweb/gokogiri
github.com/moovweb/gokogiri/xpath
clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'

This has been run on mavericks OS X 10.9

If this is any help, here is my clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Looks like the upstream filed by @GeorgeMac has been accepted as a cgo bug - http://code.google.com/p/go/issues/detail?id=6678

Cool, it looks like the code has been fixed on golang tip. @GeorgeMac can you verify that the problem no longer shows up if you use the tip version of Go?

Just pulling and building it now to see.
Cheers guys

I can confirm that it appears to be working now.
I get this response when getting gokogiri instead:

go get -u github.com/moovweb/gokogiri
github.com/moovweb/gokogiri/xml
go/src/github.com/moovweb/gokogiri/xml/helper.c:7:3: warning: implicit declaration of function 'xmlNodeWriteCallback' is invalid in C99 [-Wimplicit-function-declaration]
go/src/github.com/moovweb/gokogiri/xml/helper.c:106:8: warning: initializing 'char *' with an expression of type 'xmlChar *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
go/src/github.com/moovweb/gokogiri/xml/helper.c:112:4: warning: implicit declaration of function 'xmlUnlinkNodeCallback' is invalid in C99 [-Wimplicit-function-declaration]

But my code with gokogiri dependencies seems to be building.
Cheers everyone

Odd, but glad things are working. Will make a different issue with the warnings you're receiving.