Issue255

Title Standalone built application looking for files in "//lib/python2.7/config/"
Priority bug Status unread
Superseder Nosy List initialed85
Assigned To Keywords

Created on 2015-10-20.04:03:15 by initialed85, last changed by initialed85.

Files
File name Uploaded Type Edit Remove
bc-livestats.zip initialed85, 2015-10-20.04:03:15 application/zip
Messages
msg1641 (view) Author: initialed85 Date: 2015-10-20.04:03:15
Hi guys,

I'm working on an app that needs to run on an older version of Ubuntu (12.04 64-bit); I'm doing my building on a VM running the same version of Ubuntu as the production 
machine.

I'm using Nuitka 0.5.14.3, as recommended for this version of Ubuntu in the downloads section of the website.

The build process goes fine using either "nuitka --standalone" or "nuitka --recurse-all --portable".

However, when I go to run the application, I see the following output (on both the build VM and the production VM):

Traceback (most recent call last):
  File "/home/jigsaw/bcapi/src/bc_livestats.dist/bc_livestats.py", line 1, in <module>
    '''
  File "/usr/lib/python2.7/site.py", line 562, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 544, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 344, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open //lib/python2.7/config/Makefile (No such file or directory)

I've tried symlinking /usr/lib/python2.7 to /lib/python2.7 and the error changes slightly to:

IOError: invalid Python installation: unable to open //local/include/python2.7/pyconfig.h (No such file or directory)

I've not bothered trying to symlink that problem away, as I understand --standalone and --portable should result in a standalone Python distro inside the executable, so 
I wouldn't think they'd be relying on anything the system has (that's why I'm going down this path, the system has a weird setup that I'm not at liberty to change).

Some more detail on the project:

- queries Rajant Breadcrumb mesh radio devices using SSL
- messages are built using Google Protocol Buffers v2
- multi-threaded, no multi-processing though

Exhaustive list of imports:

(inside each compiled protobuf definition .py file)

import sys
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2

(inside common file for the project)

import ssl
import socket
import struct
import hashlib
import traceback
import pprint
import gzip
import StringIO
import zlib
import Message_pb2  # one of the compiled protobuf definitions

(inside one of the project modules)

import fcntl
import struct
import socket
import threading
import time
import pprint
import traceback
import Sup_pb2  # one of the compiled protobuf definitions

(inside another of the project modules)

import ssl
import socket
import zlib
import struct
import hashlib
import traceback
import pprint
import Message_pb2  # one of the compiled protobuf definitions
import bc_common  # the common file for the project

I've attached the code itself; apologies, it's not pretty, and you probably won't be able to run it without some Rajant Breadcrumbs on your desk. It's not actually meant 
to go into production, I'm a networks guy, it's aimed at demonstrating how to interrogate the Breadcrumbs for the actual software guys.

I've set the priority for this ticket as "bug", but I'm quite ready to concede that I'm doing something wrong.

Thanks in advance,

Ed
History
Date User Action Args
2015-10-20 04:03:15initialed85create