Skip to content

Tip is not building on Mac OS X 10.8 (conflicting types for uuid_t) #3874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nathany opened this issue Jul 28, 2012 · 9 comments
Closed

Tip is not building on Mac OS X 10.8 (conflicting types for uuid_t) #3874

nathany opened this issue Jul 28, 2012 · 9 comments

Comments

@nathany
Copy link
Contributor

nathany commented Jul 28, 2012

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. hg pull
2. hg update
3. ./clean.bash  # initially tried without ./clean, but to be sure
4. ./all.bash

What is the expected output?

ALL TESTS PASSED

What do you see instead?

# ../misc/cgo/test
# _/Users/nathany/Development/go/golang/misc/cgo/test
basic.go:23: error: conflicting types for 'uuid_t'
/usr/include/unistd.h:676: error: previous declaration of 'uuid_t' was here
FAIL    _/Users/nathany/Development/go/golang/misc/cgo/test [build failed]

Which compiler are you using (5g, 6g, 8g, gccgo)?

n/a

Which operating system are you using?

Mac OS X 10.8 Mountain Lion

Which version are you using?  (run 'go version')

tip

changeset:   13768:a36c0344826a
summary:     flag: fix bug in handling of booleans on error

Please provide any additional information below.

With "hg update release" the build does work.

For some reason the darwin build status has been blank the last while.
http://build.golang.org/
@nathany
Copy link
Contributor Author

nathany commented Jul 28, 2012

Comment 1:

So I just learned how to use Mercurial's bisect command.
The first bad revision is:
changeset:   13764:f0b8f8a81cab
user:        Ian Lance Taylor <[email protected]>
date:        Thu Jul 26 23:21:41 2012 -0700
summary:     misc/cgo/test: add test for issue #3871: cgo setgid hang on GNU/Linux
Which makes sense, given the failure.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Does http://golang.org/cl/6446060 fix the problem for you?

Labels changed: added priority-asap, removed priority-triage.

@nathany
Copy link
Contributor Author

nathany commented Jul 28, 2012

Comment 3:

/usr/include/unistd.h:676: error: previous declaration of 'uuid_t' was here:
#ifndef _UUID_T
#define _UUID_T
typedef __darwin_uuid_t     uuid_t;
#endif /* _UUID_T */
Where __darwin_uuid_t can be found in /usr/include/sys/_types.h:
typedef unsigned char   __darwin_uuid_t[16];
vs. in basic.go
typedef unsigned char uuid_t[20];
Nathan.

@nathany
Copy link
Contributor Author

nathany commented Jul 28, 2012

Comment 4:

Hi Ian. Unfortunately it is still failing with the same error even after applying hg
clpatch 6446060. Despite that typedef being there way back when
(https://code.google.com/p/go/source/detail?r=4ca56208569c).
hg status
M misc/cgo/test/basic.go
M misc/cgo/test/cgo_test.go
A misc/cgo/test/cgo_linux_test.go
A misc/cgo/test/setgid_linux.go

@nathany
Copy link
Contributor Author

nathany commented Jul 28, 2012

Comment 5:

If I also remove the #include <unistd.h> line from basic.go, it will build fine on
Darwin. Does that work fine for you?

@gopherbot
Copy link
Contributor

Comment 6 by zeilund:

I've got the same problem when running the tests in go tip on OSX 10.7.4.

@nathany
Copy link
Contributor Author

nathany commented Jul 28, 2012

Comment 7:

Jens, there is a working patch for this issue, which I imagine will be merged to tip
real-soon-now. Based on the code, I don't imagine it's specific to 10.8 or 10.7, but if
you want to test it and have the code review plugin setup for Mecurial
(http://golang.org/doc/contribute.html), just run: hg clpatch 6446060
My one remaining concern is that darwin defined uuid_t as 16 characters whereas Go
defines it as 20, as above. That strikes me as a bit odd, though isn't the cause of this
issue.

@fsouza
Copy link
Contributor

fsouza commented Jul 28, 2012

Comment 8:

Patch from mikioh (http://golang.org/cl/6455057/) works fine.

@ianlancetaylor
Copy link
Contributor

Comment 9:

This issue was closed by revision f7f91a0.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants