Skip to content
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

(wip) update 3.0.0-beta-1 #6

Closed
wants to merge 5 commits into from
Closed

(wip) update 3.0.0-beta-1 #6

wants to merge 5 commits into from

Conversation

tbg
Copy link
Member

@tbg tbg commented Dec 29, 2015

I couldn't quite get it to work. During ./import.sh, there are warnings

checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking whether to check for GCC pthread/shared inconsistencies... no
checking whether what we have so far is sufficient with -nostdlib... no
checking whether -lpthread saves the day... no
configure: WARNING: Impossible to determine how to use pthreads with shared libraries and -nostdlib

and they come true:

$ go build .
# github.com/cockroachdb/c-protobuf
./common.cc:51:2: error: "No suitable threading library available."

I'm not sure whether I removed something that made this work (due to numerous file changes, I didn't want to stick with the old import script and "keep" most of the files - I wiped everything and updated the scripts so that they would work then) or whether the pthread issue is just "new".
This also brings up bad memories of linking pthread statically.

@bdarnell
Copy link
Member

protocolbuffers/protobuf#74 suggests that this may be a problem with the version of libtool you're using.

We shouldn't be running autogen.sh if we can avoid it: this uses your local autoconf/automake versions which can have unpredictable results. If we download the protobuf-cpp release tarball instead of the tarball that is autogenerated from the git repo, the configure script is already present so we don't need to run autogen.sh. Does that work for you?

@tbg
Copy link
Member Author

tbg commented Dec 29, 2015

Nope, same behaviour (but I've updated ./import.sh with your suggestions).

@bdarnell
Copy link
Member

It's not just you; I get the same failure on my machine.

@petermattis
Copy link
Contributor

Your import.sh mostly worked for me. Related to OS X version? I'm on El Capitan (10.11.1).

We'll need to add -DHAVE_PTHREAD to cgo_flags.go. And the list of PROTOC sources wasn't quite correct for me. It was stripping out stuff like bytestream.cc do to look naively for test in the path name.

@tbg
Copy link
Member Author

tbg commented Dec 29, 2015

touched up by @petermattis in #7.

@tbg tbg closed this Dec 30, 2015
@tamird tamird deleted the tschottdorf/update branch January 6, 2016 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants