Thread: unknown type name __m128 not enabled

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    204

    unknown type name __m128 not enabled

    Hi I am trying to compile using mingw the open source backgammon game gnu backgammon.
    I have followed all the instructions on the website but on build, I get the error:
    in file included from inputs.c
    Error "SSE instruction set not enabled"
    and then "in function baseInputs"
    8 errors of unknown type name '__m128 not enabled'

    anyone know what this means, and how i can get around it, or deal with it because I obviously didnt write this code, im just trying to learn from it.
    Thanks
    Alex

  2. #2
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    I think Google knows the answer, but as an R&D bod I'm sure you've already looked at it, tried the solution it presents and then posted here because the purported answer was lacking?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Do you have a processor with SSE instructions in your local machine?

    i386 and x86-64 Options - Using the GNU Compiler Collection (GCC)

    The "out of the box" default for gcc is likely to be pretty conservative, to allow most of the code to run on the widest range of platforms.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    204
    Yeah Ive googled it. Google tells me that SSE is a technique for processing 4 32bit integers or 2 64 bit integers in one cycle. As far as I can tell its all about efficiency. As GNU BG is written under GNU, and it was their compilation instructions I didnt think there would have been an issue.
    I didnt expect it not to compie considering the website suggests the method I used. I wanted to see how the authors had written such a clever piece of software especially as I play against GNUBG alot, and on its hardest mode can never beat it, so I wanted to see what changes it makes for different levels of hardness.

    Salem, if you specifically mean what processor do I have, I have:
    Intel Core i3 2120 3.3GHz Socket 1155 3MB L3 Cache

    so are you saying when i run the build i should add an argument to also include compilation for SSE? That makes sense i suppose...
    Ive not had to change these properties of GCC before, could you give me a hint? i have a .bat file with some make commands in, and according to the link you posted,
    -mfpmath=sse would turn on sse units, however it is set as default for "x86-64" compiler.

    So do I add that to the .bat file? and how do I know if my processor has SSE instructions?

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    http://ark.intel.com/products/53426/...he-3_30-GHz%29
    It seems you have a 64-bit processor with SSE enabled.

    > -mfpmath=sse would turn on sse units, however it is set as default for "x86-64" compiler.
    > So do I add that to the .bat file?
    Yes, something like that.

    Do you see something like
    CFLAGS=
    anywhere?
    This is the expected symbol for setting compile flags in makefiles.

    If it's a really simple batch file with just a single 'gcc' line to compile and link everything, then try putting that flag somewhere on the gcc command line.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    204
    Hi Salem, this is the .bat file:
    Code:
    @echo off
    call misc\setupvars
    
    rem set COMPOPT=-Werror -Wall -g -O2 -mms-bitfields -fno-strict-aliasing
    rem set COMPOPT=-Werror -Wall -g -O2 -mms-bitfields -ansi -pedantic -Wno-overlength-strings
    set COMPOPT=-Wall -g -O2 -mms-bitfields -fno-strict-aliasing
    
    cd %GNUSRC%
    mingw32-make -fmakefile.w32
    if ERRORLEVEL 1 goto builderr
    if NOT EXIST %GNUBIN%\gnubg.exe goto builderr
    
    cd %ORGDIR%
    "run gnubg.bat"
    
    :builderr
    echo ** Build failed **  
    pause
    I tried putting it at the end of the set line, it seemed to make no difference there and at the end of the mingw32-make line where pmath-sse was not recognised. Notice the mf is missing - that is not a typo...

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Perhaps I would try one of
    set COMPOPT=-Wall -g -O2 -mms-bitfields -fno-strict-aliasing -march=core2 -mfpmath=sse
    set COMPOPT=-Wall -g -O2 -mms-bitfields -fno-strict-aliasing -msse -mfpmath=sse
    set COMPOPT=-Wall -g -O2 -mms-bitfields -fno-strict-aliasing -march=native -mfpmath=sse
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    204
    awesome Salem. The first one worked. Thanks alot for your help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting the data type of an unknown variable
    By adarpodracir in forum C Programming
    Replies: 6
    Last Post: 04-07-2012, 07:17 PM
  2. unknown file type reading
    By xixonga in forum C Programming
    Replies: 20
    Last Post: 11-28-2010, 12:17 PM
  3. Error-size of te type is unknown
    By as_rule in forum C Programming
    Replies: 5
    Last Post: 08-29-2010, 08:28 AM
  4. unknown size for type 'void'
    By Noobwaker in forum C Programming
    Replies: 12
    Last Post: 04-05-2006, 06:41 AM
  5. Function returns pointer of unknown type..
    By Nutshell in forum C Programming
    Replies: 8
    Last Post: 02-06-2002, 08:41 PM