error building persistent-sqlite-2.13.3.1 with ghc-10.0.0.20260917: __STDC_VERSION__ does not advertise C11, C++11 or later

未关闭
#1,641 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
haskell, sqlite

调研方向

首先,使用 ghc-10.0.1-alpha1 和 gcc-16.2.1 重现针对 persistent-sqlite-2.13.3.1 报告的 cabal install 命令。阅读 Database/Sqlite/Internal.hs 和 Database/Sqlite.hs,然后检查所引用的 GHC Rts.h 和 Stg.h 头文件,以确定故障属于 persistent 还是 GHC。完成的标准是确定负责的组件,并记录一条可复现的解决路径。

由索引模型根据 Issue 内容生成。

描述

I am trying to build with ghc-10.0.1-alpha1 (recently published)

$ cabal install persistent-sqlite-2.13.3.1  -w /opt/ghc/ghc-10.0.0.20260917/bin/ghc --allow-newer --constraint hashable==1.5.0.0

...

Configuring library for persistent-sqlite-2.13.3.1...
[1 of 3] Compiling Database.Sqlite.Internal ( Database/Sqlite/Internal.hs, dist/build/Database/Sqlite/Internal.o, dist/build/Database/Sqlite/Internal.dyn_o )
[2 of 3] Compiling Database.Sqlite  ( Database/Sqlite.hs, dist/build/Database/Sqlite.o, dist/build/Database/Sqlite.dyn_o )
In file included from /opt/ghc/ghc-10.0.0.20260917/lib/ghc-10.0.0.20260917/lib/../lib/x86_64-linux-ghc-10.0.0.20260917-inplace/rts-1.0.3/include/Rts.h:38,
                 from /tmp/ghc93749_tmp_0_0/ghc_tmp_122_1.c:1:0: error:
    

/opt/ghc/ghc-10.0.0.20260917/lib/ghc-10.0.0.20260917/lib/../lib/x86_64-linux-ghc-10.0.0.20260917-inplace/rts-1.0.3/include/Stg.h:35:3: error:
     error: #error __STDC_VERSION__ does not advertise C11, C++11 or later
       35 | # error __STDC_VERSION__ does not advertise C11, C++11 or later
          |   ^~~~~
   |
35 | # error __STDC_VERSION__ does not advertise C11, C++11 or later
   |   ^

<no location info>: error:
    `cc' failed in phase `C Compiler'. (Exit code: 1)

with gcc-16.2.1 (comes with current Fedora 44)

Compilation is fine with ghc-9.14.1 and ghc-9.14.1.20260916. So perhaps it is a ghc problem.

主要语言
Haskell
星标
486
派生
307
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

yesodweb/persistent 的其他 Issue

查看 yesodweb/persistent 的全部 Issue

相似的 Issue

更多 Haskell Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。