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

[warsaw] protobuf Install error #5

Closed
Hiroki11x opened this issue Jul 16, 2017 · 9 comments
Closed

[warsaw] protobuf Install error #5

Hiroki11x opened this issue Jul 16, 2017 · 9 comments
Assignees

Comments

@Hiroki11x
Copy link
Member

Hiroki11x commented Jul 16, 2017

I installed libtool from source

However, the following error occured

@warsaw:~/env/src/protobuf-3.3.0$ ./autogen.sh 
~~
configure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

maxmind/libmaxminddb#9

Is is necessary to yum install libtool ?

@Hiroki11x
Copy link
Member Author

Edit Makefile.am

ACLOCAL_AMFLAGS = -I /home/hiroki11x/env/local/libtool-2.4.6/share/aclocal

The error is below

configure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

@Hiroki11x
Copy link
Member Author

@Hiroki11x
Copy link
Member Author

Hiroki11x commented Jul 19, 2017

in Reedbush

I use pyenv and pip install protobuf

http://keisanbutsuriya.hateblo.jp/entry/2015/03/21/183323

It is valid for only Caffe2 build

@Hiroki11x Hiroki11x changed the title Error Protobuf Install [Warsaw] Error Protobuf Install Jul 19, 2017
@sekiya-a
Copy link

I could run ./autogen.sh successfully with below commands:

$ brew install libtool autoconf automake
$ ./autogen.sh

automake / aclocal cannot find libtool.m4 in the macro search path, so below will be work:

ACLOCAL_AMFLAGS = -I m4 -I /home/hiroki11x/env/local/libtool-2.4.6/share/aclocal

@Hiroki11x
Copy link
Member Author

@sekiya-a
Do you use Linuxbrew ?

@sekiya-a
Copy link

sekiya-a commented Jul 19, 2017 via email

@Hiroki11x
Copy link
Member Author

Hiroki11x commented Jul 19, 2017

wget https://github.com/google/protobuf/archive/v3.3.0.tar.gz
tar zxvf v3.3.0.tar.gz
cd protobuf-3.3.0
vim Makefile.am
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I /home/hiroki11x/env/local/libtool-2.4.6/share/aclocal
./autogen.sh

is correct ? @sekiya-a

I failed in the above flow

$ ./autogen.sh 
+ autoreconf -f -i -Wall,no-obsolete
configure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

@Hiroki11x Hiroki11x changed the title [Warsaw] Error Protobuf Install [warsaw] protobuf Install error Jul 19, 2017
@sekiya-a
Copy link

sekiya-a commented Jul 22, 2017

gmockがこけているようです

-bash-4.2$ cd gmock; /usr/bin/autoreconf -isvf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory gtest to autoreconf
autoreconf: Entering directory `gtest'
autoreconf: running: aclocal --force -I m4
autoreconf: running: libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: linking file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --force-missing
configure.ac:24: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
autoreconf: Leaving directory `gtest'
autoreconf: configure.ac: not using Libtool
configure.ac:26: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

gmockconfigure.acとかMakefile.amを編集して手動でaclocal -I m4 && libtoolize && autoreconf -isvfとかすれば上手く行きます

面倒なのでlinuxbrewを使うと良いと思います

追記:
直接の原因はaclocalからlibtoolのマクロファイルが見えていないことだと思います
ACLOCAL_PATH=/home/hiroki11x/env/local/libtool-2.4.6/share/aclocal ./autogen.sh
とかでも上手く行くかもしれません

@Hiroki11x
Copy link
Member Author

ACLOCAL_PATH=/home/hiroki11x/env/local/libtool-2.4.6/share/aclocal ./autogen.sh

suceeded

thanks for your help @sekiya-a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants