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

Failed build on Windows (extraneous text after 'else' directive) #9989

Closed
jasonwilliams opened this issue Mar 14, 2016 · 12 comments
Closed

Failed build on Windows (extraneous text after 'else' directive) #9989

jasonwilliams opened this issue Mar 14, 2016 · 12 comments

Comments

@jasonwilliams
Copy link
Contributor

@jasonwilliams jasonwilliams commented Mar 14, 2016

--- stderr
makefile.cargo:58: extraneous text after 'else' directive
/home/Jason/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/js/src/configure: line 3772: test: (GNU: integer expression expected
Traceback (most recent call last):
  File "C:/msys64/home/Jason/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/build/subconfigure.py", line 422, in <module>
    sys.exit(main(sys.argv[1:]))
  File "C:/msys64/home/Jason/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/build/subconfigure.py", line 406, in main
    return subconfigure(args)
  File "C:/msys64/home/Jason/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/build/subconfigure.py", line 393, in subconfigure
    pool.imap_unordered(run, subconfigures):
  File "C:\python27\Lib\multiprocessing\pool.py", line 668, in next
    raise value
IOError: [Errno 2] No such file or directory: 'intl/icu/target/common/Makefile'
make: *** [all] Error 1
thread '<main>' panicked at 'assertion failed: result.success()', C:/msys64/home/Jason/servo/.cargo\git\checkouts\mozjs-06d7f04b6dbb8a8e\master\build.rs:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Build completed in 21.77s

Full output here, on master branch, pulled today using Mingw like the steps say and I'm getting this output.
https://pastebin.mozilla.org/8863612

@larsbergstrom @vvuk

@jasonwilliams jasonwilliams changed the title Not building on Windows (makefile.cargo:58: extraneous text after 'else' directive) Failed build on Windows (extraneous text after 'else' directive) Mar 14, 2016
@adamncasey
Copy link
Contributor

@adamncasey adamncasey commented Mar 15, 2016

What does your target/{debug|release}/build/mozjs_sys-*/out/config.log file say?

I had the same problem when mozjs wasn't building with C:\Python27. configure failed on a "Python is malfunctioning: sys.executable path incorrect" test

@stefanivic
Copy link

@stefanivic stefanivic commented Mar 16, 2016

I have the same error :

 --- stderr
makefile.cargo:58: extraneous text after 'else' directive
/home/Test/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/js/src/configure: line 3772: test: (GNU: integer expression expected
Traceback (most recent call last):
  File "/home/Test/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 475, in <module>
    manager.ensure()
  File "/home/Test/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 128, in ensure
    return self.build()
  File "/home/Test/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 371, in build
    self.create()
  File "/home/Test/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 147, in create
    raise Exception('Error creating virtualenv.')
Exception: Error creating virtualenv.
make: *** [all] Error 1
thread '<main>' panicked at 'assertion failed: result.success()', C:/msys64/home/Test/servo/.cargo\git\checkouts\mozjs-06d7f04b6dbb8a8e\master\build.rs:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Build completed in 765.71s

Content of config.log


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:893: checking host system type
configure:914: checking target system type
configure:932: checking build system type
configure:993: checking for mawk
configure:993: checking for gawk
configure:1267: checking for perl5
configure:1267: checking for perl
configure:2667: checking for gcc
configure:2780: checking whether the C compiler (gcc  ) works
configure:2796: gcc -o conftest    conftest.c  1>&5
configure:2793:1: warning: return type defaults to 'int' [-Wimplicit-int]^M
configure:2822: checking whether the C compiler (gcc  ) is a cross-compiler
configure:2827: checking whether we are using GNU C
configure:2836: gcc -E conftest.c
configure:2855: checking whether gcc accepts -g
configure:2891: checking for c++
configure:2923: checking whether the C++ compiler (g++  ) works
configure:2939: g++ -o conftest    conftest.C  1>&5
configure:2965: checking whether the C++ compiler (g++  ) is a cross-compiler
configure:2970: checking whether we are using GNU C++
configure:2979: g++ -E conftest.C
configure:2998: checking whether g++ accepts -g
configure:3032: checking for ranlib
configure:3064: checking for ml64
configure:3064: checking for as
configure:3118: checking for ar
configure:3153: checking for ld
configure:3188: checking for strip
configure:3223: checking for windres
configure:3734: checking for w32api version >= 3.14
configure:3748: gcc -c   conftest.c 1>&5
configure:3764: checking for windres version >= 2.14.90
configure:3812: checking for Windows SDK being recent enough
configure:3839: checking how to run the C preprocessor
configure:3919: checking how to run the C++ preprocessor
configure:4059: checking for sb-conf
configure:4059: checking for ve
configure:4121: checking for a BSD compatible install
configure:4174: checking whether ln -s works
configure:4196: checking for tar archiver
configure:4202: checking for gnutar
configure:4202: checking for gtar
configure:4202: checking for tar
configure:4239: checking for minimum required perl version >= 5.006
configure:4249: checking for full perl installation
configure:4267: checking for python2.7
~
@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Mar 17, 2016

@adamncasey I don't have a config.log only a config.status file
Also how did you fix it?

@adamncasey
Copy link
Contributor

@adamncasey adamncasey commented Mar 17, 2016

Do you have Python 2.7 installed to C:\Python27?

When I uninstall python 2.7 on my machine, I get the same error as @nightwalkerkg.

$ ./mach build -d
   Compiling mozjs_sys v0.0.0 (https://github.com/servo/mozjs#5ac99916)
failed to run custom build command for `mozjs_sys v0.0.0 (https://github.com/servo/mozjs#5ac99916)`
Process didn't exit successfully: `C:/msys64/home/Adam/servo/target\debug\build\mozjs_sys-736cac28b49f9dab\build-script-build` (exit code: 101)
--- stdout
cd /home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out && \
PYTHON="""" \
MOZ_TOOLS="/" CC="gcc" CPP="gcc -E" CXX="g++" AR="ar" \
/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/js/src/configure --disable-jemalloc --disable-shared-js --disable-export-js
creating cache ./config.cache
checking host system type... x86_64-pc-mingw64
checking target system type... x86_64-pc-mingw64
checking build system type... x86_64-pc-mingw64
checking for mawk... no
checking for gawk... gawk
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... g++
checking whether the C++ compiler (g++  ) works... yes
checking whether the C++ compiler (g++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for ml64... no
checking for as... /mingw64/bin/as
checking for ar... ar
checking for ld... link
checking for strip... strip
checking for windres... windres
checking for w32api version >= 3.14... yes
checking for windres version >= 2.14.90... (GNU
checking for Windows SDK being recent enough... yes
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... g++ -TP -E -nologo
checking for sb-conf... no
checking for ve... no
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... no
checking for tar archiver... checking for gnutar... no
checking for gtar... no
checking for tar... tar
tar
checking for minimum required perl version >= 5.006... 5.022001
checking for full perl installation... yes
checking for python2.7... /home/Adam/servo/python/_virtualenv/bin/python2.7
Creating Python environment
Using real prefix '/usr'
New python executable in C:/msys64/home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out/_virtualenv/bin/python2.7
Also creating executable in C:/msys64/home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out/_virtualenv/bin/python
ERROR: The executable C:/msys64/home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out/_virtualenv/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out/_virtualenv' (should be u'C:/msys64/home/Adam/servo/target/debug/build/mozjs_sys-736cac28b49f9dab/out/_virtualenv')
ERROR: virtualenv is not compatible with this system or executable
------ config.log ------
configure:2998: checking whether g++ accepts -g
configure:3032: checking for ranlib
configure:3064: checking for ml64
configure:3064: checking for as
configure:3118: checking for ar
configure:3153: checking for ld
configure:3188: checking for strip
configure:3223: checking for windres
configure:3734: checking for w32api version >= 3.14
configure:3748: gcc -c   conftest.c 1>&5
configure:3764: checking for windres version >= 2.14.90
configure:3812: checking for Windows SDK being recent enough
configure:3839: checking how to run the C preprocessor
configure:3919: checking how to run the C++ preprocessor
configure:4059: checking for sb-conf
configure:4059: checking for ve
configure:4121: checking for a BSD compatible install
configure:4174: checking whether ln -s works
configure:4196: checking for tar archiver
configure:4202: checking for gnutar
configure:4202: checking for gtar
configure:4202: checking for tar
configure:4239: checking for minimum required perl version >= 5.006
configure:4249: checking for full perl installation
configure:4267: checking for python2.7
makefile.cargo:75: recipe for target 'all' failed

--- stderr
makefile.cargo:58: extraneous text after 'else' directive
/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/js/src/configure: line 3772: test: (GNU: integer expression expected
Traceback (most recent call last):
  File "/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 475, in <module>
    manager.ensure()
  File "/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 128, in ensure
    return self.build()
  File "/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 371, in build
    self.create()
  File "/home/Adam/servo/.cargo/git/checkouts/mozjs-06d7f04b6dbb8a8e/master/mozjs/python/mozbuild/mozbuild/virtualenv.py", line 147, in create
    raise Exception('Error creating virtualenv.')
Exception: Error creating virtualenv.
make: *** [all] Error 1
thread '<main>' panicked at 'assertion failed: result.success()', C:/msys64/home/Adam/servo/.cargo\git\checkouts\mozjs-06d7f04b6dbb8a8e\master\build.rs:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Build completed in 10.54s

Does this help @nightwalkerkg ?

@stefanivic
Copy link

@stefanivic stefanivic commented Mar 17, 2016

@adamncasey no, mine was in Program Files, i reinstalled it into C: and i'll try to build again.

EDIT : Yeah, that fixed the issue. Thanks man.

@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Mar 19, 2016

Ive deleted the target folder, pulled from master and rebuilt
Now its building but i get:
Servo exited with return value 127

@larsbergstrom How do i debug this again?

@stefanivic
Copy link

@stefanivic stefanivic commented Mar 19, 2016

@Jayflux that happened to me when i open the page as www.google.com instead of http://www.google.com

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Mar 19, 2016

@Jayflux I usually only see 127 when the PATH is incorrect and we pick up an incompatible msys binary.

@nightwalkerkg that's very interesting! I haven't seen that.

@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Mar 19, 2016

@larsbergstrom if i run Servo in debug mode it runs fine

./mach run --dev --debug
r http://en.wikipedia.org

Why would i get no errors from that but running just ./mach run tests/html/about-mozilla.html returns 127?

@jasonwilliams
Copy link
Contributor Author

@jasonwilliams jasonwilliams commented Mar 27, 2016

I've done a git pull and it seems to build now for me, im not sure what changed but maybe something has fixed it
@nightwalkerkg @adamncasey how is it for you?

@stefanivic
Copy link

@stefanivic stefanivic commented Mar 28, 2016

@Jayflux my problem was with the Python path, after i installed it to C:\ it was building fine. :D

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Mar 28, 2016

I think that there are two problems mentioned in this thread:

  1. Incorrect python installation/python-related path stuff in the build (which has to be addressed through re-install of tools)

  2. The "error 127" stuff, which should be cleaned up in #10223

Please open new issues if any of that stuff comes back!

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.