0

I need to install CUnit on Windows. I already had a CUnit folder with headers, but it was in Linux, and i don't have the lib for windows. So i downloaded CUnit-2.1.3 and tried to install it following the given steps, using mingw64. But it said that configure is unrecognized. So:

1) I had to install MSYS2, because i didn't found any way to get the needed autotools on Mingw64 alone.

2) i have no idea how to link my MSYS with my Mingw64 build (but honestly i don't really care. I'm just going to install CUnit and then forget MSYS2 and continue with Mingw64)

3) After the MSYS updates, ./configure said No such file or directory

There was a tip here: How to install CUnit on Windows

however the answer didn't work for me. make is giving back a lot of abnormal error. But then i found this topic : Building CUnit on Windows and thought it was my answer. Nearly.

4) Libtoolize was unrecognized, but i only had to find which package it was and install it. Now it says that:

$ libtoolize
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: You should add the contents of the following files  to 'aclocal.m4':
libtoolize:   '/usr/share/aclocal/ltversion.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.in,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

I've made all the changes except for the last one, since Makefile.am doesn't ahve any ACLOCAL_AMFLAGS, only a RPM_FLAG.

5) automake is not better:

$ automake --add-missing
bash: $'\302\203automake' : command not found
pacman -S automake
solve dependencies
search for conflicts

Paquets (16) automake1.10-1.10.3-3  automake1.11-1.11.6-3
         automake1.12-1.12.6-3  automake1.13-1.13.4-4
         automake1.14-1.14.1-3  automake1.15-1.15.1-1
         automake1.16-1.16.1-1  automake1.6-1.6.3-2  automake1.7-1.7.9-2
         automake1.8-1.8.5-3  automake1.9-1.9.6-2  db-5.3.28-2
         gdbm-1.18.1-2  libgdbm-1.18.1-2  perl-5.28.2-1
         automake-wrapper-11-1

i installed everything but it still said "command not found"

And i'm stuck here. Of course i'm making that in MSYS2 shell, not in MinGW64. they're still separate and i didn't installed anything in MSYS2 except for the first updates and then what i said here.

Any idea?

EDIT: following HolyBlackCat comment, i installed CUnit through MSYS. However, now when i try to launch the tests (with MinGW64 shell), i get an abnormal program termination with make70642.sh: fork failed: no error[1]. I've try to merge my MinGW64 folder with the one downloaded by MSYS, but didn't get better results.

Ablia
  • 191
  • 2
  • 10
  • MSYS2 has CUnit prebuilt as a package. – HolyBlackCat Jun 18 '19 at 11:40
  • this can be great. However, when i search in MSYS2 there is no CUnit; so i gues it's not installed. When i search to install it, with `pacman -Ss Cunit` , it gives me several options...all with mingw64. So i guess it'll download a Mingw64 toolchain containing Cunit. And as i said, i need to keep my Mingw64 toolchain. I'll download it and see if i can extract Cunit from this toolchain to put it in mine. – Ablia Jun 18 '19 at 11:59
  • ok, this is not working. I've tried to put my Mingw64 folder in MSYS before the install, so CUnit get installed correctly in my Mingw64. however when i try to compile, i got some "sh crashed". Then i took only every Cunit file installed in this folder, copy them in my Mingw64 backup folder, and try to compile xwith this one; i got a `-lcunit not found` (hadn't much hope about that, must admit. But no more sh crash). – Ablia Jun 18 '19 at 14:00

1 Answers1

0

Do you need to build Cunit from source or is installing an existing binary sufficient? In the latter case, open a Mingw-w64 shell and run the following command:

pacman -S mingw-w64-x86_64-cunit
user251384
  • 184
  • 5
  • Thanks, however as said in the comment I don't want to install a whole new mingw containing cunit. My Mingw repo is "personnalized" and I just want to add Cunit in it; and get rid of Msys. I've tried installing it anyway, to merge it with my own Mingw, but it didn't work. – Ablia Jul 29 '21 at 10:38