Comments (9)
We should either add --help output to these tools (preferred) or not run help2man (to automatically generate man pages) on those (only).
from megaglest-source.
@akien-mga: 3.11.0 had a bug in the map editor which crashes it on startup on some systems, depending on the wxwidget version which was used. Maybe thats why you got no output for --help?
Or was the output not sufficient enough ? In this case, what would you expect to be the output of --help ?
from megaglest-source.
Well I've just tried and it's true that megaglest_editor crashes on my system with wxWidgets 2.8.12. I'll try to build against wxWidgets 3.0 and see if that fixes the issue.
For the --help output, I don't have particular wishes, I'm just reporting that the default buildsystem seems to fine it incompatible with the generation of a manpage via help2man.
With the installed binary, the --help output is:
megaglest_editor --help
Using wxWidgets version [2.8.12.0]
MegaGlest map editor v1.6.1 [Using wxWidgets 2.8.12]
glest_map_editor [GBM OR MGM FILE]
Creates or edits glest/megaglest maps.
Draw with left mouse button (select what and how large area in menu or toolbar)
Pan trough the map with right mouse button
Zoom with middle mouse button or mousewheel
from megaglest-source.
The bug is still valid with megaglest 3.11.1.
I confirm that megaglest_editor
and megaglest_g3dviewer
both have a valid --help output, but for some reason help2man doesn't like it during the build. I checked the advice given in the build error, both files redirect their --help stream to stdout, so it's not a stdout vs. stderr issue.
from megaglest-source.
Ok, the funny thing is that this bug happens only when I try to build a megaglest RPM. If I build without the RPM spec file but using the exact same CMake and make arguments, I get no issue with help2man...
I don't know why it would behave differently when run through a RPM spec file, maybe the shell environments differs and something funny happens?
My guess would be that something delays the generation/copy of the linked executable, but make still goes on and gives the hand to the manpage generation too early. I've confirmed that trying to run help2man on a non-existing target gives the same error as in my initial post:
$ help2man --name='blabla' --section=6 -N -o test.6 ./ThisFileDoesNotExist
help2man: can't get `--help' info from ./ThisFileDoesNotExist
Try `--no-discard-stderr' if option outputs to stderr
A workaround could be to add some delay between the linking step and the step which generates the man page. Do you know how I could achieve that?
from megaglest-source.
I've dug in some more, and it seems help2man fails even if I call it myself in the RPM spec file, so this whole issue is about an RPM issue. IMO you can close it as invalid.
from megaglest-source.
Actually the --no-discard-stderr
advised by the error message was not a bad tip, I've patch the CMakeLists.txt files to add this argument to the two problematic targets (no idea why it works fine for glest_game), and it does the trick:
Index: megaglest-3.11.1/source/glest_map_editor/CMakeLists.txt
===================================================================
--- megaglest-3.11.1/source/glest_map_editor/CMakeLists.txt
+++ megaglest-3.11.1/source/glest_map_editor/CMakeLists.txt 2015-03-12 20:17:34.644512947 +0100
@@ -168,11 +168,11 @@
MESSAGE("***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
add_custom_target(${TARGET_NAME_MANPAGE} ALL
- COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
+ COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ELSE()
add_custom_target(${TARGET_NAME_MANPAGE} ALL
- COMMAND ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
+ COMMAND ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ENDIF()
ENDIF()
Index: megaglest-3.11.1/source/g3d_viewer/CMakeLists.txt
===================================================================
--- megaglest-3.11.1/source/g3d_viewer/CMakeLists.txt
+++ megaglest-3.11.1/source/g3d_viewer/CMakeLists.txt 2015-03-12 20:17:04.468858390 +0100
@@ -175,11 +175,11 @@
MESSAGE("***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
add_custom_target(${TARGET_NAME_MANPAGE} ALL
- COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
+ COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ELSE()
add_custom_target(${TARGET_NAME_MANPAGE} ALL
- COMMAND ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
+ COMMAND ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
DEPENDS ${TARGET_NAME})
ENDIF()
ENDIF()
The fact that one target is working and the other two don't makes me wonder if there would be a difference in the way those --help methods are coded (maybe for the editor and g3dviewer it's handled somehow by wxgtk?) that could explain why some seem to send their output to stderr when in a RPM build environment...
from megaglest-source.
So this seems to be a bug in some software we depend on. We might still try to work around it.
from megaglest-source.
This patch is applied
from megaglest-source.
Related Issues (20)
- Queueing commands after a morphing command cancels the morphing. HOT 2
- Add the option to use a texture for the mouse cursor
- The building rally point is not visible beyond a certain distance.
- Matrix chat room
- Double clicking on a game entry on the load menu should load the game HOT 3
- Implement ipv6 support
- CI needs additional tests for more recent compilers
- Doesn't build/can't link to ssh on Ubuntu 22.04 (Jammy) HOT 4
- Unfinished buildings can't be added to a control group with other buildings
- Units always get queued on the same building when there's not enough resources.
- Game goes OOS shortly after player rejoins (when rejoin is enabled) HOT 2
- Run game with command line argsument, required video device
- 3.13.0, Fedora 36, Crash on start HOT 1
- Gameserver: Please allow binding to given IP address
- crash when using a 'less than' sign within the unitDied section of scenario xml
- Add official portable Windows package for local installs
- libidn.so.11 not found HOT 6
- Build fails with LTO
- Failed to start start_megaglest_g3dviewer HOT 4
- The AI becomes stuck while trying to sort a large group of enemies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megaglest-source.