• Register

The group for gamers dedicated to Linux. No matter if game developers or game players all are welcome interested in Linux as a gaming platform.

Forum Thread
  Posts  
Want to make it easier to make portable Linux binaries? (Groups : Linux Gamers : Forum : Chat : Want to make it easier to make portable Linux binaries?) Locked
Thread Options
Feb 24 2012 Anchor

This is the a place holder so a hand full of us can stop hijacking this thread. The idea is to try to come up with an easy installer for a toolchain that can build binaries that can run on any reasonable recent Linux. We'll need to put together the beginnings of a plan and decide if we want to setup something more that an off-topic thread to work on it.

Feb 27 2012 Anchor

Okay! We should probably try to figure out what we might want from such a thing first, before we start diving into technical details.

Important:

  • Build portable, distro independent ELF executables and libraries that will work on reasonably old distros.
  • Identify what dependencies must be included with an ELF to create a self-contained install, able to set that up.
  • Build process should work with existing build systems.
  • Easy to use!

Would be nice:

  • Make rpm, deb, mojosetup installers, etc
  • Multiarch support (at least x86/x86-64)
  • Build profiles: Subset of available libraries and versions to use for build and packaging
  • Automatable

Well, that's a start, anyway. Anything else?

Feb 27 2012 Anchor

To start, maybe we pick a development site? I'm long winded and might clutter a thread. (Sorry.) I guess I'd prefer something with a wiki that supports nested lists (I like list & outlines) and git for code. Just a thought. I know Source Forge, works but I'm open to anything.

I like your lists. I have a similar list.

First, I'd want to clarify "Build process should work with existing build systems". I just want to make sure that doesn't mean the toolchain has to use with the build host's distribution supplied gcc, libs, etc. I'd feel safer just installing/building a complete tool chain on the build host, but I could be wrong or creating more problems that would be fixed. I would agree that the toolchain has to work with common things like autotools, cmake, etc.

Second, with "Multiarch support" do we eventually want to consider cross-compiles? I don't see it as an immediate goal. I like the idea, but it scares me too. I think we need to be able to build for different architectures in the same tree. I'd also like to not be the reason a developer gives for not supporting ppc, arm or whatever.

I think we should have a way to determine the minimum requirements for systems. (glibc 2.0+, etc). I don't think we need to give absolutes here, maybe a formula. (Based on second most recent stable release from some list of 'blessed' distros?) Of course some requirements will depend on libraries the user use and how they use them (like GSGL).

I think we need to have ready made, easy, tailorable recipes for building common libraries. Kind of like ebuilds in gentoo. I'm guessing that is something like what you mean by Build profiles?

I've started some experiments. Building Yocto triggered a few OOMs. I'm still toying with Gentoo prefix. The irc channel for prefix didn't seem to have any interest in the project. I hit a build problem emerging binutils while trying to get to the compiler. I have a script that automates the bootstrap process upto and including emerging system. I'm fond of portage and I'd like to get prefix working.

It may be too much detail too soon, but I have the following notes. Let me know if I should hold off on this stuff for now, or if anything appears to be odd or wrong. I have some reasons for most of this stuff, but that does not make it right.

  - Need to determine which Linux distro/releases to support
    - Pick glibc version from this (glibc2.0 ?)
    - Pick newest GCC/G++ that we can
    - Pick newest stdlibc++ too
    - Skip glibc2.1

  - Building toolchain
    - A libc (older)
    - Certain versions of GCC/G++ against older versions of libc
    - Linker / assember
    - Provide a wrapper to define common builds
      - 'Release'
      - 'Debug'
      - 32/64 bit
      - cross compile?
      - Allow custom options as well.

  - Support easy fwtching & building of common libraries with that tool chain
    - SDL and friends
    - image libraries
    - boost
    - openAL
    - openGL and friends
    - lua
    - mono / jvm
    - ???

  - Building installables
    - mojo file
    - rpm (distro agnostic)
    - deb (distro agnostic)
    - ???

  - Single file (program/script?) download
    - fetches and builds toolchain, recipes requested libraries, etc

  - Install everything for the application in one directory
    - default to /opt/<app> or /usr/local/<app> for rpm/deb

  - Make it easy to include one's app in the build environment

  - Single env definition of above.

* References
  - http://gbgames.com/blog/2008/04/linux-game-development-glibc_24-errors-solved/
  - http://www.mygamecompany.com/articles/index.htm
  - http://www.yoctoproject.org/
  - http://buildroot.uclibc.org/
  - http://www.gentoo.org/proj/en/gentoo-alt/prefix/
  - http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml 

Oh well. prefix just OOM'ed me. Man I hate that.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.