Project

General

Profile

Actions

Support #1968

closed

Suricata syntax error on autogen.sh - unexpected token 'elif'

Added by bas roovers over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Affected Versions:
Label:

Description

when i am following the instructions on the windows installation guide through Cygwin i am running against a syntax error while running the autogen.sh.

./autogen.sh: line 6: syntax error near unexpected token `elif'
'/autogen.sh: line 6: ` elif which glibtoolize > /dev/null;

I searched on how to get this to work but i can't seem to found the issue with the syntax. It might be specific to Cygwin.

Details:
Windows server 2012R2
Cygwin GNU Bash 4.3.46(7) (u686-PC-Cygwin)

any suggestions on how to fix this are appreciated.

Used guide:
https://redmine.openinfosecfoundation.org/attachments/download/1175/SuricataWinInstallationGuide_v1.4.3.pdf


Files

config.log (13.9 KB) config.log bas roovers, 11/30/2016 10:09 AM
Actions #1

Updated by Peter Manev over 7 years ago

Are trying to compile latest git or a stable version? I think there is a diff in the command lines as noted in the doc (unless you are compiling latest git ofcourse in this case).

Actions #2

Updated by bas roovers over 7 years ago

I think it is getting the latest git and not the stable version if i'm reading the instruction correctly:
" As you are still in the CYGWIN environment -
Type in
git clone git://phalanx.openinfosecfoundation.org/oisf.git
Then after it is done
cd oisf
Then we need libhtp:
git clone git://github.com/ironbee/libhtp.git -b 0.5.x"

what would be altered in this to get the stable version, and also important, do i need to remove the current installed version and how......?
(Keep in mind, my knowledge about these CLI's is very basic and i rely a lot on the documentation that excists).

Actions #3

Updated by Victor Julien over 7 years ago

  • Tracker changed from Bug to Support
  • Priority changed from High to Normal

As a reference, our appveyor.yml contains all steps to build on cygwin from git: https://github.com/inliniac/suricata/blob/master/appveyor.yml

Actions #4

Updated by Peter Manev over 7 years ago

  • Priority changed from Normal to High

As in the doc I just rerun the following to confirm (in cygwin) -

git clone https://github.com/inliniac/suricata.git 
cd suricata 
git clone git://github.com/ironbee/libhtp.git -b 0.5.x 
./autogen.sh 
./configure  --enable-luajit --enable-pie --enable-geoip --disable-gccmarch-native --with-libnss-libraries=/usr/lib --with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib --with-libnspr-includes=/usr/include/nspr   
make clean 
make

and it worked as expected on 2012R2

Did you mange to do successfully all the other steps before that in the doc?

Actions #5

Updated by Peter Manev over 7 years ago

  • Priority changed from High to Normal
Actions #6

Updated by bas roovers over 7 years ago

Victor, you are correct, this seems to be more of a support request, my mistake.

I read the reference voor appveyor, but it seems to be based on "building" an installation for Suricata, and i am trying to install Suricata.
Could someone let me know the changes i should do to the git:// adress to get the stable version?

I appreciate the help and i am aware i have a lot to learn on this subject :).

Actions #7

Updated by Victor Julien over 7 years ago

Maybe the .msi installers here are enough? https://suricata-ids.org/download/

Actions #8

Updated by bas roovers over 7 years ago

Peter Manev wrote:

As in the doc I just rerun the following to confirm (in cygwin) -
[...]
and it worked as expected on 2012R2

Did you mange to do successfully all the other steps before that in the doc?

Peter, i did notice a few differences in the installation of the newer version of Cygwin, i'm going to double check this now to make sure all the functions an prerequisites are installed.

Actions #9

Updated by bas roovers over 7 years ago

I missed several required packages, they are being installed now, ill let you know the result later today!

Thank you for your help, even though the solution was tracing back my stupidity :).

Actions #10

Updated by Peter Manev over 7 years ago

Thanks for the update.
There is nothing silly to worry about - you actually are helping us by confirming the docs are correct. It is helpful.

Actions #11

Updated by bas roovers over 7 years ago

Alright, the lack of packages did cause the error with the syntax.
That part is fixed.

Now i am running in to a configure error at the end:
" checking dependency style of gcc... none
checking for gcc option to accept ISO C99... none needed
checking build system type... Invalid configuration `gccmarch-native': machine `gccmarch' not recognized
configure: error: /bin/sh ./config.sub gccmarch-native failed"

i should have all the prerequisites now, and google didn't give me much in terms of explaination about this error :(.

Actions #12

Updated by Peter Manev over 7 years ago

What is your config line?

Actions #13

Updated by bas roovers over 7 years ago

I am running the following command (copy paste from the history):
$ ./autogen.sh && ./configure --enable-luajit --enable-pie --enable-geoip --disable- gccmarch-native --with-libnss-libraries=/usr/lib --with-libnss- includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib --with-libnspr- includes=/usr/include/nspr && make clean && make

I do believe you mean something else though, but I don't exactly know what i should be looking for as the config line?

I did find the log file for the config it was running (see attachment).

Actions #14

Updated by Victor Julien about 7 years ago

Notice the space in "--disable- gccmarch-native". Please remove that space and try again.

Actions #15

Updated by Andreas Herz almost 7 years ago

  • Assignee set to Anonymous
  • Target version set to TBD
Actions #16

Updated by Andreas Herz over 6 years ago

  • Status changed from New to Closed

Closed due to no response within the last 7months

Actions #17

Updated by Victor Julien over 6 years ago

  • Target version deleted (TBD)
Actions

Also available in: Atom PDF