Author Topic: Cannot compile nasm on Win64.  (Read 12677 times)

Offline lockywolf

  • New Member
  • Posts: 1
Cannot compile nasm on Win64.
« on: September 19, 2012, 04:51:36 PM »
I am using VC 2012, Win64 Command Line and nmake.

I type:

Quote
nmake /F Mkfiles/msvc64.mak

msvc64.mak is a copy of msvc.mak.

Nasm copmilation stops on the following error:

Code: [Select]
macros.c
macros.c(175) : error C2466: cannot allocate an array of constant size 0
macros.c(176) : error C2059: syntax error : '}'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Cannot compile nasm on Win64.
« Reply #1 on: September 21, 2012, 06:55:49 PM »
Hi lockywolf,

Sorry for the delayed reply. I don't see the problem. In fact, I don't even see the closing brace until line 177. I'm looking at 2.10 - not the very latest version - which could explain something. I'll download latest version and see if the '}' is at least on the right line. :)

I'm running Linux - on 32-bit hardware - so I can't replicate it exactly. We're going to need some advice from elsewhere. Can you tell us exactly which version you're trying, and whether your "macros.c" is as-is or has been regenerated by Perl? (shouldn't regenerate unless you've changed "standard.mac", I don't think). It's "supposed to work"!

Thanks for the feedback!

Best,
Frank


Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: Cannot compile nasm on Win64.
« Reply #2 on: September 21, 2012, 07:19:15 PM »
This seems to be a known bug http://bugzilla.nasm.us/show_bug.cgi?id=3392209
Unfortunately I've had no time to look at it still, sorry :-(

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Cannot compile nasm on Win64.
« Reply #3 on: September 21, 2012, 07:56:38 PM »
Whoops. I should have looked there first. Thanks, Cyrill.

Just downloaded the 9/16 snapshot. Now the '}' is on line 179. Line above that is "0", which I suppose is what MSVC is complaining about(?). Still no clue.

Best,
Frank


Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: Cannot compile nasm on Win64.
« Reply #4 on: September 21, 2012, 08:40:35 PM »
Well, I guess there are actually a couple of problems -- one of them is that our makefile for msvc compiler is a bit broken :)