Coder Social home page Coder Social logo

Cannot build on Windows 10 about memento HOT 13 CLOSED

97997 avatar 97997 commented on May 29, 2024
Cannot build on Windows 10

from memento.

Comments (13)

ripose-jp avatar ripose-jp commented on May 29, 2024 1

I just set up a new MSys2 build environment and found out that cmake uses make instead of mingw-w64-x86_64-make for some reason.

90% sure just installing make will fix it for you guys.

pacman -S make

Let me know if it does so I can update the guide.

For my own reference, I'm leaving the output of pacman -Qe for this build environment here.

base 2020.12-1
git 2.30.1-1
make 4.3-1
mingw-w64-x86_64-cmake 3.19.3-2
mingw-w64-x86_64-ffmpeg 4.3.2-1
mingw-w64-x86_64-gcc 10.2.0-6
mingw-w64-x86_64-json-c 0.15-1
mingw-w64-x86_64-libzip 1.7.3-1
mingw-w64-x86_64-mecab 0.996-2
mingw-w64-x86_64-mpv 0.33.0-2
mingw-w64-x86_64-qt5 5.15.2-6
mingw-w64-x86_64-sqlite3 3.34.1-1

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

If I remember correctly, this is an annoying bug involving Msys2 having three different versions of cmake.
https://stackoverflow.com/questions/37365355/cmake-msys-makefiles-generator-missing#38256481

Try replacing lines 25 and 26 in windows_build.sh with

$PREFIX/bin/cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ..
$PREFIX/bin/cmake --build .

Alternatively, you could uninstall the conflicting cmake package using this command

pacman -Rdd cmake

Also make sure you're running Msys2 64-bit and not the unspecified or 32-bit shortcut.

Thanks for reporting this, if any of what I told you managed to get it to work, please post a comment so I know how to go about updating the README and build script.

from memento.

StefanIgnjatovic12 avatar StefanIgnjatovic12 commented on May 29, 2024

i'm having a similar issue
first attempt:

# ./windows-build.sh x86_64
mkdir: cannot create directory ‘build’: File exists
./windows-build.sh: line 25: cmake: command not found
./windows-build.sh: line 26: cmake: command not found
mkdir: cannot create directory ‘Memento_x86_64’: File exists
cp: cannot stat 'src/memento.exe': No such file or directory
./windows-build.sh: line 147: windeployqt: command not found

after replacing the code in lines 25 and 26 like you said

# ./windows-build.sh x86_64
mkdir: cannot create directory ‘build’: File exists
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!
The parameter is incorrect
CMake Error: Generator: execution of make failed. Make command was:  &&
mkdir: cannot create directory ‘Memento_x86_64’: File exists
cp: cannot stat 'src/memento.exe': No such file or directory
./windows-build.sh: line 147: windeployqt: command not found

when trying to run pacman -Rdd cmake

error: target not found: cmake

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

Just as a sanity check, you are running the 64-bit MSys2 shortcut and not the unspecified or 32-bit one, right? It should have a reddish orange icon.

Seeing as both of you are having trouble resolving windeployqt, it seems like things installed in C:\msys64\mingw64\bin aren't in your PATH variable. Of course, that doesn't mean you should add that directory to your system PATH because that will probably break more thinks than it solves, but I'm assuming when you run the right MSys2 configuration, it should begin to resolve in /mingw64/bin first as opposed to /bin.

I'll see if I can set up a fresh MSys2 environment when I have some time in the next few days to try and replicate some of what's going on.

from memento.

StefanIgnjatovic12 avatar StefanIgnjatovic12 commented on May 29, 2024

image
i was using the third one but in case thats wrong i just tried with the 64 bit one and this is what i got.

old line 25 and 26:

mkdir: cannot create directory ‘build’: File exists
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --parallel [<jobs>], -j [<jobs>]
                 = Build in parallel using the given number of jobs.
                   If <jobs> is omitted the native build tool's
                   default number is used.
                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.
  --target <tgt>..., -t <tgt>...
                 = Build <tgt> instead of default targets.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --verbose, -v  = Enable verbose output - if supported - including
                   the build commands to be executed.
  --             = Pass remaining options to the native tool.
mkdir: cannot create directory ‘Memento_x86_64’: File exists
cp: cannot stat 'src/memento.exe': No such file or directory
"memento.exe" does not exist.

replaced 25 and 26:

$ ./windows-build.sh x86_64
mkdir: cannot create directory ‘build’: File exists
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!
The parameter is incorrect
CMake Error: Generator: execution of make failed. Make command was:  &&
mkdir: cannot create directory ‘Memento_x86_64’: File exists
cp: cannot stat 'src/memento.exe': No such file or directory
"memento.exe" does not exist.

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

I'm doing all this from memory, so if I'm making some mistakes, my bad. Judging from the output, as long as you're running Msys2 MinGW 64-bit, you shouldn't need to edit the build script.

It's possible that you're missing make and gcc. I probably left them out of the dependencies in the README since I wrote it after I got everything to work. Try installing them with these commands.

pacman -S mingw-w64-x86_64-make
pacman -S mingw-w64-x86_64-gcc

from memento.

StefanIgnjatovic12 avatar StefanIgnjatovic12 commented on May 29, 2024

still getting the same outputs as in my last post having run those commands unfortunately

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

Some dependency is probably missing.
Post the output of

pacman -Qe

Here's mine to compare against. Fair warning, some of these packages probably aren't needed to build Memento.

