[pypy-dev] Solaris Support?

Peter Kruse pjodrr at gmail.com
Fri Sep 2 09:02:56 CEST 2011


Hi Armin,

On Thu, Sep 1, 2011 at 6:33 PM, Armin Rigo <arigo at tunes.org> wrote:
> Ah, not-explicitly-supported platforms end up as a platform where cc
> is None.  The line above needs to be fixed to handle this case.  Done
> in f1f9f3782931; can you pull and update and try again?  Thanks!  Note
> that I'm not 100% sure that a not-explicitly-supported platform can
> work.  If it still doesn't work, you may have to edit solaris support
> to pypy/translator/platform/.

ah well, I tried but then it complains a bit later:

[platform:execute] gcc -O3 -fomit-frame-pointer -pthreads -c
platcheck_0.c -o platcheck_0.o
Traceback (most recent call last):
  File "translate.py", line 324, in <module>
    main()
  File "translate.py", line 210, in main
    targetspec_dic, translateconfig, config, args =
parse_options_and_load_target()
  File "translate.py", line 178, in parse_options_and_load_target
    targetspec_dic['handle_config'](config, translateconfig)
...
pypy.translator.platform.CompilationError: CompilationError(err="""
        In file included from /usr/include/stdio.h:22:0,
                         from platcheck_0.c:22:
        /apps/local/gcc/4.6.1/lib/gcc/sparc-sun-solaris2.10/4.6.1/include-fixed/sys/feature_tests.h:345:2:
error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001
applications    require the use of c99"
        """)

then I added --cflags="$CFLAGS -std=c99" to the call of translate.py
but it looks that this
option is ignored so I had to modify
pypy/translator/platform/distutils_platform.py
and add that option, but still no joy:

[translation:ERROR]    File
".../pypy-pypy-release-1.6/pypy/rlib/clibffi.py", line 267, in
<module>
[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

and this is because the function find_library() of python 2.7.2 does
not work under Solaris
when using /usr/ccs/bin/ld and not GNU ld ...

but even if I hack pypy/rlib/clibffi.py and set

libc_name = "/lib/libc.so"

I still get an error:

[translation:ERROR]    File
".../pypy-pypy-release-1.6/pypy/rpython/lltypesystem/ll2ctypes.py",
line 1060, in get_ctypes_callable
[translation:ERROR]     funcname, place))
[translation:ERROR]  NotImplementedError: function 'RPyThreadGetIdent'
not found in library '/tmp/usession-default-4/shared_cache/externmod'

*sigh* I give up ...

I guess Solaris is an explicitly-not-supported platform then.

Peter


More information about the pypy-dev mailing list