Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to get a scientific software running but it requires older libs and I don't want to screw my current system. I thought about using an old ubuntu version in a VM. But which would I need?

The software can be obtained here

The Readme says:

The Makefile assumes you are using wxWindows 2.4.2, and that it is installed in /usr (/usr/lib/, /usr/include/wx, etc...). It may, however, be in /usr/local instead; in this case modify line 18 of the Makefile appropriately.

Also, wxWindows 2.4.2 has conflicts with very recent versions of GTK, so you are welcome to use the most recent version of wxWindows (2.6.0). However, this would also require changing the Makefile, namely lines 16-18. Also, this new version of wxWindows splits the libraries up into different parts; base, core, and gl. You would need to link to all these libraries.

If you email me at aseem@agarwala.org, I can send you a Makefile customized to 2.6.

UPDATE: My code doesn't work with 2.6. 2.4.2 doesn't compile with newer versions of g++. So, this is a problem that I haven't had time to fix. Sorry. You're only hope is to use an older g++.

share|improve this question
add comment

1 Answer

The real problem I see with the instructions you posted is that they ask for an older version of g++: installing a different library version is relatively simple, installing and running a different compiler is no small feat. In addition, the instructions do not tell what version of g++ you should be using...

If I were to do this, I would proceed as follows:

  1. As a search in the Ubuntu package archive reveals, no Ubuntu version has wxWindows 2.4.2; dapper has 2.4.4, hardy and jaunty have 2.4.5. This could be a compatible version (patchlevel numbers do not change the API) but one can only know by trying... They should have likely the correct g++ as well (since it was used to compile the Ubuntu package).

  2. Install the deboostrap program, and use it to install a copy of an older Ubuntu in a directory foo:

    sudo deboostrap jaunty foo/

  3. Download the sources and place them in some directory under foo/

  4. Use chroot to get into the older environment and compile:

    $ sudo -s
    # chroot foo/
    (foo)# cd /source/directory; make
    

Note that, while in a chroot, you can only access files under foo/ -- this has become the new root directory (just exit the shell to get back to normal).

You can also use a virtual machine instead of a chroot environment (replace steps 2., 4.); IMHO, chroots allow for more seamless usage although they can be a bit trickier to set up.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.