Author Topic: nasm build problems  (Read 6625 times)

Offline walker

  • Jr. Member
  • *
  • Posts: 4
nasm build problems
« on: November 07, 2011, 01:21:35 PM »
Hello,

I am trying to build nasm (I'm following a tutorial) and am having problems.  Is this the proper forum to ask about this?

walker

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2373
  • Country: us
Re: nasm build problems
« Reply #1 on: November 07, 2011, 03:50:36 PM »
Sure. Although... if it turns out to be a real "bug" in the build process, we may want to discuss it with the "nasm-devel" list at SourceForge, as well...

What's the tutorial? What platform? What compiler? What do you do? What happens?

On Linux, I just "./configure" and then, as root, "make install_everything". Actually, I usually do "make everything" as user, and then "make install_everything" as root, but that shouldn't be neccessary. I guess the "everything" and "install_everything" targets aren't too obvious. Other approaches "should" work, too. If you haven't got the "./configure" system, you'll have to pick a Makefile from the Mkfiles directory, I guess...

What are you having trouble with?

Best,
Frank


Offline walker

  • Jr. Member
  • *
  • Posts: 4
Re: nasm build problems
« Reply #2 on: November 08, 2011, 04:53:16 AM »
Thanks.

I do not think this is a nasm problem, I think it is an environment problem; but I do not have enough experience to diagnose it.

I am using gcc in every case.

I am familiar with the usual routine of .configure, make, make install; and that generally works as advertised.

In this case I get more warnings than I am accustomed to.

Here are a few lines of the warnings I get:

assemble.c:514:21: warning: case value ‘27’ not in enumerated type ‘enum prefixes’
assemble.c:521:21: warning: case value ‘49’ not in enumerated type ‘enum prefixes’
assemble.c:528:21: warning: case value ‘57’ not in enumerated type ‘enum prefixes’
assemble.c:535:21: warning: case value ‘60’ not in enumerated type ‘enum prefixes’
assemble.c:538:21: warning: case value ‘61’ not in enumerated type ‘enum prefixes’

If one googles:

        "warning: case value ‘27’ not in enumerated type"

one gets about 14 hits.  So this does not seem to be a common warning.

I am following the tutorial located at the url:

      http://ingar.satgnu.net/devenv/mingw32/index.html

I am running a freshly installed mingw environment on 

      windows 7 starter 32 OS
      Intel Atom N450
      2GB Ram

==================================
Environments giving similar results:
---------------------------------
nasm versions 2-09.10, 2.08, 2.07, 2.06, 2.00, 0.99.06 on linux machine:

      Opensuse 11.3  64 bit 2.6.34.10-0.2-desktop
      Intel i7 950 @ 3.07GHz
      12GB Ram

nasm 2-09.10 on linux machine

      Opensuse 11.4 32 bit 2.6.37.6-0.7-default
      Intel Pentium 4 @ 3.0Ghz
      2GB Ram

Environments giving better results:
---------------------------------
nasm-2.09.10 on windows machine

    XP 32 bit
    cygwin

gave about 6 lines of warnings, none of which looked too serious

nasm-2.09.10 on linux machine

       Redhat 7.3

gave just a few warnings, but the machine is at another location right now.

=======================

I have been digging into the various files and found this in the config.log:

 ==================
configure:2575: $? = 0
configure:2564: gcc -V >&5
gcc: '-V' option must have argument
configure:2575: $? = 1
configure:2564: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
 ==================
This is in the config.log on the Atom machine as well

I don't know what significance this is, but searching on some of these key phrases, I found my Atom environment some what peculiar, for instance I get the following responses from these commands:

which gcc
/mingw/bin/gcc.exe
which ld
/mingw/bin/ld.exe
gcc -print-prog-name=ld
C:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe

The above looks strange to me but the mounted partitions looked strange to me as well so I don't know.

I am stumped at the moment.

Thanks in advance for any insight and help.

walker








Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: nasm build problems
« Reply #3 on: November 08, 2011, 05:02:25 AM »
Try the following sequence:
Code: [Select]
make spotless
./autogen.sh
./configure
make

Offline walker

  • Jr. Member
  • *
  • Posts: 4
Re: nasm build problems
« Reply #4 on: November 08, 2011, 01:21:32 PM »
On the Intel 950 linux machine after applying the above commands,
make produces the following errors/warnings:

defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
Reading insns.dat...
Writing insnsi.h...
Done: 3729 instructions
defined(@array) is deprecated at ./pptok.pl line 167.
   (Maybe you should just omit the defined()?)
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
Reading insns.dat...
Writing insnsa.c...
Done: 3729 instructions
Reading insns.dat...
Writing insnsb.c...
Done: 3729 instructions
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
24 vectors, trying n = 32...
1: Done: n = 32, sv = [0x076259c3, 0xe291c26c]
assemble.c: In function ‘assemble’:
assemble.c:514:21: warning: case value ‘27’ not in enumerated type ‘enum prefixes’
assemble.c:521:21: warning: case value ‘49’ not in enumerated type ‘enum prefixes’
assemble.c:528:21: warning: case value ‘57’ not in enumerated type ‘enum prefixes’
assemble.c:535:21: warning: case value ‘60’ not in enumerated type ‘enum prefixes’
assemble.c:538:21: warning: case value ‘61’ not in enumerated type ‘enum prefixes’
assemble.c:548:21: warning: case value ‘110’ not in enumerated type ‘enum prefixes’
assemble.c:549:21: warning: case value ‘111’ not in enumerated type ‘enum prefixes’
assemble.c:541:21: warning: case value ‘116’ not in enumerated type ‘enum prefixes’
parser.c: In function ‘prefix_slot’:
parser.c:76:5: warning: case value ‘27’ not in enumerated type ‘enum prefixes’
parser.c:77:5: warning: case value ‘49’ not in enumerated type ‘enum prefixes’
parser.c:79:5: warning: case value ‘57’ not in enumerated type ‘enum prefixes’
parser.c:80:5: warning: case value ‘60’ not in enumerated type ‘enum prefixes’
parser.c:81:5: warning: case value ‘61’ not in enumerated type ‘enum prefixes’
parser.c:78:5: warning: case value ‘116’ not in enumerated type ‘enum prefixes’
defined(@array) is deprecated at ./pptok.pl line 167.
   (Maybe you should just omit the defined()?)
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
92 vectors, trying n = 128...
1: Graph is cyclic
2: Done: n = 128, sv = [0xaee7ac5c, 0xcabdec91]
defined(@array) is deprecated at ./pptok.pl line 167.
   (Maybe you should just omit the defined()?)
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
3 vectors, trying n = 4...
1: Done: n = 4, sv = [0x076259c3, 0xe291c26c]
defined(@array) is deprecated at perllib/phash.ph line 164.
   (Maybe you should just omit the defined()?)
1732 vectors, trying n = 2048...
1: Collision: 239,1648: cmpunordps with vpsubusb
2: Graph is cyclic
3: Collision: 565,2334: fucomp with vfmsub123ss
4: Graph is cyclic
5: Done: n = 2048, sv = [0x13f0eafb, 0x407e486a]
Reading insns.dat...
Writing insnsd.c...
Done: 3729 instructions
Reading insns.dat...
Writing insnsn.c...
Done: 3729 instructions



Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2373
  • Country: us
Re: nasm build problems
« Reply #5 on: November 09, 2011, 10:29:06 AM »
Well... a lot of what you've got there is "informational" output from Perl. I suppose the "deprecated" warning is from different versions of Perl(?). I wouldn't worry much about that - shouldn't happen after after the first build after "make spotless".

I can't imagine why gcc is complaining about those enumerations. They're in "regs.h", included in a "chain" from "nasm.h"(?).... one of those "autogenerated" files... I don't think I've ever seen that warning before.

As a general rule, it isn't wise to simply ignore warnings - they're there for a reason. But I think that's what I'd do, in this case. :)