asciidoc 9.1.0-1
autoconf 2.71-1
autoconf2.13 2.13-3
autogen 5.18.16-1
automake-wrapper 11-1
automake1.10 1.10.3-4
automake1.11 1.11.6-4
automake1.12 1.12.6-4
automake1.13 1.13.4-5
automake1.14 1.14.1-4
automake1.15 1.15.1-2
automake1.16 1.16.3-1
automake1.6 1.6.3-3
automake1.7 1.7.9-3
automake1.8 1.8.5-4
automake1.9 1.9.6-3
base 2020.12-1
bison 3.7.4-1
btyacc 20200910-1
diffstat 1.63-1
diffutils 3.7-1
dos2unix 7.4.2-1
flex 2.6.4-1
gcc 10.2.0-1
gdb 9.2-3
gettext-devel 0.19.8.1-1
git 2.30.1-1
gmp-devel 6.2.1-1
gperf 3.1-2
groff 1.22.4-1
gyp-git r2162.28b55023-2
help2man 1.47.16-1
intltool 0.51.0-2
libtool 2.4.6-9
libunrar 6.0.3-1
libunrar-devel 6.0.3-1
m4 1.4.18-2
make 4.3-1
man-db 2.9.3-1
mercurial 5.6.1-1
mingw-w64-i686-imagemagick 7.0.10.11-3
mingw-w64-i686-mecab 0.996-2
mingw-w64-i686-mpv 0.33.0-2
mingw-w64-i686-qt5 5.15.2-6
mingw-w64-x86_64-binutils 2.36.1-1
mingw-w64-x86_64-cmake 3.19.3-3
mingw-w64-x86_64-gcc 10.2.0-6
mingw-w64-x86_64-jbigkit 2.1-4
mingw-w64-x86_64-json-c 0.15-1
mingw-w64-x86_64-libguess 1.2-3
mingw-w64-x86_64-libzip 1.7.3-1
mingw-w64-x86_64-lua 5.3.5-1
mingw-w64-x86_64-make 4.3-1
mingw-w64-x86_64-mecab 0.996-2
mingw-w64-x86_64-mecab-naist-jdic 0.6.3b_20111013-1
mingw-w64-x86_64-mpg123 1.26.4-1
mingw-w64-x86_64-mpv 0.33.0-2
mingw-w64-x86_64-ninja 1.10.2-1
mingw-w64-x86_64-pkgconf 1.7.3-6
mingw-w64-x86_64-qt5 5.15.2-6
mpc-devel 1.1.0-1
mpfr-devel 4.1.0-1
nasm 2.15.05-1
p7zip 17.03-1
pactoys-git r2.07ca37f-1
patch 2.7.6-1
patchutils 0.4.2-1
pkgconf 1.7.3-2
pkgfile 21-1
quilt 0.66-2
reflex 20200715-1
scons 3.1.2-4
subversion 1.14.0-2
swig 4.0.2-1
texinfo 6.7-3
texinfo-tex 6.7-3
ttyrec 1.0.8-2
unrar 6.0.3-1
unzip 6.0-2
xmlto 0.0.28-2
yasm 1.3.0-2
zip 3.0-3
zlib-devel 1.2.11-1

from memento.

97997 avatar 97997 commented on May 29, 2024

I tried with changing the lines, also with installing

pacman -S mingw-w64-x86_64-make
pacman -S mingw-w64-x86_64-gcc

all of the attemps where made with MSYS2 MinGW 64-bit.

And i'm getting this error (with both versions of the changes in the lines 25+26)

Anonimo@DESKTOP-UOBSA31 MINGW64 ~/Memento
$ ./windows-build.sh x86_64
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!
パラメーターが間違っています。
CMake Error: Generator: execution of make failed. Make command was:  -f Makefile &&
cp: cannot stat 'src/memento.exe': No such file or directory
"memento.exe" does not exist.

The output of

pacman -Qe

is

Anonimo@DESKTOP-UOBSA31 MINGW64 ~/Memento
$ pacman -Qe
base 2020.12-1
cmake 3.20.0-1
git 2.31.1-1
mingw-w64-x86_64-cmake 3.20.0-1
mingw-w64-x86_64-ffmpeg 4.3.2-1
mingw-w64-x86_64-gcc 10.2.0-10
mingw-w64-x86_64-json-c 0.15-1
mingw-w64-x86_64-libzip 1.7.3-1
mingw-w64-x86_64-make 4.3-1
mingw-w64-x86_64-mecab 0.996-2
mingw-w64-x86_64-mpv 0.33.0-2
mingw-w64-x86_64-qt5 5.15.2-7
mingw-w64-x86_64-sqlite3 3.35.4-1

I delete the build folder with each try of running the build script, not sure if that matters.

from memento.

StefanIgnjatovic12 avatar StefanIgnjatovic12 commented on May 29, 2024

yep that worked for me, it installed now. thanks for the help. just to note, i first tried it with the original line 25 and 26 and it didn't work but after using

$PREFIX/bin/cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ..
$PREFIX/bin/cmake --build .

it installed.

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

Everything should be fixed on master now.
Thanks for your help.

from memento.

97997 avatar 97997 commented on May 29, 2024

This

pacman -S make

Did the trick and built.

But for some reason libssp-0.dll was missing when i tried to execute memento.exe, solved it by searching that file in the MSYS2 directory and copypasting it in the executable dir.

from memento.

ripose-jp avatar ripose-jp commented on May 29, 2024

Comparing our pacman -Qe results, you're building with newer package versions than me, so it's likely a dependency somewhere started depending on libssp.

The Windows build script is probably never going to be perfect because of things like this, but just copying the .dll does the trick, so it shouldn't be too much of an issue. I usually update the script before new releases to fix things like this.

from memento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.