相关疑难解决方法(0)

如何安装 build-essential:i386 以在 64 位系统上编译 32 位可执行文件?

apt-get install build-essential:i386 根本不起作用:

The following packages have unmet dependencies:
 build-essential:i386 : Depends: gcc:i386 (>= 4:4.4.3) but it is not going to be installed
                        Depends: g++:i386 (>= 4:4.4.3) but it is not going to be installed
Run Code Online (Sandbox Code Playgroud)

请注意标签。在64 位机器编译 32 位二进制文​​件时遇到问题的答案 已经过时。此外,没有./configure脚本可以在 64 位系统上使用Compile 32 位答案。

更多细节

我正在尝试从 quietust 分支编译 DFHack:https : //github.com/quietust/dfhack/

apt-get install gcc-multilib g++-multilib 删除了

CMake Error at depends/protobuf/CMakeLists.txt:60 (MESSAGE):
  Could not find a working …
Run Code Online (Sandbox Code Playgroud)

64-bit compiling 32-bit games 14.04

6
推荐指数
1
解决办法
2万
查看次数

11.10 中的多架构功能是否意味着强制架构安装的消亡?

那么 11.10 的 multiarch 功能是否意味着 64 位用户将能够安装 32 位“.debs”而无需求助于“force--architecture”命令?

11.10 multiarch

5
推荐指数
1
解决办法
1611
查看次数

如何在64位系统上编译32位可执行文件

注意:我浏览了一些建议的“类似问题”,但没有发现任何看起来结论性的内容。另外,他们中的大多数似乎已经有 6 岁了(从 2014 年开始),所以我希望有一些更新的东西(并且更有可能“正常工作”)。

我有一个 64 位 Ubuntu 系统,运行良好。我希望能够构建一个 32 位版本的“hello,world”。这主要是一种学术追求,但让它发挥作用会很方便。如果使用“-m32”编译“正常工作”,那就太好了,但事实并非如此。更糟糕的是,我的记忆是,这曾经“正常工作”(在旧版本的 64 位 Linux 中),但现在不再工作了。

观察:

$ cat hello.c
#include <stdio.h>

int main() { puts("hello, world"); return 0; }
$ gcc -m32 hello.c
In file included from hello.c:1:0:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
 #include <bits/libc-header-start.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
$
Run Code Online (Sandbox Code Playgroud)

一番探索表明安装这些软件包(见下文)可能会有所帮助,所以我这样做了:

apt-get install libc6-dev-i386-x32-cross
Run Code Online (Sandbox Code Playgroud)

安装了以下内容:

The following NEW packages will be installed:


libc6-dev-i386-x32-cross libc6-dev-x32-cross libc6-i386-x32-cross
  libc6-x32-cross linux-libc-dev-x32-cross
Run Code Online (Sandbox Code Playgroud)

之后,通过一点点捏造,我能够编译它,但不能链接。链接阶段给出以下错误消息:

/usr/bin/ld: cannot find Scrt1.o: No such file or …
Run Code Online (Sandbox Code Playgroud)

compiling 32-bit

5
推荐指数
2
解决办法
5530
查看次数

标签 统计

32-bit ×2

compiling ×2

11.10 ×1

14.04 ×1

64-bit ×1

games ×1

multiarch ×1