install - installing to a local folder instead of /usr/local/...

4,637 views
Skip to first unread message

elenzil

unread,
Nov 25, 2009, 8:25:24 PM11/25/09
to Protocol Buffers
Howdy!

apologies in advance if i ask something meaningless.

we have a number of dev-boxes on osx and linux,
and would like to simply compile protoc for each platform and include
it as part of our project repository,
rather than installing it up in the root /usr/local folder.
this should simplify the build process for new engineers, and avoid
having to sudo.

is this feasible ?

my approach was going to be to make install to a local folder and then
copy that folder into our repo.

however when using the --prefix option to ./configure, eg:
./configure --prefix="/tmp/myLocalFolder/protobuf"
and then doing make install,
i get the error
"libtool: install: error: cannot install `libprotoc.la' to a directory
not ending in /usr/local/lib".

am i attempting something impossible / meaningless / ignorant ?

tia,
Orion

Kenton Varda

unread,
Nov 25, 2009, 8:44:46 PM11/25/09
to elenzil, Protocol Buffers
When you configured with --prefix, was it in a clean directory, or one in which you had done previous builds?  My guess is that you had already built with a different prefix and this confused libtool.  Make sure to do "make clean" after you change the prefix.


--

You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.



elenzil

unread,
Nov 25, 2009, 8:48:00 PM11/25/09
to Protocol Buffers
should have done a bit more searching first.

looks like the solution may look like this:

* run configure with --prefix set to the target folder,
and with --disable-shared specified to trigger static linking.

* make clean

* make install

and there you have a portable version of protoc !

sorry for the spam,
hopefully this will help someone in the future. in the future!

orion

Amila

unread,
Sep 10, 2018, 5:20:48 AM9/10/18
to Protocol Buffers
It did. Thanks Orion!

Regards,
Amila 
Reply all
Reply to author
Forward
0 new messages