小编wul*_*rry的帖子

如何修复“/usr/bin/ld:警告:trap.o:缺少 .note.GNU-stack 部分意味着可执行堆栈”?

我分别在 wsl 和我主要使用的操作系统 archLinux 中的 ubuntu20.04 上编译了相同的项目。在 wsl 上,一切正常,而在 archlinux 上,会显示如下错误消息:

/usr/bin/ld: warning: trap.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Run Code Online (Sandbox Code Playgroud)

这似乎是由链接器ld引起的错误,它在我的 Linux 操作系统上的版本消息是:

GNU ld (GNU Binutils) 2.39
Copyright (C) 2022 Free Software Foundation, Inc.
Run Code Online (Sandbox Code Playgroud)

我的 wsl 上的它是:

GNU ld (GNU Binutils for Ubuntu) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
Run Code Online (Sandbox Code Playgroud)

在 arch 上,gcc 的版本是12.1.1,而在 wsl 上是 gcc 9.3.0 …

c linux gcc ld windows-subsystem-for-linux

7
推荐指数
1
解决办法
8611
查看次数

Lua 错误:“E5113:调用 lua chunk 时出错:xattempt 调用 field d 'setup'(nil 值)”

我的操作系统是Arch Linux,Lua的版本是5.4.4 我正在尝试配置neovim插件,nvim-tree。我的配置Lua文件如下。

local status, nvim_tree = pcall(require, "nvim-tree")
if not status then
    vim.notify("can't find nvim-tree")
  return
end

local list_keys = require('keybindings').nvimTreeList

nvim_tree.setup ({

    auto_close = true,
    
    git = {
        enable = false
    },

    update_cwd = true,
    update_focused_file = {
        enable = true,
        update_cwd = true
    },

    filters = {
        dotfiles = true,
        custom = {"node_modules"}
    },
    view = {

        width = 30,

        side = "left",

        hide_root_folder = false,

        auto_resize = true,

        mappings = {
            custom_only = false,
            list = …
Run Code Online (Sandbox Code Playgroud)

lua neovim

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

标签 统计

c ×1

gcc ×1

ld ×1

linux ×1

lua ×1

neovim ×1

windows-subsystem-for-linux ×1