-
Notifications
You must be signed in to change notification settings - Fork 511
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
Toolchain re-org - target dependencies #925
Conversation
typo? Should be |
Package
Can you print phase as a part of this log message? |
Probably just a matter of context. If talking about dependencies I'd go left to right in the sense "most pkgs depend on gcc", build order would be the reverse of that "gcc is built before most pkgs".
There aren't explicit phases at the moment, just targets. The native phase is
Only one package (libgsf shared) seems to have a problem with this - I'm looking at it. |
Unrelated |
,
So |
Native packages create files
Is it a bug or a feature? |
Yes, though that can be misleading, think of it as phase two. As I mentioned, phases don't have names yet, just target dependencies.
A feature as the native isl will only be built once instead of multiple times and clobbering the previous build when it was simply under Running:
and there is no reference to the cross targets. Running In diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 7a5df56..2ac4928 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -49,37 +49,9 @@ local BLACKLIST = {
}
local COMMON_FILES = {
- ['gcc-isl'] = {
- '^usr/include/isl/',
- '^usr/lib/libisl%.',
- '^usr/lib/pkgconfig/isl.pc$',
- },
- ['gcc-mpc'] = {
- '^usr/include/mpc.h$',
- '^usr/lib/libmpc%.',
- },
- ['gcc-gmp'] = {
- '^usr/include/gmp.h$',
- '^usr/lib/libgmp%.',
- },
- ['gcc-mpfr'] = {
- '^usr/include/mpf2mpfr.h$',
- '^usr/include/mpfr.h$',
- '^usr/lib/libmpfr%.',
- },
- ['gcc'] = {
- '^usr/lib/libcc1%.',
- },
- ['yasm'] = {
- '^usr/include/libyasm',
- '^usr/lib/libyasm.a$',
- },
['ncurses'] = {
'^usr/lib/pkgconfig/',
},
- ['pkgconf'] = {
- '^usr/bin/config.guess$',
- },
}
local ARCH_FOR_COMMON = 'i686-w64-mingw32.static' Hope that makes sense. |
Maybe I should elaborate on this. Phase one (the "native" phase) consists of seven packages:
All these packages currently also exist in phase two:
Arguably, One package that (seemingly) will exist only in phase one is (the future) It does so at the moment, but if we added This is far from ideal, but packages should configure themselves. We're not planning on delivering a
In an n-phase build, we could also build |
Changes for build-pkg required:
I tried
|
Something like Update: that won't work, the new |
8ac9114
to
1ca828f
Compare
To track cross-target dependencies ( |
Okay, now it prints |
Patches for build-pkg.lua after toolchain re-org: |
Nice work!, I added a line to keep the Debian control files: --- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -435,6 +435,8 @@ local function makeDeb(item, list_path, deps, ver)
-- make .deb file
local cmd = 'fakeroot -i deb.fakeroot dpkg-deb -b %s'
os.execute(cmd:format(dirname))
+ else
+ os.execute(('cp %s %s.deb-control'):format(control_fname, dirname))
end
-- cleanup
os.execute(('rm -fr %s deb.fakeroot'):format(dirname)) and those along with the https://gist.github.com/starius/deb0902a35bf5ef1a6b2#file-mxe-reorg-build-pkg-patch-L662
A check against the output of https://gist.github.com/starius/deb0902a35bf5ef1a6b2#file-mxe-reorg-build-pkg-patch-L684
I've been working on some cleanup and speedups for this in another branch that should be ready in the next few days. https://gist.github.com/starius/deb0902a35bf5ef1a6b2#file-mxe-reorg-build-pkg-patch-L710
not sure about this last patch, it prints a lot of lines and I'm not sure if they are supposed to be warnings. What is it trying to do? |
d3e6648
to
d28c5ab
Compare
1. Remove common packages. Common packages served a replacement for native target. Now we have native target and don't need common packages. Existing common files (ncurses) have to be fixed. 2. Package -> Item. Item means a string "target~package". All functions which used packages now use items. 3. One build list instead of 4 build lists. All items are sorted and built together without separation by target. 4. No module-global variable "target". All functions using target now get "item" and target is extracted from item. All remaining module-global variables don't change (are constants) or are created in the bottom of the module. 5. MXE_MAX_PACKAGES -> MXE_MAX_ITEMS see mxe#925 see mxe#919
I'm currently installing the cmake modules in |
Warning: New toolchain builds New patches: https://gist.github.com/starius/931118a42fb7793b8b74
You have not pushed this change. I have included it to part 2 of the patch.
I prefer changing the blacklist. Path
Done
It produces a warning when one cross-target (e.g. My build process is in progress but it has produced no such warnings. |
The patch 2 was updated (forgot to |
9e02f95
to
c94cee1
Compare
I noticed that in the last log also. I imagine it's for bootstrapping the native
Mostly because I'm testing on my fast machine (running OSX) without creating debs. I agree, they are very useful and can always be kept - I've changed the commit.
Yes, that will always work.
Fixed now with using
Thanks! I've pushed those along with some |
I've removed the phony
Is again the only recommended way. |
Logs: |
Thanks! |
ded1936
to
358a06d
Compare
I think speeding up the Makefile is an unrelated change and this pull request is ready for merging. I've built MXE twice: without this pull request and with it. |
I want to use name "item" for something else.
1. Remove common packages. Common packages served a replacement for native target. Now we have native target and don't need common packages. Existing common files (ncurses) have to be fixed. 2. Package -> Item. Item means a string "target~package". All functions which used packages now use items. 3. One build list instead of 4 build lists. All items are sorted and built together without separation by target. 4. No module-global variable "target". All functions using target now get "item" and target is extracted from item. All remaining module-global variables don't change (are constants) or are created in the bottom of the module. 5. MXE_MAX_PACKAGES -> MXE_MAX_ITEMS see mxe#925 see mxe#919
str:match(pattern) treats pattern as a regular expression. str:find(substring, 1, true) searches for a substring. The latter is needed to check if a filename contains a target.
Fix warnings like: [build-pkg] File usr/x86_64-unknown-linux-gnu/lib/libyasm.a (x86_64-unknown-linux-gnu~yasm): not recognized library
"make target~pkg" doesn't work if target is not in MXE_TARGETS. I believe such behaviout to be a feature not a bug, because it seems to work faster with lesser MXE_TARGETS.
Don't log dependencies on native target.
4eb8955
to
99ff9ca
Compare
Everything is as intended in that list, just a couple of comments:
I've removed the speedup commit and rebased, it could do with some re-factoring for readability. Having
Thanks for all your help with this! It gives us a lot of flexibility having an additional dependency mechanism and the packaging is all nicely self-contained. |
Toolchain re-org - target dependencies
Following on from #919...
This implements a fairly straightforward two-phase build where cross targets depend on the native target. Visibility is lost about
gcc
depending ongmp
et. al. (#516), but at some point in the toolchain you just have to rely on implied dependencies.The ordering dependencies like
binutils --> pkgconf
and<most pkgs> --> gcc
remain, these can't be removed until the use cases forphases
are fully understood (requires attempts at clang and glibc).Native builds are enabled by specifying:
but otherwise there's no change in normal usage or *.mk files.
There's no simple way to alter some
gcc
install directories, so it'smv
andrm
.The main impact will be on
build-pkg.lua
where an ordered build is required. I've added an initialtarget that is the most reliable way (I know) to determine what
make
thinks it needs to do. @starius, I'd recommend moving the logic fromgetPkgs
andsortForBuild
into the mainMakefile
(if not the creation of tarballs and manifests altogether).