Skip to content

Issue while building : KeyError: 'LOGNAME' #1

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

Open
pramodskumbhar opened this issue Aug 7, 2017 · 1 comment
Open

Issue while building : KeyError: 'LOGNAME' #1

pramodskumbhar opened this issue Aug 7, 2017 · 1 comment

Comments

@pramodskumbhar
Copy link

Hello,

I am trying to build mpiP and see below error:

==> 'make'
python /home/guest/workarena/softwares/sources/spack/var/spack/stage/mpip-3.4.1-x7l5jk256ayuuirddcxdpbpytlnis3hq/mpiP-3.4.1/make-wrappers.py --xlate --arch=x86_64 --f77symbol symbol_ mpi.protos.txt make-wrappers.py
MPI Wrapper Generator ($Revision: 498 $)
-----*----- Parsing input file
-----*----- Parsing completed:  162  functions found.
-----*----- Beginning parameter optimization
-----*----- Generating structure files
Traceback (most recent call last):
  File "/home/guest/workarena/softwares/sources/spack/var/spack/stage/mpip-3.4.1-x7l5jk256ayuuirddcxdpbpytlnis3hq/mpiP-3.4.1/make-wrappers.py", line 1425, in <module>
    main()
  File "/home/guest/workarena/softwares/sources/spack/var/spack/stage/mpip-3.4.1-x7l5jk256ayuuirddcxdpbpytlnis3hq/mpiP-3.4.1/make-wrappers.py", line 1414, in main
    GenerateStructureFile()
  File "/home/guest/workarena/softwares/sources/spack/var/spack/stage/mpip-3.4.1-x7l5jk256ayuuirddcxdpbpytlnis3hq/mpiP-3.4.1/make-wrappers.py", line 745, in GenerateStructureFile
    olist = StandardFileHeader(sname)
  File "/home/guest/workarena/softwares/sources/spack/var/spack/stage/mpip-3.4.1-x7l5jk256ayuuirddcxdpbpytlnis3hq/mpiP-3.4.1/make-wrappers.py", line 712, in StandardFileHeader
    olist.append("/* Creator: " + os.environ["LOGNAME"] + "  */\n")
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'LOGNAME'
Makefile:235: recipe for target 'mpiPi_def.h' failed
make: *** [mpiPi_def.h] Error 1
==> Error: ProcessError: Command exited with status 2:
    'make'

The LOGNAME env variable is not set on this system (actually container). Would be nice if we handle this case.

@felker
Copy link

felker commented Sep 13, 2021

I ran into this when testing the fix for #35

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

2 participants