标签: compiling

尝试在 14.04 上编译 geos 时“无法在没有 isnan 函数或宏的情况下编译”

使用在 ubuntu 12.04 上构建 geos 的过程,我尝试在 14.04 上构建 geos 并在执行时收到错误“无法在没有 isnan 函数或宏的情况下编译” 。make

sudo apt-get -y install build-essential

wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2

tar xvfj geos-3.4.2.tar.bz2
cd geos-3.4.2
./configure
make 
Run Code Online (Sandbox Code Playgroud)

由于某种原因,该isnan()宏似乎在 14.04 上不可用,我怎样才能编译它?

compiling software-installation 14.04

4
推荐指数
1
解决办法
4092
查看次数

如何在 14.04 上安装构建内核所需的 Qt 包?

我将在 Ubuntu 14.04 64 位上编译内核,因此我首先安装我需要的软件包:

sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget libncurses5 libncurses5-dev qt4-dev-tools libqt4-dev
Run Code Online (Sandbox Code Playgroud)

libqt3-headers除了和软件包外,所有内容均已安装libqt3-mt-dev。对于我在终端中获得的那些包:

E: Unable to locate package libqt3-headers
E: Unable to locate package libqt3-mt-dev
Run Code Online (Sandbox Code Playgroud)

我环顾四周,Ubuntu 14.04 存储库中似乎没有这些软件包。

知道该怎么做吗?

package-management dependencies compiling kernel qt

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

未定义对符号“解压缩”的引用,命令行中缺少 DSO

我正在尝试手动编译我的 php iconv 扩展,以便它使用 libiconv 而不是 glibc。我下载了 libiconv,并配置了./configure --prefix=/usr/localmake然后sudo make install

我找到了有关手动编译的说明:https ://stackoverflow.com/questions/4743080/how-can-i-force-php-to-use-the-libiconv-version-of-iconv-instead-of-the- centos-in/4851065#4851065

我有一个 php 版本 5.6.10,它是使用 phpbrew 安装的,所以我从步骤 #3 开始。

在步骤 #5 ( make) 中,我遇到了以下错误:

/usr/bin/ld: ext/standard/.libs/image.o: undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Run Code Online (Sandbox Code Playgroud)

你知道如何解决这个问题吗?多谢。

php compiling 14.04

4
推荐指数
1
解决办法
8521
查看次数

为什么在使用 gcc 编译一个简单的 C++ 程序时会出现“未定义的引用”错误?

我尝试在 Ubuntu 中编译 C++。我在 Gedit 中编写代码,这是一个简单的 hello world 项目。我去终端运行它gcc helloworld.cc并弹出此消息:

