--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.
--
I'm willing to put in some work to fix it. Any initial advice?
[I've got ambitious goals for nativeclient (
http://cananian.livejournal.com/62667.html ) so a robust ports system
is definitely in my best interest.]
--scott
If I'm adding a package to naclports, I assume I'd add the actual
upstream URL to the package script for now, but it looks like all of
the existing package have had their tarballs mirrored at
http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/ URLs
via some magic mechanism.
--scott
--scott
Hopefully I'll get some patches to you tomorrow-ish -- first to fix
ImageMagick (I'm not seeing the SDL failure on my machine; it looks
like your buildbot is missing autoconf?), and then probably I'll
tackle pango next, via:
libiconv.a
libgettextpo.a
libglib-2.0.a
libpixman-1.a (already done!)
libfreetype.a (already done!)
libcairo.a (already done!)
libxml2.a (looks like you're using tinyxml instead for fontconfig?)
libfontconfig.a (already done!)
libpango-1.0.a
Ultimately I'm probably going to shoot for integrating nacl and
gobject-introspection to do a proof-of-concept where javascript calls
into cairo/pango via g-o-i to render into a canvas.
--scott
--scott
Could you explain this further? I dug through your git repository and
I couldn't find anything relating to glibc.
--scott
Can the google folks comment as to whether the glibc toolchain is
expected to be the default in the future? Will patches to naclports
to make them work with glibc (probably removing unnecessary newlib
workarounds) be accepted?
Related question: the wiki notes that open(2) is not supported for
security reasons. Has this been reconsidered? It would make porting
much easier if open were changed to do something sandbox-safe, rather
than completely omitted from the API. For example, it could interact
with HTML5 web storage, or load HTTP resources via relative paths.
Many legacy bits of code (like fontconfig) expect to be able to
read/parse configuration files. I haven't dug into the code yet to
find out what the current "best practice" is for supporting this.
--scott
Can the google folks comment as to whether the glibc toolchain isexpected to be the default in the future?
Will patches to naclports to make them work with glibc (probably removing unnecessary newlib workarounds) be accepted?
Related question: the wiki notes that open(2) is not supported for security reasons.
Has this been reconsidered? It would make porting much easier if open were changed to do something sandbox-safe, rather
than completely omitted from the API.
For example, it could interact with HTML5 web storage, or load HTTP resources via relative paths.
Many legacy bits of code (like fontconfig) expect to be able to
read/parse configuration files. I haven't dug into the code yet to
find out what the current "best practice" is for supporting this.
OK. I understand there are licensing issues. Luckily, autoconf and
friends were designed to handle library differences like this, so it
shouldn't be too much trouble to support both. But it might be nice
if the target triple was different for the two toolchains, and/or if
naclports could more clearly distinguish between newlib patches, glibc
patches, and/or nacl patches. (Ultimately I would hope that the
changes to autoconf to support the nacl target could go upstream, and
then the various bits of naclports could also be upstreamed.)
Mark Seaborn has written about mechanisms to stub out unsupported bits of glibc:
http://plash.beasts.org/wiki/NativeClient/Changes
Is this the approach that has been taken with the Google glibc toolchain?
He also mentioned mechanisms to run nativeclient-compiled code
directly, which obviously helps cross-compilation a lot. I couldn't
tell if this has been upstreamed, or is glibc-specific. I'll be
looking at porting gobject-introspection, which unfortunately does a
lot of unkosher execution and introspection of target-compiled code,
so the ability to execute nacl binaries during the build process could
definitely push me towards one toolchain or the other.
> "Current best practice" is --wrap open. Take a look on nethack for example.
Thanks for the pointers. You might also consider creating a
'naclsupport' library in naclports which contains some good wrappers,
so that clients didn't have to keep reinventing them.
--scott
On Wed, Apr 13, 2011 at 2:14 PM, Victor Khimenko <kh...@google.com> wrote:OK. I understand there are licensing issues. Luckily, autoconf and friends were designed to handle library differences like this, so it shouldn't be too much trouble to support both.
>
> On Wed, Apr 13, 2011 at 7:32 PM, C. Scott Ananian <csc...@laptop.org> wrote:
>>
>> Can the google folks comment as to whether the glibc toolchain is
>> expected to be the default in the future?
>
> No comments. We DO want to support glibc, but we are not sure if we'll be
> ready to drop newlib any time soon.
But it might be nice if the target triple was different for the two toolchains, and/or if naclports could more clearly distinguish between newlib patches, glibc patches, and/or nacl patches.
(Ultimately I would hope that the changes to autoconf to support the nacl target could go upstream, and then the various bits of naclports could also be upstreamed.)
Mark Seaborn has written about mechanisms to stub out unsupported bits of glibc:
http://plash.beasts.org/wiki/NativeClient/Changes
Is this the approach that has been taken with the Google glibc toolchain?
He also mentioned mechanisms to run nativeclient-compiled code directly, which obviously helps cross-compilation a lot. I couldn't tell if this has been upstreamed, or is glibc-specific.
I'll be looking at porting gobject-introspection, which unfortunately does a lot of unkosher execution and introspection of target-compiled code, so the ability to execute nacl binaries during the build process could
definitely push me towards one toolchain or the other.
> "Current best practice" is --wrap open. Take a look on nethack for example.Thanks for the pointers. You might also consider creating a
'naclsupport' library in naclports which contains some good wrappers, so that clients didn't have to keep reinventing them.
Would you accept a patch to naclports which added autoconf? Rather
than bloat the patches with autoconfiscated files, it would be much
more convenient just to generate/regenerate all the autoconf stuff
with a known-good version of autoconf which supported nacl.
--scott
--scott
--- gsl-1.9/config.sub 2006-03-21 10:21:43.000000000 -0500 +++ gsl-1.9.new/config.sub 2008-12-04 20:21:54.157675000 -0500 @@ -715,6 +715,10 @@ basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=i686-pc + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1208,7 +1212,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) + | -skyos* | -haiku* | -rdos* | -nacl*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*)
Don't worry, I'll be sensitive, I won't regenerate autoconf stuff if
it's unnecessary or if the original stuff required some oddball
autoconf version. But for *some* ports, I think generating autoconf
stuff with a known-good autoconf version will lead to more concise
build scripts. I think there's a reasonable solution that doesn't
involve sticking a dozen different autoconf versions in naclports.
--scott
Some of the upstreams don't ship autoconf-generated files. For those
the naclports patches *are* huge, and are including all the generated
stuff anyway, and it's become very hard to see that the "real" patch
is just to the 3 or 4 lines which add nacl.
Don't worry, I'll be sensitive, I won't regenerate autoconf stuff if
it's unnecessary or if the original stuff required some oddball
autoconf version. But for *some* ports, I think generating autoconf
stuff with a known-good autoconf version will lead to more concise
build scripts. I think there's a reasonable solution that doesn't
involve sticking a dozen different autoconf versions in naclports.
Mark Seaborn has written about mechanisms to stub out unsupported bits of glibc:
http://plash.beasts.org/wiki/NativeClient/Changes
Is this the approach that has been taken with the Google glibc toolchain?
He also mentioned mechanisms to run nativeclient-compiled code
directly, which obviously helps cross-compilation a lot. I couldn't
tell if this has been upstreamed, or is glibc-specific.
I'll be looking at porting gobject-introspection, which unfortunately does a
lot of unkosher execution and introspection of target-compiled code,
so the ability to execute nacl binaries during the build process could
definitely push me towards one toolchain or the other.
So is the idea here to actually invoke the NaCl-generated code in the
appropriate sandbox?
sel_ldr is the sandbox, right? So you'd be invoking the sandbox and
then implementing all the callouts with "real" UNIX implementations of
the syscalls? I'm just checking to see if I'm understanding this
correctly.
--scott
On Wed, Apr 13, 2011 at 6:49 PM, Mark Seaborn <msea...@chromium.org> wrote:So is the idea here to actually invoke the NaCl-generated code in the appropriate sandbox?
> My plan for supporting build systems that run target-compiled code is to
> support more Unix interfaces (especially filesystem interfaces) under NaCl,
> along the lines of these issues:
>
> http://code.google.com/p/nativeclient/issues/detail?id=634
> http://code.google.com/p/nativeclient/issues/detail?id=1229
> http://code.google.com/p/nativeclient/issues/detail?id=1239
>
> There are some steps towards this in
> native_client/src/tools/posix_over_imc. This currently only supports
> open(), but I need at least getcwd() to support Python's build process.
sel_ldr is the sandbox, right?
So you'd be invoking the sandbox and then implementing all the callouts with "real" UNIX implementations of
the syscalls?