I’m trying to build glibmm in Windows using MSVC. Following the usual steps:
cd NMake_MSVC
nmake /f Makefile.vc CFG=release PREFIX=...
But I’m getting:
"rm" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
m4 failed with exit code 1. Aborting...
NMAKE : fatal error U1077: 'for %s in (..\glib\src\*.ccg) do @if not exist ..\glib\glibmm\%~ns.cc if not exist vs17\release\x64\glibmm\%~ns.cc perl -I ../tools/pm -- ../tools/gmmproc -I ../tools/m4 --defs ../glib/src %~ns ../glib/src vs17\release\x64\glibmm' : codice restituito '0x1'
Stop.
Did you really download and unpack a tarball? If you did, directory
glibmm/untracked/glib/glibmm/ should contain many files, among them wrap_init.cc.
If you’ve downloaded from the git repository, that directory does not exist,
and you can’t use -Dmaintainer-mode=false.
You can build glibmm from a git clone, but then you have to build it in maintainer-mode.
That’s the default when building from a git clone. Building in maintainer-mode
requires that more commands are available, for instance perl and m4. I see in
meson’s output in your full log that you’ve got most required programs.
You haven’t got the dot command, though. That’s necessary only if you
build the documentation. If you don’t care about the documentation (which is available
on the web and in tarballs) you can set -Dbuild-documentation=false.
@kjellahl Getting further in the compilation process now!
C:\Users\PC-AITOR\Documents\inkscape\deps\source\glibmm-2.86.0\build>meson compile -j8
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: "C:\Program Files\Meson\ninja.EXE" -j 8
[8/462] Linking target subprojects/libsigcplusplus/sigc++/sigc-3.0-0.dll
Creazione della libreria subprojects\libsigcplusplus\sigc++\sigc-3.0.lib e dell'oggetto subprojects\libsigcplusplus\sigc++\sigc-3.0.exp
[73/462] Linking target glib/glibmm/glibmm-vc143-2.68-1.dll
Creazione della libreria glib/glibmm\glibmm-vc143-2.68.lib e dell'oggetto glib/glibmm\glibmm-vc143-2.68.exp
[214/462] Linking target tools/extra_defs_gen/glibmm_generate_extra_defs-vc143-2.68-1.dll
Creazione della libreria tools\extra_defs_gen\glibmm_generate_extra_defs-vc143-2.68.lib e dell'oggetto tools\extra_defs_gen\glibmm_generate_extra_defs-vc143-2.68.exp
[215/462] Generating subprojects/mm-common/libstdc++.tag with a custom command
FAILED: subprojects/mm-common/libstdc++.tag
"C:\Program Files\Meson\meson.exe" "runpython" "C:/Users/PC-AITOR/Documents/inkscape/deps/source/glibmm-2.86.0/subprojects/mm-common/util/meson_aux/libstdcxx-tag.py" "none" "C:/Users/PC-AITOR/Documents/inkscape/deps/source/glibmm-2.86.0/subprojects/mm-common/doctags" "subprojects/mm-common/libstdc++.tag"
Error: subprojects/mm-common/libstdc++.tag does not exist.
Downloading it is not possible because network is disabled.
Please reconfigure with the -Duse-network=true option.
[222/462] Compiling C++ object subprojects/libsigcplusplus/tests/test_accumulated.exe.p/test_accumulated.cc.obj
ninja: build stopped: subcommand failed.
Error: subprojects/mm-common/libstdc++.tag does not exist.
Downloading it is not possible because network is disabled.
Please reconfigure with the -Duse-network=true option.
mm-common is a subproject here. You should set -Dmm-common:use-network=true.
Thanks! I was confused, because I was setting -Duse-network=true as the option says (without the prefix mm-common)
Getting it much further now, but we’re not there yet.
C:\Users\PC-AITOR\Documents\inkscape\deps\source\glibmm-2.86.0\build>meson compile -j8
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: "C:\Program Files\Meson\ninja.EXE" -j 8
[22/221] Generating subprojects/mm-common/libstdc++.tag with a custom command
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 253 100 253 0 0 388 0 --:--:-- --:--:-- --:--:-- 389
100 3520k 100 3520k 0 0 941k 0 0:00:03 0:00:03 --:--:-- 1596k
[167/221] Generating subprojects/libsigcplusplus/docs/docs/manual/manual_html with a custom command
FAILED: subprojects/libsigcplusplus/docs/docs/manual/html
"C:\Program Files\Meson\meson.exe" "runpython" "C:/Users/PC-AITOR/Documents/inkscape/deps/source/glibmm-2.86.0/subprojects/libsigcplusplus/tools/tutorial-custom-cmd.py" "html" "../subprojects/libsigcplusplus/docs/docs/manual/libsigc_manual.xml" "subprojects/libsigcplusplus/docs/docs/manual/html"
error : Unknown IO error
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
[174/221] Linking target examples/dbus_server_without_bus.exe
ninja: build stopped: subcommand failed.
I don’t know why I’m getting so many problems and I wouldn’t want to bother you. Is this a “me problem”? Is there a doc page or a list of prerequisites I’m missing? I know there’s README.md.win32. I read it and tried to follow all the steps. But some stuff is very technical.
See subprojects/libsigcplusplus/README.md, the section with the heading Building the documentation.
I suggest that you don’t build sigc++'s documentation, at least not the manual.
Thus, -Dsigc++ -3.0:build-documentation=false or -Dsigc++ -3.0:build-manual=false.
There shall be no space between + and - in sigc++ -3.0, but I just can’t get
Discourse to show it correctly. If I write + - without a space, it becomes ±.
If you build from a git clone, you can’t use -Dmaintainer-mode=false the first
time you build. You must use either -Dmaintainer-mode=true or the default value
-Dmaintainer-mode=if-git-build. -Dmaintainer-mode=false will work in subsequent builds,
but if you update your git clone with git pull, generated source files will
not be updated in your clone when you build the next time. I recommend that you
erase -Dmaintainer-mode=false from your command line and use the default value all the time.
Btw -Dmaintainer-mode=false can be used but is unnecessary when building from a tarball.
Where should I write this in the documentation?
I don’t understand. Did you mean Where should I find …?
There is no easy way to find all necessary info, unfortunately. Which command options
are necessary depends on exactly what you want to build (documentation, example programs,
test programs) and which commands and packages have been installed previously
(doxygen, dot, m4, glib, etc.). Some info can be found in each package’s README.md file.
The meson_options.txt files show which meson options are available.
mm-common:use-network has been a nuisance also for me. It should have a third choice
(not just false and true), perhaps if-no-local-tag-file, as its default value.
Let’s see if I take the time to add it.
If you want to add info specifically for building on Windows, README.win32.md
is a good place. A merge request is welcome.
I build glibmm only on Linux, never on Windows. That’s why I couldn’t answer your
questions when you used nmake. Chun-wei Fan has made it possible to build on Windows.
It’s easier to build from tarballs, one package at a time without using subprojects.
Tarballs contain generated source code and generated documentation.