Skip to content

Issues found in the new build scripts #68

@mikrosk

Description

@mikrosk

To make it easier to find than buried in an email thread, this is the list of things which I have found while testing the new builds.

  • libraries are now (partially) stripped while building

This is wrong. Build process should build stuff and the developer should decide what to do next. install-sh and mintlib.spec (as well as our Github scripts) handle that on their own, exactly as they are supposed to do.

  • DESTDIR vs. prefix: why is the former useful? And even used in the build scripts now?

Traditionally, all "adopted" libraries (gemlib, cflib, etc) use PREFIX for placing include and lib folders. mintlib always has been special, using prefix (lowercase). DESTDIR was never publicly accessible/usable and for some reason it is now. Just for comparison:

make install DESTDIR=<prefix> output:

sbin/tzinit
usr/include
usr/lib
usr/sbin/tzselect, zdump, zic
usr/share

make install prefix=<prefix> output:

include
lib
sbin/tzinit, tzselect, zdump, zic
share

Why forcing the usr folder?

Or, to be precise, it doesn't solve it nicely. As far as I can see, there are explicit steps in the Github script to generate:

mintlib-0.60.1-a50-mintelf.tar.bz2
mintlib-0.60.1-a50-mint.tar.bz2 

These contain the complete mintlib build and tzinit & friends for 68000 and these archives are linked also from https://github.com/freemint/mintlib/blob/master/README.md. Then there's generated:

mintlib-0.60.1-a50-v4e.tar.bz2
mintlib-0.60.1-a50-020.tar.bz2
mintlib-0.60.1-a50-000.tar.bz2

which contain only tzinit & friends for the given architecture. I suppose the idea is to have those three archives downloadable & installable for the freemint snapshots (freemint/freemint#197) but I don't find this easy to understand. At minimum, we should provide:

  1. make & make install which just install the usual files without any executables (so the main archive wouldn't contain any either)
  2. (top-level) make bin & make bin-install (or something like that) which builds the executables (perhaps instead of the type=<target> something more generic as cflags=-cpu_option could be used to make it explicit what is happening)
  3. rename those bin packages to something like mintlib-bin-0.60.1-a50-000.tar.bz2 and link them explicitly (e.g. as -latest) in the README
  • build folder doesn't contain all generated files, not even all object files

I have already mentioned in the email my dislike of the asymmetrical nature of the generated output tree (build/m68000 with directories like argp/.deps, common/.deps, ...). But the asymmetry goes even further, despite the fact that build/m68000 contains sunrpc, syscall and tz folders, object files are still generated in the source directory for those folders what is really ironic because it is -m68000 object files which are generated there.

I am aware that this is a leftover from the previous build system (where the library stuff was generated in lib, lib020 etc but object files for executables were produced in the respective folders) however I fail to see what is the advantage of the new structure then? A lot of changes pushed just to have some files built in another subfolder?


TL; DR version of this is that there are two regressions (stripping & usage of DESTDIR), one thing which didn't really change (one could generate tzinit & friends in a hacky way even before, too) and one thing about which I'm still not convinced that it improved something over the existing solution (the build folder).

Ideally, mintlib (and others) should drop this non-standard "holy trinity" and generate just files according to supplied CFLAGS for one target, e.g. something like make PREFIX=/m68k-atari-mintelf CFLAGS='-O -m68020-60 -g' LIBDIR=m68020-60 SUFFIX=_g. That would be something worth changing for sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions