updated libraries are incompatible - eclipse

OS -> ubuntu 11.10( Yes,its quite old version but unfortunately we cant upgrade it)
Updated driver -> ftdi driver from libftd2xx.so.1.1.1 to libftd2xx.so.1.1.12
IDE -> ecillpse
Issue -> failed to include update library
Error ->
/usr/bin/ld: skipping incompatible /usr/local/lib/libftd2xx.so when
searching for -lftd2xx
/usr/bin/ld: skipping incompatible
/usr/local/lib/libftd2xx.a when searching for -lftd2xx
Overview:
I have embedded system which uses ftdi chip. I have to include some new functions in my coding so for that reason I have upgraded the library . Below are the following steps I have followed
tar xfvz libftd2xx1.1.12.tar.gz
cd build/arm926
cp lib* /usr/local/lib
Copies the libraries to a central location.
chmod 0755 /usr/local/lib/libftd2xx.so.1.1.12
ln -sf /usr/local/lib/libftd2xx.so.1.1.12 /usr/local/lib/libftd2xx.so
Building the shared-object examples.
cd examples
make -B ( I followed these steps as written in their documentation but no idea why I did)
Run ldconfig
sudo ldconfig -l /usr/local/lib/libftd2xx.so.1.1.12
Run file libftd2xx.a
o/p libftd2xx.a: current ar archive
May you guys please help me or point me where I am committing mistake .
Thanks a lot

Sorry guys , I was following instructions from ftdi coument and instead of going into i386 directory , i went into arm986 .

Related

Unable to compile "hello world" program with Swift on Ubuntu 14.04

Using Ubuntu 14.04
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
and trying to compile a hello world Swift program.
print("Hello World!")
I have verified the download:
gpg --verify swift-2.2-SNAPSHOT-2015-12-10-a-ubuntu14.04.tar.gz.sig
gpg: Signature made Thu 10 Dec 2015 07:17:37 PM PST using RSA key ID 412B37AD
gpg: Good signature from "Swift Automatic Signing Key #1 <swift-infrastructure#swift.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7463 A81A 4B2E EA1B 551F FBCF D441 C977 412B 37AD
But when I try and compile the hello world program I get this error:
> swiftc hello_world.swift
<unknown>:0: error: opening import file for module 'SwiftShims': No such file or directory
If I start up the Swift REPL I get a similar error:
~$ swift
Welcome to Swift version 2.2-dev (LLVM 7bae82deaa, Clang 53d04af5ce, Swift 5995ef2acd). Type :help for assistance.
1> y = 6
opening import file for module 'SwiftShims': No such file or directory
1>
If I follow the instructions given here on using "swift build" versus "swiftc" for compiling a Hello World Swift program, I get a different error:
$ swift build
<unknown>:0: error: opening import file for module 'Swift': No such file or directory
swift-build: exit(1): ["/home/scooter/Programs/Swift/V2.2/bin/swiftc", "--driver-mode=swift", "-I", "/home/scooter/Programs/Swift/V2.2/lib/swift/pm", "-L", "/home/scooter/Programs/Swift/V2.2/lib/swift/pm", "-lPackageDescription", "/home/scooter/code/swift/helloworld-project/Package.swift"]
Executing the interpreter:
$ swift hello_world.swift
gives
<unknown>:0: error: opening import file for module 'SwiftShims': No such file or directory
strace gets an error trying to run swift:
$ strace -o /tmp/swift.log -- swift <(echo '1 + 1')
<unknown>:0: error: opening import file for module 'SwiftShims': No such file or directory
open("/home/user/Programs/Swift/V2.2/lib/swift/linux/x86_64/SwiftShims.swiftmodule",
O_RDONLY) = -1 ENOENT (No such file or directory)
Sorry for adding as an answer what should have really been a comment content-wise, but it is a little too long for a comment.
As far as I can tell, this is indeed the same problem as described in Swift on Linux: Make very first step work. I have been looking into this myself in my spare time, but no luck so far. The user who asked the other question has been pursuing it and has some interesting recent updates there.
A few things to try:
See if the swift interpreter works. Just type swift hello_world.swift and see what happens. I don't think it will work. If it does not, then run the strace command as follows:
strace -o /tmp/swift.log -- swift <(echo '1 + 1')
and look at /tmp/swift.log. See what files cannot be found, especially near the end of the output. Warning: even on a system where the error doesn't happen (I haven't been able to reproduce it yet), the strace output shows a lot of No such file... errors.
You can also try swift and swiftrc with the -v option to enable verbose output and see if you notice anything suspicious.
Update 1/2/2016:
The question referenced earlier has been updated with a possible solution to the problem: get rid of non-standard installations of gcc, g++, libgcc, and libstdc++. Please see the comments in the other question.
Update 1/3/2016:
Using the clues from the discussion on the other question, I've been able to reproduce the problem by installing gcc-5.1.0 from source and pre-pending the location of the newly-installed libstdc++.so.6 to the LD_LIBRARY_PATH variable.
The problem could be solved as follows:
1) Figure out where libstdc++.so.6 from the older package is installed. On my system:
user#ubuntu14:~$ dpkg -l | grep libstdc++
ii libstdc++-4.8-dev:amd64 4.8.4-2ubuntu1~14.04 amd64 GNU Standard C++ Library v3 (development files)
ii libstdc++6:amd64 4.8.4-2ubuntu1~14.04 amd64 GNU Standard C++ Library v3
user#ubuntu14:~$ dpkg -L libstdc++6 | grep libstdc++.so
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
2) Prepend the location of libstdc++.so.6 to $LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
3) Double-check that the swift binary is using the correct shared library:
user#ubuntu14:~$ ldd `which swift` | grep libstdc++
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdd1476b000)
Now Swift should work without the error in question.
Do you have a non standard install using a PPA or any libraries for the build chain built from source? Particularly libstdc++. Please see my answer for Swift on Linux: Make very first step work.

