Summary: | dev-db/sqlite doesn't build with clang | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | 2b57 |
Component: | Current packages | Assignee: | Jakov Smolić <jsmolic> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | base-system, dilfridge, floppym, sam, telans |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 828035 | ||
Bug Blocks: | 408963 | ||
Attachments: |
emerge --info
emerge -pqv build.log build.log with CFLAGS+=-U_FORTIFY_SOURCE |
Created attachment 757347 [details]
emerge -pqv
No build log yet? But I bet this is bug 828035. Created attachment 757348 [details]
build.log
Created attachment 757349 [details]
build.log with CFLAGS+=-U_FORTIFY_SOURCE
If you build tcl with -D_FORTIFY_SOURCE=2 and then sqlite with the same, it should work for you. I had the same issue after upgrading from clang-12 to clang-13.0.0. After downgrading to clang-12.0.1 (because of other issues, mainly firefox) it compiles fine again. Both are without -D_FORTIFY_SOURCE=2 In one place, I see 'EST' replaced with '/**' Another, 'E_HIDDEN_COL' replaced with '/**\n "COVER' Another, 'ch is allowe' replaced with '/**\n "COVER' It seems like tcl is hitting undefined behavior, maybe writing to buffers that have been freed and realloced. Makes sense that this happens after a new clang release. Rebuilding tcl with -D_FORTIFY_SOURCE=2 in my CPPFLAGS fixed it. According to Tcl upstream report (https://core.tcl-lang.org/tcl/info/206e58994f3806ec), this problem is supposedly fixed in Tcl 8.6.12. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35afbb0f209e57fdb2362550c2c0c0469503a5e8 commit 35afbb0f209e57fdb2362550c2c0c0469503a5e8 Author: Alfredo Tupone <tupone@gentoo.org> AuthorDate: 2021-12-11 21:10:37 +0000 Commit: Alfredo Tupone <tupone@gentoo.org> CommitDate: 2021-12-11 21:10:37 +0000 dev-lang/tcl: 8.6.12 bump Fixed version of Tcl is now stable. |
Created attachment 757346 [details] emerge --info While developing a clang-native system profile I've noticed that Clang cannot compile sqlite package. I guess something is wrong with the patches, because Chimera Linux (Clang-native distro) seems to use different tarball: github. com/chimera-linux/cports/blob/master/main/sqlite/template.py