Runtime Definition

I need to define a runtime for my development. The first idea is, of course, not to reinvent the wheel. I downloaded macports, used easy_install, tried fink. I've always had problems. Right now, for example, I cannot compile scipy, because the MacPorts installer wants to download and install gcc43, but it does not compile on Snow Leopard. The error for this problem is open, but I'm mostly tied to them, since my runtime can be used.

The technique I learned some time ago was to write a makefile to load and build runtime / libs with well-defined versions of libraries and utilities. This precedes the MacPorts / fink / apt approach, but you have a lot more control over it, although you need to do everything manually. Of course, this can become a nightmare on its own if the execution time increases, but if you find a problem, you can use patch and fix the problem in the downloaded package, and then create it.

I have a few questions:

  • What is your methodology for preparing a well-defined runtime / library collection for your development?
  • Does MacPorts / fink / whatever support the same flexibility on restarting if something goes wrong?
  • Given my solution for makefiles when my software is finally downloaded, what are your suggestions for solving potential problems between my development environment and the real platform on my user machines?

Change In particular, I do not understand that other projects do not give me hints. For example, I just downloaded a lean, complex library with lots of dependencies. Before starting work, developers must have all deps settings. Despite this, nothing is created in svn, creating this environment.

Change Added generosity to the question. I think this is an important question, and it deserves a bigger answer. I will consider the best answers to real-life examples with particular attention to any problems that arise and their solutions.

Additional questions to inspire the Bounty:

  • Do you perform testing in your environment (to verify the correct installation, for example, on an integration machine)?
  • How do you turn on your environment during delivery? If it is C, do you statically link it or send a dynamic library, process LD_LIBRARY_PATH before running the executable? How about the same problem for python, perl and others?
  • Do you stick to runtime or update it over time? Are you downloading the trunk packages of your dependency libraries or a fixed version?
  • How do you deal with situations like: library foo requires python 2.5, but you need to develop in python 2.4 because the library panel does not work with python 2.5?
+2
source share
2 answers

We use a CMake script that generates a Makefile that loads (mainly through SVN) / configures / builds all our dependencies. Why CMake? Multiplatform. This works very well, and we support calling scons / autopain / cmake. Since we build on several platforms (Windows, MacOSX, a bunch of Linux options), we also support different flag compilations, etc. Based on the operating system. Usually a library has a default configuration, and if we come across a system that needs a special configuration, the configuration is replaced by a special configuration. It works very well. We really did not find a ready-made solution that would meet our goal.

That being said, this is PITA for its launch and launch - there are many regulators that need to be turned on when you need to support several operating systems. I don’t think this will be a nightmare to maintain, as the dependencies are pretty fixed (libraries are regularly updated, but we rarely introduce new ones).

+1
source

virtualenv is good, but it cannot do magic - for example. if you want to use a library that just SHOULD have Python 2.4 and another that is absolutely REQUIRED 2.5 instead, you're out of luck. In addition, virtualenv (or any other tool) will not help when a new version of the OS is released, but half of the tools, etc. They still do not support it, as you mentioned for Snow Leopard: some problems simply cannot be solved (two libraries with absolutely conflicting needs within the same assembly), others just require patience (until all the tools you need are transferred to the new version of the OS, you just you need to stick to the previous version of the OS).

+1
source

All Articles