【问题标题】:Arch Linux. AUR package mysql cannot be built with makepkg. ERROR: A failure occurred in build()拱Linux。 AUR 包 mysql 不能用 makepkg 构建。错误:构建()中发生故障
【发布时间】:2020-10-14 17:37:55
【问题描述】:

我尝试从源代码编译包 mysql。当我在PKGBUILD 所在的目录中运行makepkg -s 时,构建过程失败,我有这个输出:

[ 89%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
[ 90%] Linking CXX executable ../runtime_output_directory/mysqld

/home/natalya/Downloads/mysql/src/build/sql/sql_yacc.cc:2047: warning: type ‘yysymbol_kind_t’ violates the C++ One Definition Rule [-Wodr]
 2047 | enum yysymbol_kind_t
      | 
/home/natalya/Downloads/mysql/src/build/sql/sql_hints.yy.cc:252: note: an enum with different value name is defined in another translation unit
  252 | enum yysymbol_kind_t
      | 
/home/natalya/Downloads/mysql/src/mysql-8.0.20/sql/parser_yystype.h:239:7: warning: type ‘union YYSTYPE’ violates the C++ One Definition Rule [-Wodr]
  239 | union YYSTYPE {
      |       ^
/home/natalya/Downloads/mysql/src/mysql-8.0.20/storage/innobase/include/fts0pars.h:50: note: a different type is defined in another translation unit
   50 | typedef union YYSTYPE
      | 
/home/natalya/Downloads/mysql/src/mysql-8.0.20/sql/parser_yystype.h:240:17: note: the first difference of corresponding definitions is field ‘lexer’
  240 |   Lexer_yystype lexer;  // terminal values from the lexical scanner
      |                 ^
fts0pars.y:62: note: a field with different name is defined in another translation unit
lto-wrapper: fatal error: write: No space left on device
compilation terminated.
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [sql/CMakeFiles/mysqld.dir/build.make:168: runtime_output_directory/mysqld] Error 1
make[1]: *** [CMakeFiles/Makefile2:8100: sql/CMakeFiles/mysqld.dir/all] Error 2
make: *** [Makefile:172: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

在构建软件包之前,我使用 pacman 升级了系统上的所有软件包,并安装了 base-devel 组。 知道什么可能导致这个问题吗?我该如何解决?谢谢!

【问题讨论】:

  • 您的硬盘似乎已满,或者您正在尝试写入只读驱动器
  • 但是我的硬盘没有满。怎么会这样??这是 df 的输出: /dev/sda6 53G 23G 28G 46% / /dev/sda8 190G 53G 128G 30% /home /dev/sda2 101M 78M 23M 78% /boot 我在我的主目录中构建所有包。这个包需要多少磁盘空间?我想我并不完全理解在 Arch Linux 中从源代码构建是如何工作的。
  • 我在投机领域,但你的 /tmp 目录有多大?这会让我感到惊讶,但我可以想象一个构建系统使用该路径来处理一些工件。通常,/tmp 在 ramdisk 中大约是主内存大小的一半。
  • 如果我尝试写入只读驱动器,那么我该如何更改它?
  • 我想我没有答案。这取决于哪个驱动器是只读的,哪种类型的文件系统等。

标签: c++ mysql linux


【解决方案1】:

这对我有用。我在 /home 中创建了目录 /tmp mkdir ~/tmp 然后我将 TMPDIR 环境设置为这个目录: export TMPDIR=~/tmp

【讨论】:

    猜你喜欢
    • 2015-08-20
    • 2014-02-09
    • 1970-01-01
    • 1970-01-01
    • 2020-10-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-30
    • 1970-01-01
    相关资源
    最近更新 更多