Octave windows binaries including classdef - windows

Are there any octave default branch binaries for windows available somewhere?
If not, is there a simple way of getting a version including classdef for Linux? simple, because usually I do not use Linux.

I don't think there are windows builds from default (aka development) available but you may ask on the help mailinglist. (Some users there build windows binaries with MXE from development sources)
If you want to build on GNU/Linux I would suggest Debian or Ubuntu in a VM. It is as easy as installing the dependencies, clone with hg, bootstrap, configure, make... You'll find instructions on the wiki http://wiki.octave.org/Octave_for_Debian_systems#Compiling_from_source
But always keep in mind that these are development sources which generally aren't suitable for productive use and may break sometime.

Here's how I ended up doing it (approximately and skipp'in all the failed attempts).
Install VirtualBox
Create new machine, mount ubuntu image, chose dynamic HDD size (or at least 10 GB)
Install Ubuntu. If strange mixed color screen appears on first boot:
[right] CTRL+F1
[right] CTRL+F7
Open Terminal (CTRL+ALT+T)
If sceen resolution cannot be made larger 640*480:
sudo apt-get install virtualbox-guest-dkms
sudo reboot
sudo apt-get install mercurial
hg clone http://www.octave.org/hg/octave -r default
sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-3.3 (takes a while)
./bootstrap
mkdir builddir
cd builddir
../configure --enable-jit --prefix=/opt/octave3.8 JAVA_HOME=/usr/lib/jvm/default-java LLVM_CONFIG=/usr/bin/llvm-config-3.2 CFLAGS="-O2 -march=native" CXXFLAGS="-O2 -march=native" (no TargetData.h found...)
make (takes half an hour or more)
make check (takes a while, gave a failed assertion)
make install
./run-octave

Related

Packages apt-get vs brew?

Im trying to get something running in a lab, and I need to install a whole bunch of packages to compile the code:
sudo apt-get install build-essential libgtk2.0-dev libwxgtk3.0-dev libwx-perl libmodule-build-perl git cpanminus libextutils-cppguess-perl libboost-all-dev libxmu-dev liblocal-lib-perl wx-common libopengl-perl libwx-glcanvas-perl libtbb-dev libxmu-dev freeglut3-dev libwxgtk-media3.0-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libcurl4-openssl-dev libextutils-makemaker-cpanfile-perl
The problem is, I'm working on a Mac; So I only have brew available - and the package names are not equivalent.
Am I trying to do something dumb and impossible, or is there a way to cross reference those apt-get packages to ones available in brew and install those so I can build the app?
For added context, its a modified "slicer" application for generating files that a 3d printer uses to make parts. I could fire up an ubuntu VM and use apt-get, but I'm on an M1 mac at the moment and recompiling experimental QEMU code just so I can fire up an ubuntu VM takes me way more out of my depth than I already am... I'm running brew on a duplicated, rosetta emulation forced terminal.
There is no straightforward way to automatically figure out whether a corresponding Homebrew package exists for each of these packages, no. But you can probably guess the majority, and manually figure out the rest. Each Debian package has a link to the upstream sources, and a home page if one exists, from which you can often find links to packages for other architectures, etc.
From the Debian package search page you can search e.g. for the libxmu-dev package, and discover the corresponding package page for Buster (the current stable Debian release), which in turn has links to the upstream repo, etc. But this is an X11 package, so it's not straightforwardly compatible with macOS, which uses an entirely different GUI architecture.

Install make 3.75 on ubuntu 15.10

I am new to ubuntu. I am looking for any help in installing GNU Make version 3.75 or other older version on ubuntu 15.10. I understand that the package for older version doesnot exist for ubuntu 15.10 and I am not able to get the instruction anywhere on how to get the packages.
Any help regarding this is appreciated.TIA
sudo apt-get build-dep make
wget http://ftp.gnu.org/gnu/make/make-3.75.tar.gz
tar xvf make-3.75.tar.gz
cd make-3.75
./configure
make
sudo make install prefix=/opt/make-3.75
# or sudo make install to install it into /usr/local
Why do you need this? As arved suggests: if your Makefiles are 20 years old and incompatible with current versions of make, and can't be fixed, you probably have bigger problems elsewhere. Whatever those Makefiles try to do may require some tweaking to work on Ubuntu 15.10.

UHD Ubuntu 12.04 ZyBo ARMv7 32bit getting libboost-all-dev

