Hi
We need to build protoc/protoc-gen-javalite ourself, because we changed some java lite code generate behavior
I followed Github C++ Installation Wiki https://github.com/protocolbuffers/protobuf/blob/21fc01b63c7f60bae4e230c817a82bd8571a4a70/src/README.md
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
and protoc works well, but javalite does not work
this is how I use javalite
$ protoc --plugin=/usr/local/lib --javalite_out=tracker-builder-lite/src/main/java/ tracker.proto
protoc-gen-javalite: program not found or is not executable
--javalite_out: protoc-gen-javalite: Plugin failed with status code 1.
this is where I install proto lib to
$ l /usr/local/lib/libproto*
-rwxr-xr-x 1 root admin 467K 8 22 21:01 /usr/local/lib/libprotobuf-lite.15.dylib
-rw-r--r-- 1 root admin 5.4M 8 22 21:01 /usr/local/lib/libprotobuf-lite.a
lrwxr-xr-x 1 root admin 25B 8 22 21:01 /usr/local/lib/libprotobuf-lite.dylib -> libprotobuf-lite.15.dylib
-rwxr-xr-x 1 root admin 979B 8 22 21:01 /usr/local/lib/libprotobuf-lite.la
-rwxr-xr-x 1 root admin 3.2M 8 22 21:01 /usr/local/lib/libprotobuf.15.dylib
-rw-r--r-- 1 root admin 54M 8 22 21:01 /usr/local/lib/libprotobuf.a
lrwxr-xr-x 1 root admin 20B 8 22 21:01 /usr/local/lib/libprotobuf.dylib -> libprotobuf.15.dylib
-rwxr-xr-x 1 root admin 949B 8 22 21:01 /usr/local/lib/libprotobuf.la
-rwxr-xr-x 1 root admin 2.7M 8 22 21:01 /usr/local/lib/libprotoc.15.dylib
-rw-r--r-- 1 root admin 93M 8 22 21:01 /usr/local/lib/libprotoc.a
lrwxr-xr-x 1 root admin 18B 8 22 21:01 /usr/local/lib/libprotoc.dylib -> libprotoc.15.dylib
-rwxr-xr-x 1 root admin 967B 8 22 21:01 /usr/local/lib/libprotoc.la
Is there anything wrong ? What did I miss?
Can anybody help me ?
To build the javalite plugin you need to get the source code from the javalite branch:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.1-javalite
Download the source package in the above release page and build from there. An additional javalite plugin binary should be produced.
it works, thanks
@xfxyjwf , @CooperLuan
Excuse me, can u send me a guide how to build this source?
Most helpful comment
To build the javalite plugin you need to get the source code from the javalite branch:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.1-javalite
Download the source package in the above release page and build from there. An additional javalite plugin binary should be produced.