I am using an ubuntu 10.04, with the gcc toolset version 4.4.3
My boost installation is at
/usr/local/boost_1_50_0
I am looking to build the python libraries. For this, in my installation folder i instructed
sudo ./bootstrap.sh --with-libraries=python
To which I received the following reply
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86/b2
Detecting Python version... 2.6
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in project-config.jam.6
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./b2
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- Boost.Build documentation:
http://www.boost.org/boost-build2/doc/html/index.html
aditya#aditya:/usr/local/boost_1_50_0$ g++ --version
g++ (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I then perform
sudo ./b2
I then receive a host of build errors - basically nothing builds.
I suspect this is to do with the unavailability of some of the python dev libraries.
This machine is not connected to the internet, so I'll need to build these myself (as opposed to sudo apt-get install them).
Related
I tried using this tutorial to download the newest version of g++, and I changed the version number from 4.7 to the newest (which is believe is) 8.1. But I get the following errors
Error: No available formula with the name "gcc81"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
Does anyone know how to update my g++ version? This is what I get when I try to find out my current version.
g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Sorry Im such a noob, I really trying to learn here.
I know this post is a little old but I can shine some light regarding how to accomplish this.
Firstly, to install gcc/g++ using Homebrew, you should use the following command as mentioned in the comments above: brew install gcc
After doing this, Homebrew should place the installed binaries/symlinks in the correct folders.
To correctly setup the gcc/g++ command on mac to use the version you just downloaded, I do this by not changing the symlinks gcc/g++ but instead creating aliases for both gcc and g++ within my shell environment.
alias gcc='gcc-10'
alias g++='g++-10'
gcc-10 and g++-10 were downloaded using Homebrew. When doing this, Homebrew places gcc-10 and g++-10 in /usr/local/bin (which is on the path) and it allows you to create an alias for the regular gcc/g++ commands which point to the versions installed by Homebrew.
After doing this, running the command g++ --version should give you the following:
g++-10 (Homebrew GCC 10.2.0) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You may need to restart your terminal or run source ~/.bashrc depending on the type of shell you're using.
Good morning. I have created a new phoenix 1.3 app on MacOS Sierra 10.12.6 (16G29), Erlang 19.3 and Elixir 1.4.4. I added ejabberd as a dependency ({:ejabberd, ">= v2.1.13", github: "processone/ejabberd"}) and ran mix.deps without error. I try to compile the project and it fails with the following:
==> fast_xml
Unchecked dependencies for environment prod:
* p1_utils (Hex package)
the dependency is not locked (run "mix deps.get" to generate "mix.lock" file)
* elixir_make (Hex package)
the dependency is not available, run "mix deps.get"
could not compile dependency :fast_xml, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_xml", update it with "mix deps.update fast_xml" or clean it with "mix deps.clean fast_xml"
==> sebago
** (Mix) Can't continue due to errors on dependencies
If I try to compile fast_xml from the deps directory using rebar (rebar 2.6.4 18 20170508_132308 git 2.6.4-6-g2a52f60), I initially get the error that it is missing dependencies so I do mix deps.get followed by mix compile and get the following:
==> fast_xml
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.
** (Mix) Could not compile with "make" (exit status: 2).
Depending on your OS, make sure to follow these instructions:
Mac OS X: You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.
Linux: You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".
gcc --version:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
make --version:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Does anybody have a suggestion where to start?
Thanks.
I am trying to downgrade gcc/g++ to 4.8.1. I tried two options, both with problems.
use sudo apt install gcc-4.8 g++-4.8. This option will install 4.8.5 etc. I wonder if there is any way to specify 4.8.1. sudo apt install gcc-4.8.1 g++-4.8.1 does not work as it will complain that "unable to locate package gcc-4.8.1".
Download "gcc-4.8.1" and follow the official steps ("configure, make, make install") but it fails at the make step with errors "CXXABI_1.3.8" not found.
I found another solution but I am not sure whether it is desirable (" install gcc-4.8.1 from source code on Ubuntu-16.04").
How do I downgrade gcc/g++ to 4.8.1 in Ubuntu?
Many thanks.
How do I downgrade gcc/g++ to 4.8.1 in Ubuntu?
I think you want look into the command "update-alternatives" (instead of 'downgrade').
To learn some more browse "https://askubuntu.com/questions/529687/how-to-use-update-alternatives-to-manage-multiple-installed-version-of-the-sam"
The update-alternatives works by changing what the command g++ points at. Currently on my system, g++ points to g++-6.
I have sometimes experienced an install that simply does not work. My recent g++ v6.2 install is broken, I don't know why.
But because my ubuntu is out of date, I plan to upgrade to the latest ubuntu. I might as well wait to install the latest compiler.
In the mean time I have 6.2.0, which does not 'work' (cause unknown). g++ points to this:
~$ g++ --version
g++ (GCC) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Since I seldom remove (un-install) the previous version in use, it turns out that with a simple search to identify what is available, I can access an older compiler using a suffix. For example
~$ g++-5 --version
g++-5 (Ubuntu 5.2.1-23ubuntu1~15.10) 5.2.1 20151028
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So, I continue more or less the same as before the failed 6.2.0 install.
For you, I think this means that you can use your package manager to install your desired earlier compiler, but remember to search for it in case it already exists on your system. Then use update-alternatives to make it the default, or just learn the new command name to invoke, i.e. g++-5, and continue developing with both commands easily available.
I have Git for Windows 2.10.2 and the latest version of MSYS2 installed on my Windows 7 machine. I had been using an older version of MinGW to compile c++ code. I would use notepad++ to write/edit the files and compile and run them through Git Bash using gcc console commands. I love being able to go to my file directory, right click, and select the "Git Bash Here" option to open the console and do whatever I needed.
After uninstalling MinGW, I installed MSYS2 and downloaded some of their packages using the package manager, Pacman, that comes with MSYS2. I also updated my PATH variable. I went to test everything out with Git Bash by typing the command:
gcc --version
and I've been getting this error
OWNER#Seth MINGW64 /c
$ gcc --version
2 [main] gcc (5284) C:\msys64\usr\bin\gcc.exe: *** fatal error - cygheap base mismatch detected - 0x1802FF408/0x1802FE408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
Segmentation fault
OWNER#Seth MINGW64 /c
$
I've never used Cygwin and therefore have never installed it on this computer. I've spent the last three days searching online for solutions to this. I've uninstalled and reinstalled Git and MSYS2. I put the git-bash.exe in my c:\msys64\ directory and ran the same command from there and got:
OWNER#Seth MINGW64 ~
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
OWNER#Seth MINGW64 ~
$
but that doesn't seem to me to be a very elegant solution. It does work though, I can cd to the folder containing my code and compile and run them.
Another thing I tried was to go into the registry and change where the "Git Bash Here" option looks for git-bash.exe. I changed it from:
"C:\program files\Git\git-bash.exe" "--cd=%v."
to
"C:\msys64\git-bash.exe" "--cd=%v."
and now right clicking and selecting "Git Bash Here" and running the command:
gcc --version
results in:
OWNER#Seth MINGW64 ~
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
OWNER#Seth MINGW64 ~
$
and once again I can cd to the folder with my code and compile and run them.
The problem now is that before when Git Bash would open, it would be looking in the directory where I had right clicked. But now I have to cd to where ever I'm needing to go.
Is there a better way to get MSYS2 and Git working together? Am I making this way more difficult than it should be? Or is there a better way and I'm just stumbling around in the dark?
Are there specific steps I can take to build the Xuggle Xuggler source code from Windows 32-bit, Windows 64-bit, Linux 32-bit, and Linux 64-bit? I've tried multiple times on multiple systems and keep getting lots of different errors.
Update
I spent several days trying to get Xuggle Xuggler to compile (and
cross-compile). I successfully tackled compiling both the original GPL
version of the code and an LGPL version. I thought I'd post an
answer to my own question on Stack Overflow to share my knowledge.
Update on Raspberry Pi
I was also able to build and run Xuggler on the Raspberry Pi following these same basic instructions below. I just used
my LGPL version of the code that I maintain on Github, and made modifications for the Pi. I can use the compiled JAR file and binaries on my Radxa Rock (another ARM device) too. If you're interested
in building on the Pi, you can use my pi branch:
https://github.com/e-d/xuggle-xuggler
If you are lazy and just want the precompiled .jar files for the Pi/ARM:
GPL Version (supports H.264)
LGPL Version (no H.264 support)
Here is a formatted version of my answer in a published Google Document.
For completeness (and in case the link goes dead one day), here is less-nicely-formatted text:
Building Xuggle Xuggler (GPL and LGPL Licensed Versions)
[Linux 32-bit, Linux 64-bit, Windows 32-bit, Windows 64-bit]
To build the Xuggle Xuggler library, you will need two Linux virtual machines running Ubuntu 11.10 (32-bit and 64-bit operating systems). A 32-bit version of the OS is required to build Linux 32-bit, cross compiling Windows 32-bit, and cross compiling Windows 64-bit binaries. A 64-bit version of the OS is required to build Linux 64-bit binaries.
Using VirtualBox, I created the two virtual machines discussed above with the ubuntu-11.10-server-i386.iso and ubuntu-11.10-server-amd64.iso disk images. These are headless server versions of Ubuntu. After installation of the OS, follow these steps to build Xuggler (you are welcome to try different dependency versions and not use the root user, but this is what I did to build successfully):
Change to root user:
sudo su
Just use root’s home directory:
cd /root
Update apt-get to use specific repository:
apt-get install python-software-properties
add-apt-repository ppa:ferramroberto/java
apt-get update
Install Java:
apt-get install sun-java6-jdk sun-java6-plugin
Verify the HotSpot Java 6 JVM is the default java:
java -version
If the incorrect version of Java appears, configure the default by running:
update-alternatives --config java
Install gcc, g++, make and all the other build essentials:
apt-get install build-essential
Install YASM:
apt-get install yasm
Install Open SSL:
apt-get install openssl
Install Package Config:
apt-get install pkg-config
Install Git:
apt-get install git
Install Ant:
apt-get install ant-optional
Install JUnit:
apt-get install junit
Install MingGW to be able to build for Windows (mingw-w64 can do 32 and 64-bit Windows):
apt-get install mingw-w64
Download the LGPL configured Xuggle source code (Ed’s fork of the code from Jeff Wallace’s fork from the original GPL xuggle code) or the original GPL version:
LGPL: git clone https://github.com/e-d/xuggle-xuggler.git
GPL: git clone https://github.com/xuggle/xuggle-xuggler.git
Compile and build the JAR files (with binaries inside). Be sure to run the 64-bit Linux build on the 64-bit version of Ubuntu. Also note that between builds you will need to run “ant clobber” to remove all of the compiled files from the previous architecture. To build run:
(32/64-bit Linux): ant stage
(64-bit Windows): ant -Dbuild.configure.os=x86_64-w64-mingw32 stage
(32-bit Windows): ant -Dbuild.configure.os=i686-w64-mingw32 stage
The JAR files will be in the /dist/lib directory.
If you need the Linux binaries to additionally work on CentOS, you’ll now need to change the version of GCC and G++ to use 3.4 instead of 3.6.
Install GCC 4.4:
apt-get install gcc-4.4
Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/x86_64-linux-gnu-gcc
ln -s /usr/bin/x86_64-linux-gnu-gcc-4.4 /usr/bin/x86_64-linux-gnu-gcc
Install C++ (G++) 4.4:
apt-get install c++-4.4
Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):
rm /usr/bin/cpp
ln -s /usr/bin/cpp-4.4 /usr/bin/cpp
rm /usr/bin/x86_64-linux-gnu-cpp
ln -s /usr/bin/x86_64-linux-gnu-cpp-4.4 /usr/bin/x86_64-linux-gnu-cpp
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
rm /usr/bin/x86_64-linux-gnu-g++
ln -s /usr/bin/x86_64-linux-gnu-g++-4.4 /usr/bin/x86_64-linux-gnu-g++
Verify default versions:
gcc --version
c++ --version
cpp --version
gcc --version
You can now run the builds the same way as before (you only need to re-build Linux binaries). The binaries will now be compatible with slightly older versions of many Linux distros (including CentOS compatibility). These 4.4 compiled binaries should still work everywhere the 4.6 compiled versions would run too.
Special thanks to this blog for pointing me in the right direction and giving me the majority of what I detailed above.