/tmp/ccy83619.o: In function `main':
helloworld.cc:(.text+0xa): undefined reference to `std::cout'
helloworld.cc:(.text+0xf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccy83619.o: In function `__static_initialization_and_destruction_0(int, int)':
helloworld.cc:(.text+0x3d): undefined reference to `std::ios_base::Init::Init()'
helloworld.cc:(.text+0x4c): undefined reference to `std::ios_base::Init::~Init()'
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

这是什么意思,我该往哪里去?

compiling gcc c++

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

使用一个 makefile 创建可执行和共享库

使用 makefile 对我来说是新的。到目前为止,我用最简单的方法进行的第一次测试效果很好。但是现在我被困在编写一个创建可执行文件和共享库的 makefile 中。正如我所说,我是 makefile 的新手。这是我的简单方法:

exe.a: main.c func.c
    gcc main.c func.c -o exe.a
lib.so: func.c
    gcc func.c -o lib.so -fPIC -shared
Run Code Online (Sandbox Code Playgroud)

执行 makefile 时,只会编译可执行文件。甚至可以用一个 makefile 创建两个对象吗?创建这些文件的最佳方法是什么?

shared-library compiling executable make

4
推荐指数
1
解决办法
6886
查看次数

如何在 ubuntu 18.04 上构建内核 4.15.0 并避免丢失 libperf-jvmti.so

我正在尝试构建内核 4.15.0 以使用 Docker应用补丁。但我遇到了这样的问题libperf-jvmti.so但我遇到了构建内核时未发现的

有人能告诉我如何修复这个错误吗?

root@513ceb15941f:/data/linux-4.15.0$ fakeroot debian/rules binary-

....

headers binary-generic binary-perarch
install -m755 /data/linux-4.15.0/debian/build/tools-perarch/tools/perf/perf /data/linux-4.15.0/debian/linux-tools-4.15.0-66/usr/lib/linux-tools-4.15.0-66
install -m755 /data/linux-4.15.0/debian/build/tools-perarch/tools/perf/libperf-jvmti.so /data/linux-4.15.0/debian/linux-tools-4.15.0-66/usr/lib/linux-tools-4.15.0-66
install: cannot stat '/data/linux-4.15.0/debian/build/tools-perarch/tools/perf/libperf-jvmti.so': No such file or directory
debian/rules.d/2-binary-arch.mk:668: recipe for target 'install-perarch' failed
make: *** [install-perarch] Error 1


Run Code Online (Sandbox Code Playgroud)

Docker 构建文件

环境和代码都在这里。

https://github.com/fx-kirin/docker-ubuntu-kernel-build

相对链接

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1761379

compiling kernel docker 18.04

4
推荐指数
1
解决办法
2252
查看次数

内核升级后 Displaylink 驱动程序不起作用

我将内核更新为5.4.0-42-generic之后我的扩展坞不再工作。所以我尝试重新安装我的驱动程序并收到以下消息。

Verifying archive integrity...  100%   All good.
Uncompressing DisplayLink Linux Driver 5.2.14  100%  
DisplayLink Linux Software 5.2.14 install script called: install
Distribution discovered: Ubuntu 18.04.4 LTS
Installing
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
ERROR (code 3): Failed to build evdi/5.2.14. Consult /var/lib/dkms/evdi/5.2.14/build/make.log for details...
Run Code Online (Sandbox Code Playgroud)

日志

DKMS make.log for evdi-5.2.14 for kernel 5.4.0-42-generic (x86_64)
Thu Jul 23 09:40:00 CEST 2020
make: getcwd: No such file or directory
make: *** …
Run Code Online (Sandbox Code Playgroud)

displaylink compiling kernel drivers

4
推荐指数
1
解决办法
3109
查看次数

在 Ubuntu 22.04(内核 5.17)上安装 VMWare Player

我正在运行 Ubuntu (Mate) 22.04,内核升级到 5.17.4(我有非常新的硬件)。

从 VM-Ware 下载并运行 .bundle 文件后,vmmonvmnet模块安装失败。

日志显示多个stdarg.hstddef.h发现的错误。我尝试了在这里找到的解决方案:

sudo CPATH=/usr/src/linux-headers-5.17.4-051704/include/linux vmware-modconfig --console --install-all
Run Code Online (Sandbox Code Playgroud)

但我得到了多个 error: expression in static assertion is not constant

如何让 VMWare 运行?

vmware compiling linux-headers

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

Jammy 22.04 升级后无法构建 dkms 模块

概括

我最近从 Ubuntu 20.04 升级到 22.04,从那时起,我就无法在没有错误的情况下安装内核头文件。最初,我因缺少flexbison而出现错误。手动安装这些后,我遇到了以下错误,但无法解决。

错误

尝试安装(以及几个旧版本)失败,并在 dkms 模块构建期间makelinux-headers-5.15.0-47-generic返回错误状态。

apt说检查make log,有如下错误:

No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl',
             needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'
Run Code Online (Sandbox Code Playgroud)

完整的apt输出

$ sudo apt install --reinstall linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 2,898 kB of archives.
After this operation, 0 B of additional disk space will be …
Run Code Online (Sandbox Code Playgroud)

scripts compiling kernel make linux-headers

4
推荐指数
1
解决办法
4967
查看次数

尝试编译内核 2.6.37 时出错

我已经从 kernel.org 下载了内核 2.6.37。我试图编译它,但出现错误:

$ make menuconfig
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
Run Code Online (Sandbox Code Playgroud)

我已将实际内核配置复制到.config

cp /boot/config-2.6.37-20110117 .config
Run Code Online (Sandbox Code Playgroud)

我又执行make menuconfig了一次,但它编译了完整的内核而不显示菜单。o_O 我编译这个内核几天没有问题。

有什么帮助吗?谢谢。

compiling kernel

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