To load 32 bit version NaCl shared library on 64 bit Chrome browser

92 views
Skip to first unread message

Lou Gavin

unread,
Jun 11, 2016, 4:30:09 AM6/11/16
to Native-Client-Discuss
Hello all

I am using Ubuntu 14.04 x64 with 64bit Chrome browser.

I want to test a NaCl x86 shared libraries example(dlopen) in NaCl SDK.

To run this example :

cd pepper_49/examples/tutorial
make run

I found the browser is getting the 64 bit version files.
...
127.0.0.1 - - [11/Jun/2016 01:20:52] "GET /glibc/Release/lib64/libpthread.so.11835d88 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:52] "GET /glibc/Release/lib64/libdl.so.11835d88 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:52] "GET /glibc/Release/lib64/libstdc++.so.6 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:52] "GET /glibc/Release/lib64/libgcc_s.so.1 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:52] "GET /glibc/Release/lib64/libc.so.11835d88 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:54] "GET /glibc/Release/lib64/libm.so.11835d88 HTTP/1.1" 200 -
127.0.0.1 - - [11/Jun/2016 01:20:54] "GET /glibc/Release/lib64/libeightball_x86_64.so HTTP/1.1" 200 -
...


Is this possible to make the browser get and run the 32 bit version libraries?

Thanks in advance.

Ben Smith

unread,
Jun 13, 2016, 2:07:39 PM6/13/16
to Native-Client-Discuss
I think the only way to run the x86 NaCl binaries is to use run Chrome x86 (On Linux anyway, IIRC on Windows the NaCl binaries loaded match the OS arch. Hm, or maybe it was the CPU arch?)

Roland McGrath

unread,
Jun 13, 2016, 2:19:27 PM6/13/16
to native-cli...@googlegroups.com
On Linux, you'll always use the NaCl binaries that match the CPU
choice of your Chrome/Chromium binary. You can use the x86-32 install
of Chrome or Chromium on an x86-64 Linux operating system if you
install all the necessary x86-32 binary library packages it requires.

On Windows, you'll always use the NaCl binaries that match the CPU
choice of your Windows OS installation. So you need to be running
32-bit Windows to use 32-bit NaCl binaries. (The 32-bit version of
Chrome can run on either a 32-bit or a 64-bit installation of Windows,
but it can use only 64-bit NaCl binaries when running on 64-bit
Windows.)

On Mac, only x86-64 is supported by Chrome at all for a few years now.

Ben Smith

unread,
Jun 13, 2016, 2:42:09 PM6/13/16
to Native-Client-Discuss
Thanks, Roland!

Lou Gavin

unread,
Jun 14, 2016, 5:17:19 AM6/14/16
to Native-Client-Discuss
Based on Roland's response, I have my understanding as follows, and please correct me if I am wrong.
  • The download version(32-bit or 64-bit) of NaCl libraries on Windows is OS version dependent.
  • The download version(32-bit or 64-bit) of NaCl libraries on Ubuntu is Browser version dependent.

I have did some try on both OSes and I have some trouble installing the 32-bit version Chrome.

On Ubuntu x64 : 

I download and install the latest v.48 32-bit chrome and having libraries missing problem.
After I doing some web searching for the solutions, this problem remains :  
albaforia@ubuntu:~$ apt-get download unity-gtk2-module:i386
albaforia@ubuntu:~$ sudo dpkg --force-depends -i unity-gtk2-module_0.0.0+14.04.20141212-0ubuntu1_i386.deb
...
albaforia@ubuntu:~$ google-chrome
Gtk-Message: Failed to load module "unity-gtk-module"
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Aborted (core dumped)
 


On Windows x64 : 
I also tried running x86-32 install of Chrome on 64-bit Windows. And just as Roland said,
it is forced to download and run the 64-bit version NaCl libraries(or binaries) even though
I used a 32-bit browser.
On 32-bit Windows, the 32-bit browser downloads 32-bit version NaCl libraries as everybody expects.

Thanks.


Roland McGrath於 2016年6月14日星期二 UTC+8上午2時19分27秒寫道:
Reply all
Reply to author
Forward
0 new messages