Installing clang 3.4 and LLVM 3.4 on ubuntu - c

I want to install clang-3.4 , opt-3.4 and llc-3.4 on my ubuntu 16.04.
I want specific version 3.4 only.
opt-3.4: It is LLVM optimizer.
llc-3.4: It is LLVM static compiler.
Running the installation command gives me error:
$ sudo apt-get install clang-3.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package clang-3.4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
clang-5.0:i386 clang-3.9:i386 clang-3.8:i386 clang:i386 clang-5.0 clang-3.9 clang-3.8 clang clang-4.0:i386 clang-4.0 clang-3.7:i386
clang-3.6:i386 clang-3.5:i386 clang-3.7 clang-3.6 clang-3.5
E: Package 'clang-3.4' has no installation candidate
How can I install the 3.4 version of packages?
EDIT:
Answers on how to port the project to a recent version of clang is also welcome.

Related

Upgrading to Idris v 1.0 with Cabal?

Given:
$idris -v
0.99
I would like to upgrade to version 1. However, I blindly tried to upgrade by running cabal install idris to see this output:
$cabal install idris
Resolving dependencies...
All the requested packages are already installed:
idris-1.0
Use --reinstall if you want to reinstall anyway.
So, it appears that I've already installed idris version 1, but I'm not using it, per the idris -v output?
How can I use Idris v1 given my situation?
Depending on where .cabal dir is located...
add an Idris symlink to /usr/bin: a text file with the string /root/.cabal/bin/idris in it named idris. Specific path: /usr/bin/idris.
add a line to the end of your .bashrc file: export PATH="/root/.cabal/bin:$PATH"
My Linux distro is Ubuntu 16.04.2 LTS.

Error while installing CodeLite IDE in Ubuntu

