odin1314 / yara-project

Automatically exported from code.google.com/p/yara-project
Apache License 2.0
0 stars 0 forks source link

Yara 1.7 fails to build on Ubuntu 10.04 (automake 1.11 issue?) #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn checkout http://yara-project.googlecode.com/svn/trunk/ 
yara-project-read-only
2. ./configure --with-re2 ; ./bootstrap.sh
3. make

What is the expected output? What do you see instead?
Expected make to succeed, instead this error:

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash 
/home/chort/code/tmp/yara-project-read-only/missing --run aclocal-1.12 -I m4
/home/chort/code/tmp/yara-project-read-only/missing: line 52: aclocal-1.12: 
command not found
WARNING: `aclocal-1.12' is missing on your system.  You should only need it if
         you modified `acinclude.m4' or `configure.ac'.  You might want
         to install the `Automake' and `Perl' packages.  Grab them from
         any GNU archive site.
 cd . && /bin/bash /home/chort/code/tmp/yara-project-read-only/missing --run automake-1.12 --gnu
/home/chort/code/tmp/yara-project-read-only/missing: line 52: automake-1.12: 
command not found
WARNING: `automake-1.12' is missing on your system.  You should only need it if
         you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
         You might want to install the `Automake' and `Perl' packages.
         Grab them from any GNU archive site.
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash 
/home/chort/code/tmp/yara-project-read-only/missing --run autoconf
configure.ac:3: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:18: error: possibly undefined macro: AM_CONDITIONAL
make: *** [configure] Error 1

What version of the product are you using? On what operating system?
Trying to build Yara 1.7 on Ubuntu 10.04 64bit. I can checkout and build 
revision 162 without any problems.

Please provide any additional information below.
Attached file has output from ./configure --with-re2, ./bootstrap.sh, and make

Original issue reported on code.google.com by cho...@gmail.com on 26 Jan 2013 at 11:43

Attachments:

GoogleCodeExporter commented 9 years ago
It builds OK on Ubuntu 12.04 64bit, which is odd to me since the automake 
version is still 1.11. See attachment.

Original comment by cho...@gmail.com on 31 Jan 2013 at 4:07

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same issue. Exactly. Ubuntu 11.04.

Original comment by dlbenn...@gmail.com on 7 Feb 2013 at 2:09

GoogleCodeExporter commented 9 years ago
Also, Revision 163 builds fine (with bootstrap.sh). But NOT the latest.. (1.7) 
*arrgghh*

Original comment by dlbenn...@gmail.com on 7 Feb 2013 at 2:22

GoogleCodeExporter commented 9 years ago
Also, trying to do a ./configure, then ./bootstrap.sh with Yara 1.7 produces 
the error "cd: 23 can't cd to libyara" (the folder exists). Weird! (of course 
make and make install fail after that).

Original comment by dlbenn...@gmail.com on 7 Feb 2013 at 2:28

GoogleCodeExporter commented 9 years ago
Nudge.. anything? anyone?

Original comment by dlbenn...@gmail.com on 20 Feb 2013 at 11:25

GoogleCodeExporter commented 9 years ago
Same problem on Apple OSX 10.7. with MacPorts, automake 1.13.1.

Running "autoreconf" solved this issue for me.

Original comment by andreas....@gmail.com on 24 Feb 2013 at 1:10

GoogleCodeExporter commented 9 years ago
http://rants.effu.se/2013/01/Installing-Latest-Yara-That-Works-With-Automake-1.1
1

Will build 1.62 still no joy with 1.7.

Original comment by dlbenn...@gmail.com on 26 Feb 2013 at 11:25

GoogleCodeExporter commented 9 years ago
Of course, everything works fine with 11.x or higher.

Original comment by dlbenn...@gmail.com on 28 Feb 2013 at 1:35

GoogleCodeExporter commented 9 years ago
Possibly relevant (since I'm having similar errors on OSX when trying to run 
autoreconfig)
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html

Original comment by cho...@gmail.com on 6 Mar 2013 at 4:24

GoogleCodeExporter commented 9 years ago
I have managed to get this to compile successfully under ubuntu 12.10.

nathaniel@nxps:~/src/yara-project-read-only$ uname -a
Linux nxps 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 
x86_64 x86_64 GNU/Linux

I installed automake1.9 via apt-get and removed the older version.

Checked out latest SVN:

nathaniel@nxps:~/src$ svn checkout 
http://yara-project.googlecode.com/svn/trunk/ yara-project-read-only 
A    yara-project-read-only/force.cpp

Ran ./configure:
nathaniel@nxps:~/src/yara-project-read-only$ ./configure 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu

