Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation error in the docker image #9

Open
tomaslaz opened this issue Mar 14, 2019 · 3 comments
Open

compilation error in the docker image #9

tomaslaz opened this issue Mar 14, 2019 · 3 comments

Comments

@tomaslaz
Copy link

Hello,

I am trying to compile a gem5 in the docker image but it is unsuccessful. My workflow is as follows:

Getting the docker image and accessing it:

docker pull xyzsam/gem5-aladdin
docker run -it --rm --mount source=gem5-aladdin-workspace,target=/workspace xyzsam/gem5-aladdin

Updating submodules and aladdin

cd /workspace/gem5-aladdin/; git pull; git submodule update --init --recursive
cd /workspace/gem5-aladdin/src/aladdin; git pull origin master

Finally compiling gem5:

cd /workspace/gem5-aladdin/; scons build/X86/gem5.opt

First it asks about the missing hook

scons: Reading SConscript files ...

You're missing the gem5 style or commit message hook. These hooks help
to ensure that your code follows gem5's style rules on git commit.
This script will now install the hook in your .git/hooks/ directory.
Press enter to continue, or ctrl-c to abort:

Then it fails with the following message:

{standard input}: Assembler messages:
{standard input}:6254574: Warning: end of file not at end of a line; newline inserted
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
scons: *** [build/X86/arch/x86/generated/inst-constrs.o] Error 4
scons: building terminated because of errors.

Please find the log attached.
log.txt

Any help would be much appreciated,

Tomas

@tomaslaz tomaslaz changed the title compilation error in docker image compilation error in the docker image Mar 14, 2019
@tomaslaz
Copy link
Author

An update on this.

The issue occurs only when I am trying to build on OSX. If I pre-build on a Ubuntu VM and use that image on OSX - it works. I am not sure what is causing this but it would be great to know.

@xyzsam
Copy link
Member

xyzsam commented Mar 22, 2019

I have very little experience with building on OSX, unfortunately. Does this issue also happen with just plain gem5?

One thing you can try to do is to get scons to print out the command line for every command it's running to identify exactly which file the assembler is tripping up on.

@samialabed
Copy link

Tl;dr increase the CPU and RAM limit of the docker VM.

Apologise for bumping this up after two years. But I had the same issue and resolved it by increasing the CPU and RAM limits of the docker desktop. As this might still be useful to anyone not on Linux.

Longer description:
In both OSX and Windows docker runs inside a VM and not natively as it does in Linux. and because of that, there is a limit on the CPU usage, lack of memory and small swap makes it impossible to finish compiling some of the flags.
Setting RAM to 16gm and CPU to 10 cores was enough to finish compiling.

Worth updating the documentation for this and might be good idea to also provide pre-built images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants