AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[gcc](computer)

Martin Hope
Garry Grover
Asked: 2024-11-18 06:58:16 +0800 CST

构建 GCC 失败,并显示“make:*** 未指定目标且未找到 makefile。”

  • 5

我按照 GCC 安装说明 [1] 下载源代码并配置我的构建,但是当我尝试make从顶层目录(使用MAINTAINERS和Makefile.in)时,我总是收到相同的错误:make: *** No targets specified and no makefile found.我不知道如何继续安装指南的构建步骤。

编辑:我注意到我的objdir/config.log文件以结尾configure: exit 1,我不确定这是否是预期的,或者是否表示配置失败并且项目不处于可行构建状态。

我试过了

  • make

  • make install

  • make bootstrap

  • make -f Makefile.in

    Makefile:26: *** missing separator. Stop.由于以 和 开头的行,@if此操作失败并显示消息@endif。此自动生成的文件有很多这样的行,我怀疑我是否应该手动删除它们。

到目前为止我的完整工作流程:

# Get the source
~$ mkdir gcc; cd gcc
~/gcc$ git clone git://gcc.gnu.org/git/gcc.git .

# Make objdir/ and configure my desired build
~$ mkdir ARM; cd ARM
~/gcc/ARM$ ../configure --prefix=$HOME --target=aarch64-none-elf

# Try to "just make"
~/gcc/ARM$ cd ..
~/gcc$ make # :(

一些可能相关的细节

~/gcc$ gcc --version
gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/gcc$ make --version
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
~/gcc$ git show
commit 3e89a4d5138e585713604135d4c2601244055e82 (HEAD -> master, origin/trunk, origin/master, origin/HEAD)
Author: Jason Merrill <[email protected]>
Date:   Sat Nov 16 15:25:04 2024 -0500
...
~/gcc$ ls
ABOUT-NLS           config.sub       fixincludes   libcody       libitm           ltmain.sh           missing
ar-lib              configure        gcc           libcpp        libobjc          lt~obsolete.m4      mkdep
ARM                 configure.ac     gnattools     libdecnumber  libphobos        lto-plugin          mkinstalldirs
ChangeLog           contrib          gotools       libffi        libquadmath      ltoptions.m4        move-if-change
ChangeLog.jit       COPYING          include       libgcc        libsanitizer     ltsugar.m4          multilib.am
ChangeLog.tree-ssa  COPYING3         INSTALL       libgfortran   libssp           ltversion.m4        README
compile             COPYING3.LIB     install-sh    libgm2        libstdc++-v3     MAINTAINERS         SECURITY.txt
config              COPYING.LIB      libada        libgo         libtool-ldflags  maintainer-scripts  symlink-tree
config.guess        COPYING.RUNTIME  libatomic     libgomp       libtool.m4       Makefile.def        test-driver
config-ml.in        c++tools         libbacktrace  libgrust      libvtv           Makefile.in         ylwrap
config.rpath        depcomp          libcc1        libiberty     ltgcc.m4         Makefile.tpl        zlib
  1. https://gcc.gnu.org/install/index.html

编辑:修复了一些细节并添加了一些细节

gcc
  • 1 个回答
  • 23 Views
Martin Hope
Jinja_dude
Asked: 2021-03-31 04:06:27 +0800 CST

Ansible 运行分析工具:使用 pip3 安装 mysqlclient 时出现异常

  • 5

我想使用带有 ARA 的 mysql 引擎/数据库,而不是工具附带的默认 sqlite 引擎,以便为多个条目提供更强大的引擎,但我面临的问题不允许我在下面实现这一点细节 :

当我在我的 ARA 服务器的 settings.yml 文件中指定 mysql 引擎时,出现以下错误:

~/.ara/server # [ara] Using settings file: /root/.ara/server/settings.yaml
Traceback (most recent call last):
  File "/root/.local/lib/python3.8/site-packages/ara/server/__main__.py", line 54, in main
    import MySQLdb  # noqa
ModuleNotFoundError: No module named 'MySQLdb'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/bin/ara-manage", line 8, in <module>
    sys.exit(main())
  File "/root/.local/lib/python3.8/site-packages/ara/server/__main__.py", line 56, in main
    raise MissingMysqlclientException from e
ara.setup.exceptions.MissingMysqlclientException: The mysqlclient python library must be installed in order to use the MySQL database engine.

所以我检查了是否安装了 mysqlclient 并且显然没有安装:

~/.ara/server # pip3 list installed | grep mysql

但是当我尝试安装它时,我有这个巨大的异常块:


