question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File paths included in binaries

See original GitHub issue

The compiled binaries include strings with file paths from the build environment.

e.g. On Windows

> C:\tools\sysinternals\strings64.exe .\__helpers.obj | rg "\.h\s*$"
C:\tools\sysinternals\strings64.exe .\paths_test.build\__helpers.obj | rg "\.h"
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/dictionaries.h
C:\Users\lllama\DOCUME~1\DEVELO~1\NUITKA~1\VENV~1\lib\SITE-P~1\nuitka\build\include\nuitka/helper/raising.h

On Linux the output is different but full paths are included:

$ strings paths_test.dist/paths_test  | grep lllam
bytescloselevelrangethrowformatlocals__all____cmp____doc__compilegetattrglobalsinspect__dict____exit____file____iter____main____name____path____spec__fromlist__class____enter__bytearray__cached____import____loader____module____package__classmethod__builtins____compiled__staticmethod__metaclass___initializing__mro_entries____class_getitem__submodule_search_locations/mnt/c/Users/lllama/Documents/development/nuitka-test/.venv_linux/bin/python

The following script produces a minimal example:

import os
print(os.environ)

built with the following command: Windows

 nuitka3.exe --standalone --show-progress --show-scons .\paths_test.py

Linux:

nuitka3 --standalone --show-progress --show-scons paths_test.py

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Oct 2, 2020

This was released as part of 0.6.9 already.

0reactions
kayhayencommented, Aug 28, 2020

Python2 is equally good now, seems that bytecode only files would be treated that way, but that never really happens with standard library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does the executable binary file contain paths of included ...
I am using the wxWidgets library and compile with Visual Studio 2013 and gcc. What are these header files used for? If it...
Read more >
Binary paths - Nexthink Documentation
The Nexthink solution stores the paths from where employees execute each binary file of their applications, up to a maximum of 20 paths...
Read more >
File path formats on Windows systems | Microsoft Learn
In this article, learn about file path formats on Windows systems, such as traditional DOS paths, DOS device paths, and universal naming ...
Read more >
How to Add a Binary (or Executable, or Program) to ... - zwbetz
We'll assume you want to add a binary, named binary on macOS and Linux, and binary.exe on Windows, to your PATH. (How original,...
Read more >
What is a binary file and how does it work? - TechTarget
Binary files include a wide range of file types, including executables, libraries, graphics, databases, archives and many others.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found