-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues found in the new build scripts #68
Comments
Hm, i have to check, but i can't remember to have changed that. Which libraries exactly are affected?
I think i have already mentioned that: using prefix is plain wrong, because it makes it impossible to install to directories like /sbin and /etc
And that is wrong. tzinit belongs to /sbin, not /usr/sbin
Yes, exactly.
I left the (68000) binaries in the other archives, because the current build scripts expect them to find them there. Once the scripts have been adjusted, they can be removed from the archives.
Which ones do you think are missing?
Those directories are different, because they are also compiled with the host compiler. syscall for example is used to generate the tool that generates the trap*.h files, and tz is compiled twice, because we need a host tool that can generate the timezone database. Their object files therefor don't belong to the directories where the libraries are built.
The old build system had a dozen or so directories in the toplevel, when you also create -mfastcall libraries. And all of them also had Makefiles in them, with their own directory name again hardcoded, so you cannot even remove them. Now you just do rm -rf build to clean up, which is sometimes needed if you need to rename/move source files, because the .deps files still reference the old names. |
Every library -- not only libc.a but also the others, basically everything which has
Ok, that might be true but your
Which scripts do you mean? mintlib's?
Yes, that's fine but if the goal is to have |
But that is our current filesystem standard. The prefix is for example also hardcoded in paths like /usr/share/zoneinfo, /usr/share/terminfo and in various pathnames in You can still call install the libraries with something like
No, those from freemint that create the cpu/bootable builds
Yes, maybe. As already mentioned, that requires some cleanup of the checkrules which currently duplicates lots of things. But it is also easy to break things there ;) |
Hmm, I've checked the last 'official' mintlib https://web.archive.org/web/20040604211057/http://home.arcor.de/altf4/pkg/mintlib-0.56.1-1.m68kmint.tgz and it seems that you are right, it was like this before, too. On the other hand, for the past decade we have been supplying mintlib without the
But we don't package / use
I'm all for any cleanup in mintlib build scripts. The current state seems really over engineered. |
Yes, but we should, atleast in the bootable builds. Its part of the boot process after all, and normally also invoked by mint.cnf (unless you commented that out, haven't checked). |
No arguments from me here but for that you don't need tzinit in the main archives, only in the -bin ones. |
One more bug: #5 (comment) ( |
Another bug: broken backward compatibility for If others are like me, i.e. used just to type "make install PREFIX/prefix=<prefix> this will silently introduce fatal bugs, especially on a.out target (thank god for elf and coldfire, otherwise I wouldn't have noticed as well!) |
Wait a second. Not only Lines 6 to 7 in a50606d
And yet, if I do
before and after 05590c6, the former works while the latter doesn't (all libs are put into sys-root/lib without any cpu subfolders). @th-otto can you try |
Yes, works here as expected:
You can also check the snapshot archives, which have all the cpu subfolders. |
Yes, I saw the snapshots, that's why I asked for a local build, to rule out some hidden env variables on Github or something. The only thing I can think of is that the issue is that I compile it with multilib-less gcc but I don't see anything in the offending commit which would rely on it? |
Wtf? Why with multilib-less gcc? That won't work of course. Line 111 in a50606d
|
Ah right, so that explains it then. As of why: #5 (comment), I use Why was such a change needed at all? It worked fine before without asking CC for its multilib setup. |
But that's nonsense. It would use the wrong startup files/libraries.
You get what you asked for. A single directory instead of a multilib setup. The change was needed to get the fastcall versions installed in the correct place. Same would be the case if we ever re-introduce a -mshort version. |
Yes, built and copied three times to the same place. It wasn't happening before and it is now, so I hardly can call this an improvement. Compiling mintlib's multilib targets with a multilib-less compiler is a valid expectation; strange that you argue about the value of keeping mshort, sozobon and pure c ("At least mshort and Pure-C were both supported at some time in the past, and i would call it a regression that they don't work anymore") but within a blink of eye you are totally OK to fatally break backward compatibility here. |
It is an improvement. Previously, with such a gcc, you would the same library copied to three different places, which is simply wrong.
I'm not breaking anything here. The Makefiles for mintlib were always designed to compile all flavours of libraries. It's your broken build system that does not work. |
This is not true. I'd get nice three -m68000 / -m68020-60 / -mcpu=5475 builds in three different places. I'm not making things up, it I say it worked, it worked.
And? I want to do exactly that, build all three flavours and now I can't.
I would like to remind you that it was me who first brought m68k gcc / binutils on github / travis and 10 years ago, using this very "broken build system". Now you come, change mintlib without improving anything substantial, break my scripts and tell me that it's my fault. Not very considerate. |
I have forced myself to rework my build scripts so I have solved the issues with prefix/DESTDIR and multilib. So what I would like to see fixed in for this issue is:
|
I still don't see why this is a problem. For a.out, there is no point in providing a library with debug symbols, and for elf there are the libc_g.a libraries.
I thought they would be needed by the scripts in freemint, but apparently currently aren't. So they can be removed from library only archives. |
But it's not up to you, me or anyone else to decide whether and why it is important. We provide semi-official snapshots for everyone so we should make them as versatile as possible.
Sure, that's what I do in my gcc scripts as well but the proper fix is just ... not do it. |
But we have always stripped the libraries, if not in the makefile, then after installing them. |
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.
This is wrong. Build process should build stuff and the developer should decide what to do next.
install-sh
andmintlib.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 placinginclude
andlib
folders. mintlib always has been special, usingprefix
(lowercase).DESTDIR
was never publicly accessible/usable and for some reason it is now. Just for comparison:make install DESTDIR=<prefix> output:
make install prefix=<prefix> output:
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:
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: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:make
&make install
which just install the usual files without any executables (so the main archive wouldn't contain any either)make bin
&make bin-install
(or something like that) which builds the executables (perhaps instead of thetype=<target>
something more generic ascflags=-cpu_option
could be used to make it explicit what is happening)build
folder doesn't contain all generated files, not even all object filesI have already mentioned in the email my dislike of the asymmetrical nature of the generated output tree (
build/m68000
with directories likeargp/.deps
,common/.deps
, ...). But the asymmetry goes even further, despite the fact thatbuild/m68000
containssunrpc
,syscall
andtz
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.The text was updated successfully, but these errors were encountered: