faking out scons

34 views
Skip to first unread message

Mark Ito

unread,
Mar 11, 2021, 6:06:50 PM3/11/21
to GlueX Software Help Email List
Folks,

I am trying to build a recent version set on my Windows 10 laptop using
Windows Subsystem for Linux. I am using Ubuntu 20.04. I have 16 GB of
memory, but I cannot seem to compile
halld_recon/src/libraries/HDGEOMETRY/DRootGeom.cc. Hey, we have all been
here. The error is

  c++: internal compiler error: Segmentation fault signal terminated
program cc1plus

So, turns out I can compile this source file with a Singularity
container with the same version of Ubuntu on a different machine and
would like to slip that into the build on the laptop to get around the
error. But scons will not recognize the DRootGeom.o that I place into
src/.Linux_Ubuntu20.04-x86_64-gcc9.30/libraries/HDGEOMETRY. I tried putting

  env.Decider('timestamp-newer')

in the top-level SConstruct, but that did not help.

Any hints? Other possible work-arounds?

  -- Mark


Mark Ito

unread,
Mar 11, 2021, 6:13:05 PM3/11/21
to gluex-s...@googlegroups.com
I should have described what I meant by "will not recognize". scons
tries to build DRootGeom.cc even though the object file is already
there, then bombs in the way described, deleting the pre-placed object
file. So no net progress...

alexander.a...@gmail.com

unread,
Aug 26, 2022, 3:10:09 PM8/26/22
to GlueX Software Help
I ran into the problem with DRootGeom.cc on several machines now, both physical and virtual. Is there a way to tell scons that the available memory is limited to avoid these seg faults?

zihlmann

unread,
Aug 26, 2022, 5:25:49 PM8/26/22
to gluex-s...@googlegroups.com
the problem is that linux runs out of swap space during compilation and then crashes.
I found a way to increase the swap space dynamically before compilation. we are talking 30GB
or thereabouts. The compilation of DRootGeome.cc sometimes ask for many GB of memory. No clue why?
The bad part is that I can not remember how I did it. It is possible in linux to create more
swap space on the fly.

Beni
--
You received this message because you are subscribed to the Google Groups "GlueX Software Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gluex-softwar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gluex-software/4a177da9-ce3b-4b3f-90d5-52ca47ba370en%40googlegroups.com.

zihlmann

unread,
Aug 26, 2022, 6:31:13 PM8/26/22
to gluex-s...@googlegroups.com
1) on the fly swap space:
   a) sudo xfs_mkfile 20g /spare/bigswap
   b) sudo mkswap /spare/bigswap
   c) sudo swapon -a /spare/bigswap

alexander.a...@gmail.com

unread,
Aug 30, 2022, 7:24:39 PM8/30/22
to GlueX Software Help
I managed to increase the swap space inside my WSL by upgrading from version 1 to 2. The new version can be configured via the file ".wslconfig" in your windows home directory. My file looks like this:

[wsl2]
memory=16GB
swap=128GB

The result can be checked with "free -m"

Mark Ito

unread,
Aug 30, 2022, 8:27:55 PM8/30/22
to gluex-s...@googlegroups.com

That is an advance, indeed!

Reply all
Reply to author
Forward
0 new messages