You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Alejandro Abdelnur (JIRA)" <ji...@apache.org> on 2013/08/14 19:24:47 UTC

[jira] [Commented] (HADOOP-9872) Improve protoc version handling and detection

    [ https://issues.apache.org/jira/browse/HADOOP-9872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13739899#comment-13739899 ] 

Alejandro Abdelnur commented on HADOOP-9872:
--------------------------------------------

I've tested the patch with/without the env var defined and with the right and wrong versions of protoc.
                
> Improve protoc version handling and detection
> ---------------------------------------------
>
>                 Key: HADOOP-9872
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9872
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 2.1.0-beta
>            Reporter: Alejandro Abdelnur
>            Priority: Blocker
>             Fix For: 2.1.0-beta
>
>         Attachments: HADOOP-9872.patch
>
>
> HADOOP-9845 bumped up protoc from 2.4.1 to 2.5.0, but we run into a few quirks:
> * 'protoc --version' in 2.4.1 exits with 1
> * 'protoc --version' in 2.5.0 exits with 0
> * if you have multiple protoc in your environment, you have to the the one you want to use in the PATH before building hadoop
> * build documentation and requirements of protoc are outdated
> This patch does:
> * handles version correctly independently of the exit code
> * if HADOOP_PROTOC_PATH env var is defined, it uses it as the protoc executable * if HADOOP_PROTOC_PATH is not defined, it picks protoc from the PATH
> * documentation updated to reflect 2.5.0 is required
> * enforces the version of protoc and protobuf JAR are the same
> * Added to VersionInfo the protoc version used (sooner or later this will be useful for in a troubleshooting situation).
> [~vicaya] suggested to make the version check for protoc lax (i.e. 2.5.*). While working on the patch I've thought about that. But that would introduce a potential mismatch between protoc and protobuff  JAR.
> Still If you want to use different version of protoc/protobuff from the one defined in the POM, you can use the -Dprotobuf.version=#### to specify your alternate version. But I would recommend not to do this, because if you publish the artifacts to a Maven repo, the fact you used -Dprotobuf.version=#### will be lost and the version defined in the POM properties will be used (IMO Maven should use the effective POM on deploy, but they don't).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira