Cygwin make command throws a lot of 'undefined reference to' errors

29 Views Asked by At

I have been trying to install FORM (https://github.com/vermaseren/form), and using the make command in cygwin in order to build it. However, I get the following error:

enter image description here

which is only the last part of the error, since the whole thing is approx. 10 times longer, but also filled with 'undefined reference to' errors.

My guess is that g++ has to be used instead of gcc, which is also installed in my case, but I don't know which command is the g++ equivalent for 'make'. Are there any other solutions that I am missing?

1

There are 1 best solutions below

0
matzeri On

When you ask for support you should report the exact commands you gave and their output as text in line not as picture.

Please remember that Make calls the compilers, the compilers are producing the error you see. The root cause is that you have not properly configured the source for a compilation on Cygwin.

The following is the build sequence that I used and that produced the proper binaries.

$ 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

The build was not perfect but not so bad

$ 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