Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'value,': 0.03; 'error:': 0.05; 'none,': 0.05; 'skip:" 60': 0.05; 'args)': 0.07; 'pypy': 0.07; 'skip:/ 10': 0.07; 'python': 0.09; 'spec': 0.09; 'suggest': 0.11; 'library': 0.15; '"cannot': 0.16; '122,': 0.16; '2.7.2': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'libc': 0.16; 'libc_name': 0.16; 'libraries),': 0.16; 'none"': 0.16; 'oct': 0.16; 'solaris.': 0.16; 'workaround?': 0.16; 'library,': 0.17; 'skip': 0.17; 'variables': 0.17; 'thanks,': 0.18; '>>>': 0.18; 'sender:addr:gmail.com': 0.18; '(not': 0.20; 'trying': 0.21; 'flags': 0.22; 'info.': 0.22; 'command': 0.24; 'skip:[ 10': 0.26; 'skip:" 20': 0.26; 'supported': 0.26; '(most': 0.27; 'skip:" 50': 0.27; 'skip:e 30': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'environment': 0.29; 'assert': 0.29; 'skip:/ 40': 0.29; 'value)': 0.29; 'skip:_ 10': 0.29; "i'm": 0.29; 'returned': 0.30; 'error': 0.30; '(and': 0.32; 'file': 0.32; 'solaris': 0.33; 'traceback': 0.33; 'problem': 0.33; 'anyone': 0.33; 'to:addr :python-list': 0.33; 'skip:d 20': 0.34; "can't": 0.34; 'program,': 0.34; 'received:google.com': 0.34; 'add': 0.36; 'some': 0.38; 'to:addr:python.org': 0.39; 'build': 0.39; 'skip:" 10': 0.40; 'more': 0.63; 'stuck': 0.65; 'skip:c 50': 0.66; 'subject:find': 0.84; 'validator': 0.84; 'apparent': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=8zWRfJEA+ipNrnCvDaiM9PNn3LU7OhY77IqPMI44lcE=; b=LC6U0yA+ZN4J6cYCMq2RRY1pGPd+akAm+GB2RRxGTIaRtEfwz1ujE5UmlEcKVfGaNF oSfQr8BpRYi4Uniw7cf7vqFu8WsCWwbLN02qL3cpLCLv3KcUU4MO3fPVmUIMwLyck7NN Cx+tKehJMVirlVYQH87JcPeQQF2eyEeZFuOQBUQBurS2BdWu8X9xag/q2aJMqvnjQMFB +zKjvbamxltNFCa0+MqjTgouvsOtMuhFd2aqEAgAYoyr4IIDYurTuuhuZ+/gwcBp2Pws tokrtR/n6acfDLNjp9pHKdvDxOeFDMzKjBQzO2fpYx9cmz42lfWwI/gYf0E1LYrv5uT8 ZG3w== MIME-Version: 1.0 X-Received: by 10.42.158.7 with SMTP id f7mr3287767icx.35.1359245705550; Sat, 26 Jan 2013 16:15:05 -0800 (PST) Sender: skip.montanaro@gmail.com Date: Sat, 26 Jan 2013 18:15:05 -0600 X-Google-Sender-Auth: KegqMTqHf8bIdPJVc-ojHG_wGyI Subject: Ctypes can't find libc on Solaris From: Skip Montanaro To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 94 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1359245714 news.xs4all.nl 6883 [2001:888:2000:d::a6]:44605 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37749 I'm trying to build PyPy on a Solaris 10 system (not supported by the PyPy gang). After worming around distutils' inability to use environment variables to add command line flags to gcc, I'm stuck with an error trying to locate libc: [translation:ERROR] Error: [translation:ERROR] Traceback (most recent call last): [translation:ERROR] File "translate.py", line 269, in main [translation:ERROR] default_goal='compile') [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/translator/driver.py", line 790, in from_targetspec [translation:ERROR] spec = target(driver, args) [translation:ERROR] File "targetpypystandalone.py", line 152, in target [translation:ERROR] enable_allworkingmodules(config) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/pypyoption.py", line 419, in enable_allworkingmodules [translation:ERROR] config.objspace.usemodules.suggest(**dict.fromkeys(modules, True)) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/config.py", line 118, in suggest [translation:ERROR] self.suggestoption(name, value) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/config.py", line 122, in suggestoption [translation:ERROR] self.setoption(name, value, "suggested") [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/config.py", line 113, in setoption [translation:ERROR] child.setoption(self, value, who) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/config.py", line 311, in setoption [translation:ERROR] self._validator(toplevel) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/config/pypyoption.py", line 116, in validator [translation:ERROR] __import__(name) [translation:ERROR] File "/var/tmp/pypy-pypy-07e08e9c885c/pypy/rlib/clibffi.py", line 305, in [translation:ERROR] assert libc_name is not None, "Cannot find C library, ctypes.util.find_library('c') returned None" [translation:ERROR] AssertionError: Cannot find C library, ctypes.util.find_library('c') returned None [translation] start debugger... Digging into ctypes/util.py, it became apparent that it can't find libc on Solaris. If you run ctypes/util.py as a main program, it spits out some library info. On Linux: % python Python 2.7.2 (default, Oct 16 2012, 16:54:10) [GCC 4.4.6 [TWW]] on linux3 Type "help", "copyright", "credits" or "license" for more information. >>> % python /opt/TWWfsw/python27/lib/python2.7/ctypes/util.py libm.so.6 libc.so.6 libbz2.so.1 libcrypt.so.1 On my Mac: % python ~/src/python/release27-maint/Lib/ctypes/util.py /usr/lib/libm.dylib /usr/lib/libc.dylib /usr/lib/libbz2.dylib On Solaris: % python /opt/TWWfsw/python27/lib/python2.7/ctypes/util.py None None None None If I can't locate libc (and perhaps some other libraries), I'm not going to get any further. Has anyone encountered this problem and figured out a workaround? Thanks, Skip Montanaro