Then ran bootstrap.sh - NOTE THIS STILL ERRORS.

nathaniel@nxps:~/src/yara-project-read-only$ ./bootstrap.sh 
mkdir: cannot create directory `m4': File exists
mkdir: cannot create directory `libyara/m4': File exists
./bootstrap.sh: 16: ./bootstrap.sh: libtoolize: not found
./bootstrap.sh: 11: hash: libtoolize: not found

Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 
195.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 
195.
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
Can't exec "libtoolize": No such file or directory at 
/usr/share/autoconf/Autom4te/FileUtils.pm line 345, <GEN3> line 6.
autoreconf: failed to run libtoolize: No such file or directory
autoreconf: libtoolize is needed because this package uses Libtool
./bootstrap.sh: 23: cd: can't cd to libyara

However, running aclocal, then autoconf, followed by running make, gives you a 
working build.

nathaniel@nxps:~/src/yara-project-read-only$ file yara
yara: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked 
(uses shared libs), for GNU/Linux 2.6.24, 
BuildID[sha1]=0xd0599a714a9e26ea9f2633daeef8f8bda6ef1669, not stripped
nathaniel@nxps:~/src/yara-project-read-only$ ./yara
usage:  yara [OPTION]... [RULEFILE]... FILE | PID
options:
  -t <tag>                  print rules tagged as <tag> and ignore the rest. Can be used more than once.
  -i <identifier>           print rules named <identifier> and ignore the rest. Can be used more than once.
  -n                        print only not satisfied rules (negate).
  -g                        print tags.
  -m                        print metadata.
  -s                        print matching strings.
  -l <number>               abort scanning after a <number> of rules matched.
  -d <identifier>=<value>   define external variable.
  -r                        recursively search directories.
  -f                        fast matching mode.
  -v                        show version information.

Report bugs to: <vmalvarez@virustotal.com>
nathaniel@nxps:~/src/yara-project-read-only$ ./yara -v
yara 1.7 (rev:164)

Original comment by nathanie...@gmail.com on 17 Mar 2013 at 11:52

GoogleCodeExporter commented 9 years ago
Installing libtool then generates the 'no-extra-portability' error - removing 
it removes this (but adds other errors).

To build yara-python, you'll have to repeat the similar steps for libyara, then 
adjust the Makefile for a valid MKDIR_P (mkdir -p), then sudo make install, 
then build yarapython as normal.

Original comment by nathanie...@gmail.com on 18 Mar 2013 at 12:01

GoogleCodeExporter commented 9 years ago
After installing automake, autoconf, and libtool under Ubuntu 13.04, I ran 
./bootstrap.sh then ./configure

After the above, I was able to build it with "make" "sudo make install" just 
fine.

Original comment by rsimmo...@gmail.com on 1 May 2013 at 5:56

GoogleCodeExporter commented 9 years ago
Build also fails on CentOS 5.9.

Original comment by ch...@smtps.net on 21 May 2013 at 8:38

GoogleCodeExporter commented 9 years ago
I've fixed this issue, at least it works fine in Ubuntu 11.04 and 12.04. Anyone 
with a different operating system who wants to test it is welcomed.

svn co https://yara-project.googlecode.com/svn/branches/yara-1.x
cd yara-1.x
./bootstrap.sh
./configure
make

Please notice that these changes are in /svn/branches/yara-1.x, not in 
/svn/trunk. 

Original comment by plus...@gmail.com on 23 May 2013 at 1:43

GoogleCodeExporter commented 9 years ago
Confirmed the steps in #14 (copied exactly w/ cut & paste) work on Ubuntu 10.04 
(YAY!!!). Result:
$ ./yara -v
yara 1.7 (rev:179)

Unfortunately on CentOS 5.9 the bootstrap.sh script fails to produce a 
configure script:
$ ./bootstrap.sh 
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
configure.ac: installing `./install-sh'
regex/Makefile.am: installing `./depcomp'
aclocal: couldn't open directory `m4': No such file or directory
autoreconf: aclocal failed with exit status: 1
Remember to add `AC_PROG_LIBTOOL' to `configure.ac'.
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
Makefile.am: installing `./INSTALL'
Makefile.am: installing `./depcomp'
aclocal: couldn't open directory `m4': No such file or directory
autoreconf: aclocal failed with exit status: 1

Original comment by ch...@smtps.net on 23 May 2013 at 8:24

GoogleCodeExporter commented 9 years ago
Now it works on CentOS 5.9 as well

Original comment by plus...@gmail.com on 24 May 2013 at 9:33