Cygwin make 命令抛出大量“未定义引用”错误

问题描述 投票:0回答:1

我一直在尝试安装 FORM (https://github.com/vermaseren/form),并使用 cygwin 中的 make 命令来构建它。但是,我收到以下错误:

这只是错误的最后一部分,因为整个事情大约是。长了 10 倍,但也充满了“未定义引用”错误。

我的猜测是必须使用 g++ 而不是 gcc,我的情况下也安装了 gcc,但我不知道哪个命令是 g++ 的“make”等效命令。我还缺少其他解决方案吗?

gcc build g++ cygwin
1个回答
0
投票

当您寻求支持时,您应该以行内文本而不是图片的形式报告您给出的确切命令及其输出。

请记住,

Make
调用编译器,编译器正在产生您看到的错误。根本原因是你没有正确配置Cygwin上编译的源。

以下是我使用的构建顺序,它生成了正确的二进制文件。

$ wget https://github.com/vermaseren/form/releases/download/v4.3.1/form-4.3.1.tar.gz
...
2024-02-08 21:40:53 (3.29 MB/s) - ‘form-4.3.1.tar.gz’ saved [1470480/1470480]

$ tar -xf form-4.3.1.tar.gz
$ cd form-4.3.1
$ autoreconf
$ ./configure
...
##################### CONFIGURATION #####################

FORM 4.3.1

Compiling for: Opteron Cygwin (LP64 POSIX)

Optionally linked libraries:
    gmp
    zlib

The following executables can be compiled:
    form       scalar version (native)
    tform      multi-threaded version (native)

Type 'make <executable name>' in the source directory to
build a specific version. Type 'make' to build all.

Type 'make install' to install the executables in
    /usr/local/bin
and the man page in
    /usr/local/share/man

Type 'make check' to run automatic tests.

Available documentation:
    doxygen    ( html dvi ps pdf )
    manual     ( html dvi ps pdf )

Type 'make <format>' in the directories doc/manual or
doc/doxygen to generate the respective documentation with
the specified format.

#########################################################

$ make
..
make[1]: Leaving directory '/tmp/form-4.3.1'


$ find . -name "*.exe"
./sources/form.exe
./sources/tform.exe

构建并不完美,但也不算太糟糕

$ make check
....
Finished in 97.9087595 seconds.
--------------------------------------------------------------------------------
227 tests, 850 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
99.5595% passed
--------------------------------------------------------------------------------
2.32 tests/s, 8.68 assertions/s
FAIL: check-help.sh
FORM 4.3.1 (Apr 11 2023, v4.3.1) 64-bits
  0.053333 form units in 5.406 seconds (cpu time)
  corresponding to 35.51 form units per hour
PASS: benchmark-fu.sh
==========================================================
1 of 2 tests failed
Please report to https://github.com/vermaseren/form/issues
==========================================================
make[2]: *** [Makefile:340: check-TESTS] Error 1
make[2]: Leaving directory '/tmp/form-4.3.1/check'
make[1]: *** [Makefile:465: check-am] Error 2
make[1]: Leaving directory '/tmp/form-4.3.1/check'
make: *** [Makefile:406: check-recursive] Error 1
© www.soinside.com 2019 - 2024. All rights reserved.