Compilation Errors
Type Inference Failures
Dynamic Type Errors
If you see errors like “function mixed with non-function” or dynamic variable errors: Problem: Variables changing types during executionMixed Container Types
Problem: Collections with mixed element typesFormat String Errors
Problem: Non-constant or non-string format stringsUnsupported Python Features
Shed Skin reports errors for unsupported Python features. Common issues:Unsupported Statements
match/casestatements (Python 3.10+)try..finallyblocks (usetry..exceptinstead)- Nested functions and classes
- Multiple inheritance
Unsupported Syntax
- Argument unpacking (
*args,**kwargs) - Variable annotation syntax in some contexts
eval,getattr,hasattr,isinstance
Linker Errors
Missing Libraries
Problem: Linker cannot find required libraries (libgc, libpcre2) On Linux:Library Path Issues
Problem: Libraries installed but not found by linker Solution: Use local dependenciesPlatform-Specific Issues
Windows
nmake Not Found
Problem: CMake cannot findnmake command
Solution: Use Visual Studio Developer Command Prompt
- Open Start Menu
- Search for “Developer Command Prompt for VS”
- Run Shed Skin commands from this prompt
Path Length Limitations
Problem: Build fails due to Windows path length limits Solution: Build in a directory closer to drive rootmacOS
M1/M2 Architecture Issues
Problem: Library conflicts on Apple Silicon Solution: Ensure libraries are built for correct architectureLinux
Python Development Files Missing
Problem: Cannot build extension modules Solution: Install Python dev packageRuntime Errors
Segmentation Faults
Problem: Program crashes with segfault Common Causes:-
None/NULL pointer dereference
Solution: Check for None before use
-
Index out of bounds (when using
--nobounds) -
Garbage collection issues
If crashes occur with
--nogc, the Boehm GC may need reconfiguration.
Incorrect Results
Integer Overflow
Problem: Calculations produce unexpected results Cause: By default, Shed Skin uses 32-bit signed integers Solution: Use 64-bit integers for large valuesFloating Point Precision
Problem: Different results from CPython Cause: Fast math optimizations can affect precision Solution: Avoid-ffast-math flag for precision-critical code
Module Import Errors
Cannot Locate Module
Problem: “cannot locate module: modulename” Causes:- Module name contains invalid characters (only letters, digits, underscores)
- Module file not in search path
- Module uses unsupported features
Unsupported Standard Library Module
Problem: Import works in Python but fails in Shed Skin Solution: For extension modules, import unsupported libraries only in non-compiled code:Build System Issues
CMake Configuration Fails
Problem: CMake cannot configure project Solution: Reset build directoryParallel Build Failures
Problem: Build fails when using--jobs flag
Solution: Try building with fewer jobs or sequentially
Getting Help
If you’ve tried the solutions above and still have problems:- Check GitHub Issues: github.com/shedskin/shedskin/issues
- Report a Bug: Include:
- Minimal code example that reproduces the issue
- Shed Skin version (
shedskin --version) - Operating system and version
- Full error message and traceback
- Community Support: Join discussions on GitHub
Shed Skin is experimental software. Please report bugs to help improve it!