ERROR 1: libNCSEcw.so: cannot open shared object file: No such file or directory

I am trying to convert some ECW files to GeoTiff with Gdal command lines in Ubuntu 12.04 but ECW was not supported. I followed some instruction for installing the ecw libraries (http://lists.osgeo.org/pipermail/ubuntu/2014-May/001090.html) by downloading ECWJP2SDKSetup_5.1.1.bin and everything went smooth up to the point of testing if the extension is working with gdalinfo --formats | grep -i ecw. It looks like the installation. I get the following error message:
"ERROR 1: libNCSEcw.so: cannot open shared object file: No such file or directory"
I am using gdal v1.10.0. I should also say that when unpacking ECWJP2SDKSetup_5.1.1.bin it provided options for a free desktop-read-only licence or a paid desktop-read-write-only licence. I chose the first but maybe that has to do something with finding and accessing the library?
Anyone else had the same problem before? Your help would be very much appreciated.
Cheers,
George
The desktop-read-only option is the good one.
I had the same problem, but I found the solution with luck :
The instructions we followed are written for 32 bits architectures.
In this lign :
sudo ln -s /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only/lib/x86/release/libNCSEcw.so /usr/local/lib/libNCSEcw.so
I've just replaced the /x86/ folder by /x64/
So a 64 bits libNCSEcw.so was linked in /usr/local/lib.
Then, I've executed next commands :
sudo ldconfig
sudo apt-get install libgdal-ecw-src
sudo gdal-ecw-build /usr/local/ERDAS-ECW_JPEG_2000_SDK-5.1.1/Desktop_Read-Only
gdalinfo --formats | grep -i ecw
And voila :
ECW (rw+): ERDAS Compressed Wavelets (SDK 5.1)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.1)
I hope it can help you.
Cheers,
Vincent

Eclpse CDT gtest setup error:cannot find -lgtest

I follow this post
to setup gtest 1.7 on eclipse cdt 8.2.1.but got this errors:
....test/AllTests.bc src/Test.bc -lgmock -lgtest -lpthread -lstdc++
/usr/bin/ld: cannot find -lgmock
/usr/bin/ld: cannot find -lgtest
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Info: Parallel threads used: 3
By the way,there is some change from gtest 1.5 to 1.7,I actually make link like this:
sudo ln -s lib/.libs/libgtest.a /usr/lib/libgtest.a
As you can see,libgtest is under gtest1.7/lib/.lib(the second hidden dir) not gtest1.7/lib.
so what did I do wrong?
You appear to have attempted to make symbolic links to libgtest.a
and libgmock.a by using the commands:
sudo ln -s lib/.libs/libgtest.a /usr/lib/libgtest.a
sudo ln -s lib/.libs/libgmock.a /usr/lib/libgmock.a
from the console in /your/path/to/gtest-1.7.0 and /your/path/to/gmock-1.7.0
respectively.
If you open /usr/lib in your file manager, find the links libgtest.a
and libgmock.a and exam their properties, I believe you will find that
these links are broken, and that is why the linker cannot find them
in your project. Your ln commands give relative paths to their targets,
but absolute paths are needed.
If so, delete the broken links and recreate them with the commands:
sudo ln -s /full/path/to/gtest-1.7.0/lib/.libs/libgtest.a /usr/lib/libgtest.a
sudo ln -s /full/path/to/mock-1.7.0/lib/.libs/libgmock.a /usr/lib/libgmock.a
E.g on my system /full/path/to/ = /home/imk/develop/
Then I think your build will work.
However, creating these symbolic links in /usr/lib slightly taints your
system installation. It would be better to create them in /usr/local/lib.
Or even simpler, you can just add these static libraries to the object files
for your project linkage:
In Eclipse, navigate your project -> Properties -> C/C++ build
-> Settings -> your compiler Linker -> Libraries and delete gmock.a, gtest.a
Immediately under Libraries you find Miscellaneous. There, in
Other objects, add:
/full/path/to/libgtest.a
/full/path/to/libgmock.a
All these suggestions have worked for me.

