Can't run bars3d
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2017
    Location
    Belo Horizonte, Brasil
    Posts
    2

    Can't run bars3d

    Hello everyone,

    I have fedora 27 running on my PC and was am trying to run the software bars3d (https://sourceforge.net/projects/bars3d/) so I can do steel frame analysis. However, after unzipping the folder and trying the command indicated on the readme file I get the following:

    [root@new-host-2 bars3d-2.0.0]# ./comp
    cc1: error: CPU you selected does not support x86-64 instruction set

    As I am new to linux, I really can't understand what is going on. Can anyone help me?

    Thank you.

  2. #2
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    705

    Re: Can't run bars3d

    You're running on x86_64 but the comp script is trying to pass pentium2 which doesn't support 64bit. Remove the "-march= pentium2" option from the comp script and it should compile:

    Code:
    [haydn@darkstar bars3d-2.0.0]$ diff comp comp.old 
    1c1
    < gcc src/bars.c -o bars `sdl-config --cflags --libs` -lm -ldl -O3 -fomit-frame-pointer -ffast-math -funroll-loops -funsafe-math-optimizations -Wall -W
    ---
    > gcc src/bars.c -o bars `sdl-config --cflags --libs` -lm -ldl -O3 -march=pentium2 -fomit-frame-pointer -ffast-math -funroll-loops -funsafe-math-optimizations -Wall -W

  3. #3
    Join Date
    Dec 2017
    Location
    Belo Horizonte, Brasil
    Posts
    2

    Re: Can't run bars3d

    Wow!

    It worked. Thanks a lot, now i can do my work analysis on linux!
    One more thing, as I said I am new to linux. So if you can tell me some usefull texts or books so i can understand better this kind of problems and become a better user I would be greatfull.

    Best Regards

  4. #4
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    705

    Re: Can't run bars3d

    Well, in this instance the "README" file in the bars3D package said to run the commands "comp" followed by "bars". Quite often on Linux you receive packages as source code and compile them before you can run the binary, so the name comp appears to be a "comp"ile script of sorts, running "file ./comp" agrees saying it's an ascii file. So doing an "less ./comp" (or whatever your favourite editor is) shows it's a shell script trying to run a "gcc" command which is the command to compile the source. Learning gcc probably wouldn't help with similar issues in future, but figuring out how to view the script etc might.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •