native client tutorial can't find libstdc++ - google-nativeclient

I'm new to native client. I'm trying to follow the official tutorial on my newly installed ubuntu 14.
I'm getting the following when running "make serve" under the getting_started folder. I googled, it seems to be related to 32/64 bit. my system is 64bit, but pnacl seems to think it is 32.
Anyway I couldn't find a solution. do you know how?
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/bin/pnacl-clang++ -o hello_tutorial.bc hello_tutorial.cc -O2 -I/media/shi/work/nacl_sdk/pepper_34/include -L/media/shi/work/nacl_sdk/pepper_34/lib/pnacl/Release -lppapi_cpp -lppapi
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/host_x86_32/bin/clang: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make[1]: * [hello_tutorial.bc] Error 127
make[1]: Leaving directory `/media/shi/work/nacl_sdk/pepper_34/getting_started/part1'
make: * [part1_ALL_TARGET] Error 2

It's probably easiest to install the i386 C/C++ libraries:
sudo apt-get install libc6:i386 libstdc++6:i386
There are 64-bit binaries included in the SDK as well (in toolchain/linux_pnacl/bin64/), but they are not run by default (and I'm not certain of an easy way to make the SDK use them).

Related

Rserve : ld: library not found for -lssl

I am getting an error while trying to install Rserve 1.8.6. I can successfully install 1.7.3 from CRAN. This is on Mac OS High Sierra.
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
The downloaded source packages are in
‘/private/var/folders/v7/hyxrfmk94p1_03gdrm27fnxncy3vq1/T/RtmpFHKNMe/downloaded_packages’
This worked for me (MacOS):
In terminal:
brew install openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
I'm running Mac OS 10.15 Catalina, I've spent 2 days trying to fix this same problem, scouring the internet for help. I finally managed it by cobbling together solutions from a few different sources.
The key thing I was missing was that Mac OS ships with its own version of openssl which it thinks is superior to anything else you can find. It is wrong. What you need to do is go and download the latest version of openssl, install that, then export THAT library to your library path variable. Here are the steps I took with openssl 1.1.1:
Get the version number for the latest version of openssl from the source (https://www.openssl.org/source/) and then manually install it directly where it's supposed to go:
cd /usr/local/src
If you're getting "No such file or directory", make it:
cd /usr/local && mkdir src && cd src
Download openssl using curl (shown) or using the link above to the source code (make sure you put the file in the directory you just made in the previous step):
curl --remote-name https://www.openssl.org/source/openssl-1.1.1f.tar.gz
Extract and cd in:
tar -xzvf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f
Compile and install (these are the 64 bit Mac OS instructions. Refer to the openssl documentation for 32 bit and other OS instructions):
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
This created a new openssl folder so when you export the library path you have to feed it the right openssl folder:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl#1.1/lib/
Hope that helps you if you haven't figured it out yet, and anyone else in the future who is ready to chuck their computer across the room, like I was.

Rails rmagick error Ubuntu c9.io

I've been looking around on other rmagick threads for a good solution. Nothing has worked so far.
I'm working on a rails project on c9 IDE. I managed to successfully install imagemagick via the 'sudo apt get install imagemagick' command.
However when I try to run 'gem install rmagick' I get the following error
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/rmagick-2.15.4/ext/RMagick
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160608-3911-1hut05d.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby 2.3.0/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/gem_make.out
Try this (working for rmagick 3.0.0):
brew install imagemagick#6
brew link --force imagemagick#6
gem install rmagick

Undefined reference to QIconvCodec during Qt embedded make?

I'm trying to configure my Qt for Embedded Linux with a virtual framebuffer according to these instructions. From the Qt for Embedded source folder, I'm trying:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
I get the following error which prevents me from doing make install:
.obj/release-shared-emb-x86/qtextcodec.o: In function `setup()':
qtextcodec.cpp:(.text+0x23cc): undefined reference to `QIconvCodec::QIconvCodec()'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.4] Error 1
make[1]: Leaving directory `/home/cstjean/qt/src/corelib'
make: *** [sub-corelib-all-ordered] Error 2
If I do:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make -no-iconv
sudo make install -no-iconv
...This works. But when I go into QtCreator, Tools > Options > Build & Run > Qt Versions, I try to select qmake for Qt Embedded (for me it's in /home/cstjean/qt/bin/qmake) and it tells me:
Qt version is not properly installed, please run make install
I've tried googling this like crazy. There are a lot of suggestions to download various libraries, which I've tried to no avail, but perhaps I'm missing something because this is a pretty fresh installation of Ubuntu I'm using.
Thanks.
I solved this problem by installing Gnome and starting over from scratch for my Qt Embedded for Linux installation.
I googled gnome for ubuntu 12.04 and found these instructions. You'll have to see which version of Ubuntu you have and search for that of course. You can see which version you have by typing into a command line:
lsb_release -a
Once I had gnome installed, I restarted my computer and signed in using Gnome.
Then I completely uninstalled and removed all traces of Qt Embedded:
cd yourQtEmbeddedDir
sudo make uninstall
cd ..
rm -r yourQtEmbeddedDir sourceFileTarYouHadDownloaded.tar.gz
I redownloaded the source file tar for Qt Embedded for Linux (from here) and proceeded to install according to these instructions after extracting the source files from the tar:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
sudo make install
Now, if you tell QtCreator about qmake from this installation, then QtCreator will no longer complain about a bad installation! Ta da!
Note: If you're attempting to the do the Virtual Framebuffer business too, then this is not the end of the road. You need to have Qt for X11 installed as well in order to compile qvfb.
Long story short: You need Gnome if you're trying to install Qt Embedded for Linux with a Virtual Framebuffer on Ubuntu!

For Ruby on Rails, how to "gem install mysql2" after upgrading from Leopard to Snow Leopard?

It always says:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
similar things happen if it is sqlite3:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Update: at least sqlite3 is building now... that is after I rvm remove 1.9.2-p180 and removing all the 1.9.2, and reinstall by rvm install 1.9.2 and now sqlite3 can be bundle installed, but mysql2 still has problem.
I installed the 64 bit version of MySQL server and it will bundle install, and then this question helped with the
Library not loaded: libmysqlclient.18.dylib (LoadError)
solution: Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

/usr/bin/ld: cannot find -lfreetype qt

Compiling on Fedora 10.
I am using qt for the first time. I started by creating a simple GUI application with all the default settings. When I tried to build the project I got the following error messages.
However, when I did a search for -lfreetype I found it in the following directory.
/usr/lib/libfreetype.so.6
/usr/lib/libfreetype.so.6.3.18
Is there anyway to resolve this issue?
Many thanks for any advice
Running build steps for project test1...
Creating gdb macros library...
Configuration unchanged, skipping QMake step.
Starting: /usr/bin/make debug -w
make: Entering directory `/home/steve/projects/qt/test1/test1'
/usr/bin/make -f Makefile.Debug
make[1]: Entering directory `/home/steve/projects/qt/test1/test1'
g++ -Wl,-rpath,/opt/qtsdk-2009.01/qt/lib -o test1 debug/main.o
debug/mainwindow.o debug/moc_mainwindow.o
-L/opt/qtsdk-2009.01/qt/lib
-lQtGui -L/opt/qtsdk-2009.01/qt/lib -L/usr/X11R6/lib
-pthread -lfreetype
-lgobject-2.0 -lSM -lICE -pthread -pthread
-lXrender -lfontconfig
-lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt
-lglib-2.0 -ldl -lpthread
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make[1]: *** [test1] Error 1
make[1]: Leaving directory `/home/steve/projects/qt/test1/test1'
make: *** [debug] Error 2
make: Leaving directory `/home/steve/projects/qt/test1/test1'
Exited with code 2.
Error while building project test1
When executing build step 'Make'
You have to install the freetype-devel package. The devel package contains the header files which in the case of freetype shoud be located at: /usr/include/freetype.
I had the same problem on Ubuntu 8.10, QT 4.5. I "fixed" it with the following bizarre hack:
After the build fails, rename the QT lib directory to something else - e.g. "mv ../../qtsdk-2009.01/qt/lib ../../qtsdk-2009.01/qt/lib2"
Run "make" again, and it will fail again.
Restore the lib directory
Run "make" again, and now it works.
I have no idea why this happens.
Install freetype1-dev libgtk2.0-dev
and it will compile ok.
On Ubuntu 9.04, installing freetype1-dev & libgtk2.0-dev solves this problem.
But to surprise everyone the hack mentioned by Ross also works, I would really like to know how and why.. M looking into the source code of QTcreator to see if i can find out the reason why. If any one already know the reason, please let me know.
Thanks..
Just installed a newly fresh ubuntu 9.04 (dell D820)- installed qt creator nothing else - same problem
use option from S R that works because it needs libgtk2.0-dev (this will also load freetype6 ) installed from package manager.
Same effect you will see if you also install qt designer from package manager (it will install all the right packages
regards
Nico
I had same problems with Elive, freetype1-dev and libgtk2.0-dev and for the /usr/bin/ld: cannot find -lSM thing xorg-dev fixed the problem.
The first thing you have to make sure is that you have libfreetype.so installed in your computer. Use the command 'locate libfreetype.so', and you may find there is a '/usr/lib/libfreetype.so.6' in the result. The compile software can't identify libfreetype.so.6 as a shared library, so, you have to make a symbolic link to the target. Use the command 'ln -s /usr/lib/libfreetype.so.6 /usr/lib/libfreetype.so', when you compile the program again, you will find the error had gone. You can also solve the errors likely. Good Luck!

Resources