~/.ara/server # pip3.8 install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-lm119tma
       cwd: /tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/
  Complete output (41 lines):
  mysql_config --version
  ['10.5.5']
  mysql_config --libs
  ['-L/usr/lib/', '-lmariadb']
  mysql_config --cflags
  ['-I/usr/include/mysql', '-I/usr/include/mysql/mysql']
  ext_options:
    library_dirs: ['/usr/lib/']
    libraries: ['mariadb']
    extra_compile_args: ['-std=c99']
    extra_link_args: []
    include_dirs: ['/usr/include/mysql', '/usr/include/mysql/mysql']
    extra_objects: []
    define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/release.py -> build/lib.linux-x86_64-3.8/MySQLdb
  copying MySQLdb/times.py -> build/lib.linux-x86_64-3.8/MySQLdb
  creating build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
  running build_ext
  building 'MySQLdb._mysql' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/MySQLdb
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/usr/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.8/MySQLdb/_mysql.o -std=c99
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ksqr0pbp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/mysqlclient
         cwd: /tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/
    Complete output (41 lines):
    mysql_config --version
    ['10.5.5']
    mysql_config --libs
    ['-L/usr/lib/', '-lmariadb']
    mysql_config --cflags
    ['-I/usr/include/mysql', '-I/usr/include/mysql/mysql']
    ext_options:
      library_dirs: ['/usr/lib/']
      libraries: ['mariadb']
      extra_compile_args: ['-std=c99']
      extra_link_args: []
      include_dirs: ['/usr/include/mysql', '/usr/include/mysql/mysql']
      extra_objects: []
      define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-x86_64-3.8/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-x86_64-3.8/MySQLdb
    creating build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.8/MySQLdb/constants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/MySQLdb
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/usr/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.8/MySQLdb/_mysql.o -std=c99
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oq1ay19g/mysqlclient_f0ad3d21508f4b698b4bfb4e7c70b25d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ksqr0pbp/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/mysqlclient Check the logs for full command output.

如果我理解错误,则由于缺少 gcc 存在编译问题。但是当我尝试使用 pip 卸载 gcc7 时它不起作用:

~/.ara/server # pip3 install gcc7
ERROR: Could not find a version that satisfies the requirement gcc7
ERROR: No matching distribution found for gcc7

1-我的分析对吗?

2-这背后的真正问题是什么?我的意思是还有其他可能导致此问题的依赖项。任何帮助或提示将不胜感激。

PS:我正在研究高山分布。

python gcc
  • 2 个回答
  • 64 Views
Martin Hope
Harry Kruger
Asked: 2019-08-24 10:06:56 +0800 CST

使用 gcc 编译 c 代码时访问被拒绝

  • 5

我编译了我的 c 程序gcc -c -o test.exe test.c 并且编译没有错误然后当我运行它时给出Access is denied.

这是我的代码

#include <stdio.h>
int main()
{
    printf("Hello, World!");
    return 0;
}
c gcc
  • 2 个回答
  • 2843 Views
Martin Hope
Phil Turner
Asked: 2019-06-11 13:29:24 +0800 CST

为什么我构建的 gcc 不支持共享库

  • 5

我在 Debian Wheezy 主机上的 Debian Lenny chroot 中构建了 gcc-4.9.0。拱门 = Armel(Wheezy 和 Lenny)。我使用了以下配置选项:

$PWD/../gcc-4.9.0/configure --prefix=/usr/local/GCC-4.9.0 --enable-languages=c,c++ --with-arch=armv4t --with-float=soft --enable-checking=release --enable-shared --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi LDFLAGS=-Wl,-no-keep-memory --disable-libjava

当我尝试构建一些库(本例中为 libgcrypt)时,我无法构建共享库:

checking whether the /usr/local/GCC-4.9.0/bin/gcc linker (/usr/local/GCC-4.9.0/bin/gcc) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes`

对于卷曲:

gcc: error: ../lib/.libs/libcurl.so: No such file or directory
make[2]: *** [Makefile:923: curl] Error 1

构建 gcc 时我是否仍然缺少一些配置选项?

linux gcc
  • 1 个回答
  • 953 Views
Martin Hope
maxbachmann
Asked: 2019-05-02 18:50:49 +0800 CST

缺少 gcc 编译器警告标志

  • 5

我想使用https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html上列出的一些警告标志。然而,我似乎不能全部使用它们。例如-Wpessimizing-move,gcc 无法识别我(总是生成错误,因为此选项不存在)。很多标志都存在这个问题。我使用 fedora 存储库中的 gcc 这就是我的版本输出:

Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Ziel: x86_64-redhat-linux
Konfiguriert mit: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread-Modell: posix
gcc-Version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC) 

gcc 和 g++ 都会出现同样的错误。这种行为的原因可能是什么?以及如何解决?

gcc
  • 1 个回答
  • 161 Views
Martin Hope
Richard
Asked: 2019-04-23 22:28:35 +0800 CST

命令未找到...错误 (Fedora 29)

  • 7

我正在学习关于 lex 和 yacc 的教程,该教程要求我编译一些 C 源代码。本教程要求我在终端中输入以下行:

$ gcc ‑o exampleA lex.yy.c ‑lfl

但我随后收到消息:

bash: $: command not found...

我尝试使用更简单的 HelloWorld C 源代码文件,但得到了相同的消息。

但我知道 gcc 可执行文件位于 /usr/bin 中,当我在终端中键入“gcc --version”或“gcc --help”时,我会得到一个合理的响应。

这里发生了什么?

顺便说一句,我正在使用 Fedora 29 Linux 发行版。

fedora gcc
  • 2 个回答
  • 438 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve