RE: [native-client-discuss] Re: Cannot use NaCl socket API

57 views
Skip to first unread message

KIRAN KUMAR MADALAM

unread,
Apr 19, 2015, 2:34:12 PM4/19/15
to kiran, native-cli...@googlegroups.com
Hi Sam,

Did u get chance to look into the issue? Any luck?

Thanks&Regards,
Kiran

From: kiran
Sent: ‎16/‎04/‎2015 04:54 PM
To: native-cli...@googlegroups.com
Subject: Re: [native-client-discuss] Re: Cannot use NaCl socket API

HI Sam,

Thanks for the prompt response. 
 Yes im able to resolve all the link issues. Im using newlib toolchain and below is the command  im using. This will build and run the app and server also.
 Please find the attached project.

curl_test user$ NACL_SDK_ROOT=~/nacl_sdk/pepper_41 NACL_ARCH=x86_64 TOOLCHAIN=newlib make clean run    

 I have tried this on mac and linux with pepper_39,40,41 versions.
-Kiran


On Thursday, April 16, 2015 at 1:18:52 AM UTC+5:30, Sam Clegg wrote:
On Tue, Apr 14, 2015 at 9:23 PM, kiran <kiran....@gmail.com> wrote:
> Hi Sam,
>
>  This link uses curl nexe/pexe which gets generated after building curl
> through nacl port. As i mentioned in above post im looking for a working
> example which uses curl static library.

I'm pretty sure that curl links against libcurl.   In any case, I
thought it might be worth your while to confirm that the link works
for you, since then you can confirm that chrome is being run with the
correct args and the socket API is working correctly on your machine.

I'll try running your example locally and see if I can find any issues
with it.  Can you attach the Makefile and all sources please?

cheers,
sam

>
> On Wednesday, April 15, 2015 at 2:19:46 AM UTC+5:30, Sam Clegg wrote:
>>
>> The continuous builds of curl itself work for me.  e.g:
>>
>> http://commondatastorage.googleapis.com/naclports/builds/pepper_42/trunk-323-gf55648b/publish/curl/pnacl/index.html
>>
>> You need to run chrome with
>> --allow-nacl-socket-api=commondatastorage.googleapis.com
>>
>> What output do you see from the chome process?  If socket access is
>> not allowed you will see something like this: "Host XXX cannot use
>> socket API or destination is not allowed"
>>
>> cheers,
>> sam
>>
>> On Tue, Apr 14, 2015 at 5:05 AM, kiran <kiran....@gmail.com> wrote:
>> > Can someone share working Curl example (using curl.a)?
>> > It would be great help
>> >
>> >
>> > On Thursday, January 2, 2014 at 3:56:05 AM UTC+5:30, Jude Nelson wrote:
>> >>
>> >> Hello everyone,
>> >>
>> >> I'm trying to get the curl/libcurl example from naclports to work
>> >> locally,
>> >> but curl always fails with CURLE_COULDNT_RESOLVE_HOST (error 6) when
>> >> trying
>> >> to resolve www.google.com.  I have tried pepper 31 and 32 (beta), as
>> >> well as
>> >> Chrome 31 and 32 (beta).  I have passed
>> >> --enable-nacl-socket-api=localhost
>> >> to Chrome, and I have disabled the NaCl Socket API flag in about:flags
>> >> (as
>> >> per this bug).
>> >>
>> >> Regardless, I always have this error in the Chrome output:
>> >>
>> >> $ google-chrome --enable-nacl-socket-api=localhost
>> >> ...
>> >> [39,2732480256:22:10:15.273181] Native Client module will be loaded at
>> >> base address 0x00002c2700000000
>> >> [8339:8339:0101/171015:ERROR:pepper_socket_utils.cc(75)] Host localhost
>> >> cannot use socket API or destination is not allowed
>> >> [39,2884434368:22:10:15.511127] NaCl untrusted code called _exit(0x6)
>> >> [8339:8369:0101/171015:ERROR:nacl_process_host.cc(276)] NaCl process
>> >> exited with status 1536 (0x600)
>> >>
>> >> I can ping www.google.com, so it's not the fault of my /etc/hosts or
>> >> local
>> >> DNS.
>> >>
>> >> Also, the socket API example ($NACL_SDK/examples/api/socket) does not
>> >> work
>> >> for me either--nothing happens when I attempt to connect or send data
>> >> via a
>> >> TCP socket, beyond "tcp" being echoed to the log div.  In this case,
>> >> there
>> >> is no error message from Chrome at all.
>> >>
>> >> Am I missing a step in enabling the socket API?
>> >>
>> >> Thank you,
>> >> Jude
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Native-Client-Discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to native-client-di...@googlegroups.com.
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/native-client-discuss/kze3cO6LV0U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.
curl_test.zip
Reply all
Reply to author
Forward
0 new messages