Thanks for the great feedback!

Best,
Frank


Offline walker

  • Jr. Member
  • *
  • Posts: 4
Re: nasm build problems
« Reply #6 on: November 09, 2011, 01:08:14 PM »
Thanks for the help.

I know some warnings are important and some aren't, and in this case I didn't want to make an assumption that these aren't since nasm is a dependency for other steps to come.

It is also nice to know that there is not something obvious that I had missing from my environment.  I didn't want to waste a lot of time if there was a flaw in my setup.

I will see if I can discover the cause of the complaints and if I figure it out, will report back.

Thanks again.

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: nasm build problems
« Reply #7 on: November 09, 2011, 04:55:25 PM »
I sent to the nasm-devel list back in Feb 2011 regarding the same warnings for 2.10RC3.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 176
  • Country: 00
Re: nasm build problems
« Reply #8 on: November 10, 2011, 09:29:11 AM »
Guys, this warning: case value ‘27’ not in enumerated type ‘enum prefixes’ is pretty known. I even have a patch for this, but didn't merge it since the final result in code is not that good. So I defer it. You might ignore this warnings for a while. I'll try to find some spare time for this nit. Thanks!

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 430
  • Country: us
Re: nasm build problems
« Reply #9 on: November 10, 2011, 04:35:16 PM »
Thanks, Cyrill!  8)

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 176
  • Country: 00
Re: nasm build problems
« Reply #10 on: November 12, 2011, 07:46:08 AM »
Fix pushed upstream as 18914e63305314b36e550439b41e0bf157cf338d
(I've filed a  bug for this as well http://bugzilla.nasm.us/show_bug.cgi?id=3392198)