Giter Site home page Giter Site logo

build error about uarch-bench HOT 4 CLOSED

edisonchan avatar edisonchan commented on August 15, 2024
build error

from uarch-bench.

Comments (4)

edisonchan avatar edisonchan commented on August 15, 2024 1

Hi,
yes, the problem is caused by the gcc-11 in ubuntu missing "cc".
The commands below can resolved it:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo ln -s /usr/bin/gcc /usr/bin/cc

from uarch-bench.

travisdowns avatar travisdowns commented on August 15, 2024

Most likely the file nasm-utils/nasm-utils-helper.c doesn't exist for, you can confirm?

It would be because you didn't initialize submodules. See this section of the doc:

https://github.com/travisdowns/uarch-bench#building

Try running git submodule udpate --init.

from uarch-bench.

nemequ avatar nemequ commented on August 15, 2024

I think it's actually because cc isn't in the path, which is definitely weird if gcc is installed. I'm not sure exactly what the mechanism for setting up cc/c++ on Ubuntu looks like, but the first thing I'd do would be to make sure the build-essential packages is installed. If that doesn't work, try update-alternatives --config cc.

Basically (at least on Debian, I don't have a convenient Ubuntu install sitting around at the moment), there should be a symlink from /usr/bin/cc to /etc/alternatives/cc, and /etc/alternatives/cc should be a symlink to /usr/bin/gcc, but this should all be managed by update-alternatives so you shouldn't create the symlinks yourself.

If cc isn't properly configured you'll probably need to go through the same process to get c++ configured as well.

from uarch-bench.

travisdowns avatar travisdowns commented on August 15, 2024

Hi Evan, thanks for the comment!

I think you are right that this error doesn't come from cc itself, but some problem launching cc. Errors from within cc look more like (in this case, if foo.c is missing):

cc: error: foo.c: No such file or directory

Oddly though, if I try to reproduce this on a system without cc in the path, I still get a different error:

make: cc: Command not found

OS and make are slightly different though: Ubuntu 20.04 and make 4.2.1.

So I'm not totally sure what's going on.

@edisonchan what does which cc report on your system?

In any case, if the problem is something with cc specifically (which is usually a symlink to gcc, more or less), but gcc is installed fine, you can just use gcc directly:

CC=gcc make

Or make it permanent:

echo CC=gcc > local.mk

local.mk is a file where you can put any local make vars customizations.

from uarch-bench.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.