libgfortran: version `GFORTRAN_1.4' not found

I am getting the following error when I trying to a run mex file in MATLAB:
??? Invalid MEX-file
'findimps3.mexa64':
/MATLAB/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3gf)
Any ideas how to solve this problem?
update:
I found out that "strings MATLAB/.../libgfortran.so.3 | grep GFORTRAN" output GFORTRAN_1.0. I tried to changed libgfortran inside MATLAB but it didn't work. Not I think it's better to find a suitable libblas that works with GFORTRAN_1.0.
read this link, it explains how to configure matlab on some linux systems.
here the steps that are relevant to you:
To enable running external programs, […] fortran libraries need to be properly updated and linked. Look at the output of this command:
ll "$MATLABDIR/bin/glnxa64/"
It is likely that [this link] exist:
libgfortran.so.3 -> libgfortran.so.3.0.0
Search for [this library] on your machine:
locate libgfortran.so
[…] Update Matlab's links to point to these newer versions:
sudo ln -sf [location of libgfortran.so.3.0.0] "$MATLABDIR/bin/glnxa64/libgfortran.so.3"
I (think I) fixed this problem by running matlab with LD_PRELOAD, like this
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so:/usr/lib/x86_64-linux-gnu/libgfortran.so.3 matlab
Notice freetype was another library I was having a similar problem with.
In my case the following command worked:
sudo ln -sf /usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so /usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3
Matlab was complaining it couldn't find the GFORTRAN1.4 in the following location:
/usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so
So I linked this location to the library I had :
/usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3
I found the location of this library by using the locate command as given above:) Thanks for the help:)
In my case, fixed by
$ ln -sf /usr/lib64/libgfortran.so.3.0.0 /opt/matlab/sys/os/glnxa64/libgfortran.so.3
Errors I meet when using CDSP:
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: version GFORTRAN_1.4' not found (required by /usr/lib64/atlas/libptf77blas.so.3)
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: versionGFORTRAN_1.4' not found (required by /usr/lib64/atlas/libf77blas.so.3)
I just ran into the same problem (error usr/lib64/libgfortran.so.3: version `gfortran_1.4' not found) and it was actually not hard to fix. The problem seems to be that gfortran_1.4 version of libgfortran.so.3 comes from the release gcc-4.6.2 (i.e. fortran 4.6).
What I did was downloaded gcc-4.6.2 and built, using the steps: tar -xvf gcc-4.6.2.tar.gz cd gcc-4.6.2 ./contrib/download_prerequisites cd .. mkdir objdir cd objdir $PWD/../gcc-4.6.2/configure --prefix=$HOME/gcc-4.6.2 --enable-languages=c,fortran,c++,go make make install
Then, once everything was made, I went to the directory where the new, fresh libgfortran.so.3 was sitting (in my case it was /home/testuser/objdir/x86_64-unknown-linux-gnu/32/libgfortran/.libs/)
I copied this version of libgfortran.so.3, and went to the directory where my program was expecting to find libgfortran.so.3. I replaced the old one (the old libgfortran.so.3) with the new one (the one we just copied).
The problem instantly went away. I hope this helps you too!

installing mysql-python on Centos

Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any help will be highly appreciated
[root#uu include]# easy_install mysql-python
Searching for mysql-python
Reading http://cheeseshop.python.org/pypi/mysql-python/
Couldn't find index page for 'mysql-python' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://cheeseshop.python.org/pypi/
Reading http://cheeseshop.python.org/pypi/MySQL-python/1.2.3c1
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3c1
Downloading http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d
Processing MySQL-python-1.2.3c1.tar.gz
Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-toQ0nx/MySQL-python-1.2.3c1/egg-dist-tmp-OeN5eG
unable to execute gcc: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
This will install GCC and others often required:
yum groupinstall 'Development Tools'
Can also be installed individual i.e yum install gcc
you need to install gcc (on centos, some variety of dev-tools)