I am currently using ubuntu 9.10 with the glibc version 2.11.1-0,
well i am doing a project, that i want to test with the another version of glibc that is 2.5-58, i wanted to know following things regarding this:
How to compile the version of 2.5-58, however keeping the previous version?
How to link the existing programs with the binaries of newer version of glibc?
I would be highly obliged if anybody can help me!!!
Thanks
If you want to manually compile another version of glibc, then I suggest you configuring (./configure script run) it with --prefix option to install not to /lib, /usr/lib but to /home/mehul/glibc2.5.58test/lib and /home/mehul/glibc2.5.58test/usr/lib
But compiling of glibc is not very easy thing, so another way is to get glibc 2.5-58 in compiled form from other linux and manually copy it to some subdirectory. Then you can override library search path of gcc and recompile your lib with libc from subdirectory.
Or you can use LD_LIBRARY_PATH to override library search path of compiled binary to use older glibc like this:
$ LD_LIBRARY_PATH=/home/mehul/glibc2.5.58test/lib /path/to/your/application
If you know that that version of libc is used in an older ditribution, you could install that distribution in a chroot/scratchbox/kvm/qemu/livecd or other such system for testing and building. Or there may be some other build farm type solution. Then you'll have an authentic system to test on that will not mess up your up to date one. It'll also be repeatable if you keep that system image.
If this isn't about a specific older release, why on earth would you want to test against a specific very old libc?
Related
I recently downloaded goattracker2 on Windows 10 and after making some changes to the source code, I need to recompile the program to test it.
I don't have any experience with recompiling.
I had a look at the documentation included in the readme-file:
Recompiling
To recompile for Win32, you need the MinGW development environment,
use the file src/makefile.win as makefile.
To recompile for Linux, use src/makefile.
In both cases you need the SDL development libraries in addition to
the SDL runtime, see http://www.libsdl.org.
Compile first the utilities (datafile & dat2inc) from the src/bme
directory, and place them to your path.
This leaves me with several questions, like
Which programs do I need to download
How do I run or execute the makefile
Where do I need to install the SDL libraries
If anyone has experience with recompiling goattracker, can they provide a step by step tutorial for how to do it?
Get MinGW (I recommend 32bit version) and install.
Download and unpack the SDL Libraries from https://www.libsdl.org/ (depending on your version you might need SDL 1.x)
The SDL Libraries (the *.a files) have to be added in the lib directory of MinGW installation directory (this might be different from the lib dir of MinGW, see this issue)
The header files from SDL (SDL2/ directory MinGW) have to be put where MinGW can find them (this might be different from the include dir of MinGW, see this issue)
Go to the src directory of goattracker and type make -f makefile.win
I downloaded the clang compiler directly from the prebuilt binary tar provided on the llvm website here. The tar file contains a standard directory hierarchy with bin, include, lib etc. Now I want to configure macports to use this compiler in such a way that when a subsequent port requires clang then this compiler's binary is used. Note that I do not want macports to download and install a separate copy of clang. Is it possible to do so?
DETAILS: The reason why I want to keep the clang installation in a separate place is because I often use scientific code, or other code, like chromium, and I use anaconda. I also have xcode installed and that provides its own version of compilers. Adding macports' compilers to the system makes my system almost unmanageable because it is often very difficult to ensure that the right runtime library and compilation time library are being used.
MacPorts does not support this, and there is also no unsupported way to get this done that I am aware of.
However, C++ software installed through MacPorts should always end up using the libc++ runtime (if you're on a system where it is the default). MacPorts is aware of the C++ runtime its ports use and tries to make sure all its ports use the runtime set as the cxx_stdlib in macports.conf (which defaults to your system's default).
I am trying to build Ruby from source for Windows, and there doesn't seem to be very good documentation on how I can get a local build of OpenSSL to hook up to my ruby build. Is there some way I should be copying in DLLs/EXEs/whatever in order to build a version of Ruby with the latest OpenSSL version (like 1.0.1r or something)?
So yeah, this is both a simple and hard question.
First off, I'm assuming you're using the RubyInstaller project and not compiling with MSVC. If you are using MSVC then some of this may be useful, but overall not.
Just for reference this is the code that actually configures which version to use.
The next piece of valuable information, the environment RubyInstaller uses to build Ruby is based off of rubenvb's mingw64 builds(Version 4.7.2 in this case) and cherry picked MSYS tools. The compiler is important because issues have been known to happen using libraries that aren't built by the same compiler. I don't actually know much about that area.
RubyInstaller tries to avoid this problem by providing binaries built with the DevKit with the OpenKnapsack Project. The openssl libraries are downloaded from there for RubyInstaller builds. If there is a binary you want then you can upload a working recipe to the knapsack-recipes repo and it will be built in 32 and 64-bit flavors and uploaded. I do this manually. -sad face-
So, the simple part is you can take any of those binaries you want and just drop the DLL into the Ruby bin folder and it will link and use that DLL. But the version that Ruby is compiled with is a hard-coded constant and won't change even though you have a new version of the DLL.
The hard part is that if there isn't a recipe for the version you want in the knapsack-recipes repo you have to make one and submit a pull request or find/build the version yourself. And then if you really want to have the correct version hard coded in Ruby you have to change the config in the rubyinstaller project and then build Ruby yourself using a command like:
> rake ruby21 DKVER=mingw64-32-4.7.2 #32-bit
> rake ruby21 DKVER=mingw64-64-4.7.2 #64-bit
I need to know if it is possible to compile the best and newest package in an old, ancient system. Why? Well I'm limited at my company: I need to develop an application in an old Debian 3.0 server and I would prefer to use newer software to accomplish my task. Unfortunately, I'm not allowed to upgrade nor install any package.
Specifically, I want to parse XML files comfortably using xmlstarlet to do so. This server doesn't have it installed; if I download an older version of xmlstarlet supported by the system it's too old that I just lost the functionality I need. It just has three dependencies: libc6, libxml2 and libxslt1.1 (which are installed but are too ancient for a newer version of xmlstarlet)
So the question is: is there a way I can download this package and its dependencies (I think they are few and simple) and somehow compile them to work locally (not necessarily on the system's path, just in a working directory) without affecting in any way the legacy packages of the same name?
This system doesn't has PEAR either, nor PHP5, nor xmllint and I want to avoid coding in PHP4 to parse these XMLs. I really would like to work with xmlstarlet.
The answer to How to specify non-default shared-library path in GCC Linux? Getting "error while loading shared libraries" when running looks like it should work fine.
Or you could try static linking:
./configure --enable-static-libs
I am using Ubuntu 9.10
For a particular piece of code I require GCC 3.2 but I have a higher version. Is it possible to install multiple versions and use whichever one I want to ?
Have you searched the Ubuntu package archive for gcc ?
If gcc 3.3 is ok, you could download the gcc-3.3 and related .deb packages for dapper and I suspect it will install and happily co-exist with the gcc 4.4 you get with karmic. (You'll have to be sure to invoke it as gcc-3.3.)
Otherwise you would have to:
download the relevant gcc source bundle
build it yourself with an installdir some place out of the way like /opt/gcc-3.3
make sure to set your PATH correctly when you need it.
yes, you can have multiple installations. You can invoke specific version using gcc-3.2.
you can search repository using apt-cache search gcc-3 to find a package to install using apt-get install. quick search shows only gcc-3.3 in repository, if that version does not work for you, you have to dig a bit more or install by hand. Other poster gave more details
Consider accepting previous answers to questions you have been answered, otherwise you will not get responses.
It is possible to have more than one, but they need to be named differently and installed to different folders. See tutorials for building cross-compiling GCC but do not build for different architecture. However, note that compiling GCC yourself is rather difficult, so fixing the application that you need to compile might be easier.
It is possible to install several versions of gcc on the same machine, where the default version is located here:
/usr/bin/gcc
Then your alternate versions could be located here:
/usr/local/gcc
Certainly adding packages is a simpler way to do it, but if you are interested in installing from source you can download the specific version you want from here:
https://bigsearcher.com/mirrors/gcc/releases/
Then to easily distinguish the versions you can add a suffix or prefix:
./configure --prefix=/usr/local/gcc --program-suffix=-10
So in this case your alternate executable would become gcc-10. Then simply perform make and make install as usual.
Please note that if you get an error about GMP, MPFR or MPC files being missing then install them using:
./contrib/download_prerequisites
For details please see https://gcc.gnu.org/faq.html#multiple and Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
Then you should have the new gcc program installed in /usr/local/gcc/bin instead of the default /usr/bin/gcc, so you have to add it to your PATH in your .bashrc file (this is how I did it for bash):
export PATH=$PATH/usr/local/gcc/bin
So now I can so that I have both the default gcc and the gcc-10 by doing:
$ which gcc
/usr/bin/gcc
$ which gcc-10
/usr/local/gcc/bin/gcc-10