Basic info:
I need to install UHD on my ZyBo board (by Digilent and Xilinx), but cannot. I have Xillinux Ubuntu 12.04 installed on it. It has an ARMv7 architecture of 32bits.(Go to bottom for question).
The UHD software can be installed by following the instructions here:
Installation option 1:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Linux
An alternative installation process is:
Install Git and download source code:
sudo apt-get install git
git clone git://github.com/EttusResearch/uhd.git
Install all needed dependencies (see build guide):
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-cheetah doxygen python-docutils
Build-essential is a well packaged C++ library which is another needed
sudo apt-get install build-essential
Install and run cmake:
sudo apt-get install cmake
Next, to run the cmake program:
cd uhd/host
mkdir build
cd build
cmake ../
Ensure that all tests that are related to the main, necessary dependencies are successful.
Install and setup library path:
make
make test
sudo make install
cd uhd/host/build/lib
cp libuhd.so /etc/ld.so.conf.d
sudo ldconfig
sudo reboot
(I have also tried other website instructions and work-arounds).
PROBLEM / QUESTION:
However, the issue is that this software was made for i386 and amd64 machines. The ZyBo has an ARMv7 architecture. I used one installation guide which required the dependency of package: libboost-all-dev which is not available for my architecture. Therefore I was only to install half the requirements for UHD.
Does anyone know how to build the installation so that it can run on ARMv7 architecture or how to download the package libboost-all-dev onto an ARMv7 processor?
Thanks for the help
libboost-all-dev is available for arm, but accessing it requires Linux knowledge:
1.Search “Update Manager”
2.Click “Settings” on bottom left
3.Click on “Ubuntu Software” tab on upper left.
4.check/select the box “Community-maintained free and open-source Software (Universe)”
5.click “close” on bottom right

Install gcc-c++ on CentOS without yum

Can I install gcc++ on CentOS 6.x without `yum install gcc-c++ ....' ?
Is there any .tar or .rpm package available for download?
Yum will install rpm from it's repository.
So I don't understand why you want to avoid yum, it will solve dependencies and install them as well.
However, here is official RPM repository mirror (one of many):
http://centos.arminco.com/5/os/i386/CentOS/
Here is list of all mirrors : http://www.centos.org/modules/tinycontent/index.php?id=30
You will need at least 3 RPMs:
gcc-4.4.6-3.el6.i686.rpm
gcc-c++-4.4.6-3.el6.i686.rpm
libgcc-4.4.6-3.el6.i686.rpm
For compilation of C/C++ you will also need libstdc++, glibc, etc
When you run
yum install gcc
Everything is done
As you did not specified architecture I assume i386, but URL is very similar for x86_64:
http://centos.arminco.com/6/os/x86_64/Packages/
If you want to install it as a local user (or as a superuser)
GNU GSRC provides an easy way to do so
Link: http://www.gnu.org/software/gsrc/
After installation via bzr, simply do these:
./bootstrap
./configure --prefix=~/local
make -C gnu/gcc
(or make -C gnu/gcc MAKE_ARGS_PARALLEL="-jN" to speed up for a N-core system)
make -C gnu/gcc install

How to use pip install where one requirement has dependency on version on gcc-4.5

I am installing an egg packaged for pip, inside my virtualenv, under Python 2.7.2.
The egg has 16 requirements, one of which (pycryptopp 0.5.29) is known to fail with gcc-4.6 and hence must be compiled with 4.5. The system has both gcc-4.6 (default) and gcc-4.5 installed.
How do I configure/hack pip install to build this package specially? (or do I just temporarily kludge the link /usr/bin/gcc while installing this package)
Do I need to clean up the existing (virtualenv)/build directory where it broke, and if so how?
(I already read the pip documentation and searched SO + SU)
No need to fiddle around with symlinks here. On most Linux systems you can set the compiler to use with the CC env var. In case of pycryptopp and pip the following might help:
$ CC=/usr/bin/gcc-4.5 pip install pycryptopp
given that you have GCC 4.5 installed in that location. This worked fine for me on Ubuntu 11.10 (oneiric) with packages gcc-4.5 and g++-4.5 installed.
(I retitled the question from "How to use pip install where one requirement must be compiled with gcc-4.5?")
1) The correct method is to build with "--disable-embedded-cryptopp" which links to libcryptopp. Some people report runtime issue but It Works For Me.
pip install --install-option="--disable-embedded-cryptopp" pycryptopp
2.) A truly ugly workaround which I used (and which ulif helpfully points out can be obviated by using CC=.. ) is to invoke pip install specifically for the problem package, and temporarily kludge the link to gcc.
pushd /usr/bin; sudo rm gcc-4.6; ln -s gcc-4.5 gcc; popd;
pip install pycryptopp
pushd /usr/bin; sudo rm gcc-4.5; ln -s gcc-4.6 gcc; popd;
Further reasons this is bad: it requires root access and messing with the link to gcc binary. It certainly can't be Makefile'd.
Adding this for completeness to extend upon the existing good answers; if you are on apt based distribution such as Ubuntu or Debian, you can do the following:
Step 1: Install the versions of gcc/g++ you need
sudo apt install gcc-7 gcc-8 g++-7 g++-8
Step2: Install your gcc/g++ versions into "alternatives" system of your OS:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 70
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 80
Step 3: Select your active gcc/g++ versions
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
It will in each case ask you which version you want, or use the "weight" you provided to select automatically for you:
Selection path Priority Status
--------------------------------------------------------------------
* 0 /usr/bin/gcc-8 80 auto mode
1 /usr/bin/gcc-8 80 manual mode
2 /usr/bin/gcc-7 70 manual mode
Press ENTER to maintain, or type the selection number to the corresponding version.
TIP: If you want to delete a version, simply use this:
sudo update-alternatives --remove gcc /usr/bin/gcc-7
You will still use root/sudo access to do this, but it is much cleaner than dealing with manually deleting/creating links, or specifying environment variables on the commandline. It is the recommended way of selecting versions for all kinds of things in arpt based distributions.

Resources