Summary: | databases/mysql80-server: build of 8.0.39 fails with assertion failure | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Martin Birgmeier <d8zNeCFG> | ||||||
Component: | Individual Port(s) | Assignee: | Jochen Neumeister <joneum> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Many People | CC: | chris, dim, freebsd-bt, joneum, rhurlin | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(joneum) |
||||||
Version: | Latest | ||||||||
Hardware: | i386 | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Martin Birgmeier
2024-07-31 17:47:45 UTC
Created attachment 252403 [details]
make log
Created attachment 252595 [details]
patch to mysql80-server-8.0.39 to fix compilation on i386
Attached is a somewhat crude patch which gets mysql80-server-8.0.39 compiling on i386.
I have not tested the resulting binary.
-- Martin
As a comment, it seems nonsensical to add alignof() results in the way this is done in mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h. What should the meaning be of an expression like "alignof(uint32_t) + alignof(char)"? It is not done with these two types in that file, but still the meaning of an addition of alignofs() is questionable. -- Martin Comment on attachment 252595 [details]
patch to mysql80-server-8.0.39 to fix compilation on i386
I think this is the best we can do for this issue. As long as metadata_size is big enough to store two uint32_t's, all the code below it should compile.
(In reply to Dimitry Andric from comment #4) One minor note, I would use "2 * sizeof(uint32_t)", since this is not about the alignment but the size of the two metadata fields (which are always uint32_t, as far as I can see). (In reply to Dimitry Andric from comment #5) This is similar to the critique I laid down in comment #3. But alignof(type) can be greater than sizeof(type), and since alignof() is used for the other parts in the comparison, it seems better to stick with it, even if it is ugly and nonsensical. Practically of course it shouldn't make a difference on i386. -- Martin Not on FreeBSD at least, where the alignment of uint32_t is also 4 bytes. I think this mess comes from the fact that on Linux alignof(max_align_t) is 16 bytes even on i386... :) is that a ‘)’ too much at the end? I will test the patch, thanks for that A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e481ca786b0daca6c4252fa065154aef0ab328bd commit e481ca786b0daca6c4252fa065154aef0ab328bd Author: Jochen Neumeister <joneum@FreeBSD.org> AuthorDate: 2024-08-31 08:11:30 +0000 Commit: Jochen Neumeister <joneum@FreeBSD.org> CommitDate: 2024-08-31 08:12:55 +0000 databases/mysql80-server: fix build for i386 --- storage/innobase/CMakeFiles/innodb_zipdecompress.dir/all --- /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql80-server/work/mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h:466:39: error: no member named 'meta_1' in 'ut::detail::Aligned_alloc_metadata<unsigned int, unsigned int>' 466 | auto offset = allocator_metadata::meta_1(data); | ~~~~~~~~~~~~~~~~~~~~^ /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql80-server/work/mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h:593:25: error: no member named 'meta_1' in 'ut::detail::Aligned_alloc_metadata<unsigned int, unsigned int>' 593 | allocator_metadata::meta_1(ret.first, ret.second); | ~~~~~~~~~~~~~~~~~~~~^ /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql80-server/work/mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h:594:25: error: no member named 'meta_2' in 'ut::detail::Aligned_alloc_metadata<unsigned int, unsigned int>' 594 | allocator_metadata::meta_2(ret.first, size); | ~~~~~~~~~~~~~~~~~~~~^ /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql80-server/work/mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h:655:32: error: no member named 'meta_2' in 'ut::detail::Aligned_alloc_metadata<unsigned int, unsigned int>' 655 | return allocator_metadata::meta_2(pfs_metadata::deduce_pfs_meta(data)); | ~~~~~~~~~~~~~~~~~~~~^ /usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/databases/mysql80-server/work/mysql-8.0.39/storage/innobase/include/detail/ut/aligned_alloc.h:668:39: error: no member named 'meta_1' in 'ut::detail::Aligned_alloc_metadata<unsigned int, unsigned int>' 668 | auto offset = allocator_metadata::meta_1(pfs_meta); | ~~~~~~~~~~~~~~~~~~~~^ PR: 280541 Sponsored by: Netzkommune GmbH ...-storage_innobase_include_details_ut_aligned_alloc.h (new) | 11 +++++++++++ 1 file changed, 11 insertions(+) |