While installing CodeLite IDE in Ubuntu following error occurs.
Any idea?
ERROR:
The following packages have unmet dependencies:
codelite : Depends: libjbig0 but it is not installable
Depends: liblzma5 (>= 5.1.1alpha+20120614) but 5.1.1alpha+20110809-3 is to be installed
Depends: libpango-1.0-0 (>= 1.18.0) but it is not installable
Depends: libpangocairo-1.0-0 (>= 1.14.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
I had a similar problem. You may need to check your version of Ubuntu, and that you've added the correct repositories. If this is the problem, then the fix is very simple!
Firstly, check your version of Ubuntu. From terminal you can do this with the command lsb_release -a. The important part, for our purpose, is the codename. I'm using Ubuntu 13, aka "saucy".
Now let's look at the multiverse repository that you added. From the terminal you can do this with sudo gedit /etc/apt/sources.list. Go down to the end of the file, and you should see something like:
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://repos.codelite.org/ubuntu/ saucy universe
Make sure that your version has your ubuntu codename (in my case 'saucy'). The example code on the website is for Ubuntu 14, and so I wrongly had a 'trusty' source here. Edit the line so that it is correct for your version of Ubuntu, and then save and close the file.
Lastly, you'll need to update your repos so that the change goes through. From the terminal, run sudo apt-get update. All being well, you should now be able to sudo apt-get install codelite without the errors.
My problem was caused by too much cutting-and-pasting code from the codelite website. I followed exactly the same page as you did, and their example code is for people with Ubuntu trusy (14).
You will need to be more specific on how you tried to install codelite.
The official Debian repository manages an ancient version of codelite which we (the codelite team) do not support.
In order to get the most up-to-date version (that we support) please install it from codelite's official website (select the Download at menu at the top)
Before installing, make sure you delete the folder ~/.codelite (incase you are upgrading)
Also, the official Debian installer is split into 2 pakacges codelite and codelite-plugins make sure you purge them both before installing codelite from our repository
I'm the author of Howto install the latest codelite in Ubuntu - EuroBytes. I have tested the latest codelite on Trusty.
If you still have issues with codelite, remove like so: sudo apt-get purge codelite
Note that the dependencies links are dead. But, i managed to install it anyways:
codelite 6.1 on Ubuntu Trusty Thar 14.04.
Image from: Howto install the latest codelite in Ubuntu - EuroBytes
Install like so:
sudo apt-add-repository "deb http://repos.codelite.org/ubuntu/ $(lsb_release -sc) universe"
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-get update
sudo apt-get install codelite wxcrafter
Feel free to contact me here or on my site, for any issues you may have.
Source:
Howto install the latest codelite in Ubuntu - EuroBytes

simics installation libstdc++.so.6 version not found

I downloaded a tarball of simics from the web.
I tried to run the ./simics-gui
and I get this error
/home/leungtimothy/Desktop/simics/simics-4.0.60/amd64-linux/sys/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
I looked up a lot of posts, most of them are relate to linking problem. I am not able to find a libstdc++.so.6 on my 64 bits ubuntu v13.04 .
Any ideas about how to fix this?
Thank you so much
libstdc++ is the GNU Standard C++ library, which will be required by applications built with the GNU C++ compiler.
Evidently libstdc++6 is not installed on your system. It is typically installed by installing the GNU C++ compiler:
sudo apt-get install g++
If you don't need the compiler you can install libstdc++6 independently:
sudo apt-get install libstdc++6
I believe that Simics also ships with a few system libraries, that you can find in the installed base package (directory simics-<version>), at the path <host>/sys/lib/, where libstdc++.so.6 is one of them.
Looking at the path, it looks like it is Simics 4.0 which is over 8 years olds.
I suggest download and install the latest version of Simics from a proper source,
https://downloadcenter.intel.com/download/30403/Intel-Simics-Public-Release-Preview

cabal-install "Couldn't read cabal file ..."

I just made a fresh haskell-platform install on a Linux Mint 12, via apt-get. Everytime I try to install some hackage package with cabal-install, I get a:
couldn't read caba file xxxx.cabal
where xxxx is a dependency of the package I'm installing or the package itself. Based on this thread on haskell cafe and other questions here in SO, I deleted the bytestring package from the index:
tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.0
tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.1
but the errors are still there.
My cabal-install version is:
$ cabal --version
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
The error is like this:
$ cabal install yesod
Resolving dependencies...
cabal: Couldn't read cabal file "fsnotify/0.0.5/fsnotify.cabal"
Does anyone knows what might be happening?
I'm having the same problem. There's a relevant mailing list thread about this problem at http://haskell.1045720.n5.nabble.com/Cabal-install-fails-due-to-recent-HUnit-td5715081i20.html
I believe the upshot is that the format of the packages files has changed, and the cabal version in use here (I have the same version, obtained from ubuntu oneiric) can't understand the files. You can't even do "cabal install cabal-install".
The mailing list thread just peters out in september 2012 without a clear decision being made, but I think they decided to just ignore the problem. There's not a clear statement of what to do for users like us; I think the only approach possible is to install haskell from scratch, but I don't yet know where to start with that.
EDIT: I fixed this by downloading the latest source package of cabal from http://hackage.haskell.org/packages/archive/cabal-install/1.16.0.2/cabal-install-1.16.0.2.tar.gz, unpacking it and following the instructions in its README to do a local install.
I was having the same problem and I wasn't able to follow Richard's instructions, so I realized I was running version 7.0.?, I uninstalled it using the command $ uninstall-hs, then installed the newest version (7.6.3). Problem solved here.

Question about Macports

I just got Macports installed on my mac, of which os version is Snow Leopard (10.6). I used Macports to install several packages through 'sudo port install' command, and all these packages are reported active after the installation. I just wonder that whether these packages are really working? For example, macports tells me that 'gcc44 #4.4.2_0 (active)', however in python it says '[GCC 4.0.1 (Apple Inc. build 5493)] on darwin'.
So I just want to know that if there is some problem with my method of installing or my macports needs some configuration after installation?
Any help is appreciated! I am really new in Mac OS.
I believe Python is declaring the version of gcc used to build it which should be the gcc installed on your Mac i.e. the version that came with the Mac OS Development tools. This should be located in /usr/bin/gcc.
You should find the gcc version matches when you execute
/usr/bin/gcc -v
I do not think anything is wrong with your setup or configuration. It just shows Python was compiled using the gcc provided by Apple
Macports installs software not to conflict with the versions provided by Apple. If they replaced the C compiler and libraries, really bad things might happen when Apple provided operating system updates.
gcc is the command for Apple's version of gcc, at /usr/bin and version 4.0.1 for Leopard.
gcc-mp-4.4 is the command for gcc version 4.4 as provided by MacPorts, located at /opt/local/bin.
Similarly there will be versions of python in /opt/local/bin.
Like houmam, I prefer to explicitly invoke versions by name. If you want to connect particular versions to python, I think that the MacPorts package python_select (this has now been replace by port select python) implements this by using symbolic links. I've never used it.
It probably is just that compiler that was picked by the build was that installed by XCode. You can try typing which gcc to see which one is in your path. The macports one would by default be in /opt/local somewhere.

Resources