Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828105 - dev-db/sqlite doesn't build with clang
Summary: dev-db/sqlite doesn't build with clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Jakov Smolić
URL:
Whiteboard:
Keywords:
Depends on: 828035
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2021-12-03 19:38 UTC by 2b57
Modified: 2022-02-23 03:15 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.99 KB, text/plain)
2021-12-03 19:38 UTC, 2b57
Details
emerge -pqv (emerge.pqv,298 bytes, text/plain)
2021-12-03 19:38 UTC, 2b57
Details
build.log (file_828105.txt,34.17 KB, text/plain)
2021-12-03 19:41 UTC, 2b57
Details
build.log with CFLAGS+=-U_FORTIFY_SOURCE (file_828105.txt,34.33 KB, text/plain)
2021-12-03 20:10 UTC, 2b57
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 2b57 2021-12-03 19:38:06 UTC
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
Comment 1 2b57 2021-12-03 19:38:37 UTC
Created attachment 757347 [details]
emerge -pqv
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-03 19:41:18 UTC
No build log yet? But I bet this is bug 828035.
Comment 3 2b57 2021-12-03 19:41:27 UTC
Created attachment 757348 [details]
build.log
Comment 4 2b57 2021-12-03 20:10:59 UTC
Created attachment 757349 [details]
build.log with CFLAGS+=-U_FORTIFY_SOURCE
Comment 5 James Beddek 2021-12-03 20:22:08 UTC
If you build tcl with -D_FORTIFY_SOURCE=2 and then sqlite with the same, it should work for you.
Comment 6 Michael Egger 2021-12-03 22:07:54 UTC
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
Comment 7 Markus Peloquin 2022-01-13 23:01:46 UTC
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.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2022-01-14 01:08:45 UTC
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
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-23 03:15:21 UTC
Fixed version of Tcl is now stable.