Opened 2 years ago
Closed 12 months ago
#13746 closed defect (fixed)
MAKE: Dynamic build detection fails at compile time.
Reported by: | Achaean | Owned by: | sev- |
---|---|---|---|
Priority: | high | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Achaean | Game: |
Description
ScummVM compilation fails, if you add the "--enable-detection-dynamic" argument.
I'm at PCLinux and I tried both the latest stable version and the latest code from Githump.
The last lines of console output are:
> . . . base/detection/detection.cpp:53:24: σφάλμα: expected constructor, destructor, or type conversion before ‘(’ token 53 | REGISTER_PLUGIN_DYNAMIC(DETECTION_DYNAMIC, PLUGIN_TYPE_DETECTION, DetectionDynamic); | ^ make: *** [Makefile.common:171: base/detection/detection.o] Error 1 make: *** Waiting for unfinished jobs.... >
Change History (5)
comment:1 by , 2 years ago
Component: | --Unset-- → --Other-- |
---|---|
Keywords: | Dynamic build detection removed |
comment:2 by , 2 years ago
comment:3 by , 12 months ago
Priority: | normal → high |
---|
It would be nice to get it fixed before the 2.8.0 release.
comment:4 by , 12 months ago
Summary: | Dynamic build detection fails at compile time. → MAKE: Dynamic build detection fails at compile time. |
---|
comment:5 by , 12 months ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I patched the problem by showing the user a warning during configure and explaining how to fix it. We cannot force dynamic plugins, since there is a big block of platform-specific logic for understanding if plugins could be supported. Thus, I resort to warning and switch detection plugin back to static.
Replicated with latest git master. The issue appears to occur if "--enable-plugins" is not passed and dynamic plugins is not the default build on platform i.e. on Linux x86_64, the default will be a static build, rather than using plugins.
However, adding a guard to base/detection/detection.cpp to check for the DYNAMIC_MODULES symbol is not sufficient to get a successful build and link with the current code.
It looks like the static vs. dynamic build logic in configure, config.h symbols and code could do with a minor refactor to ensure a clear logical consistency in how this works.