You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requesting that a new hint, or comparable functionality be added to the compiler to display the strings that get used by the dynlib pragma, to be used in conjunction with the --dynlibOverride flag.
Description
Currently, whenever the dynlib pragma is used in code, that gets compiled into a forced load of a library matching the pattern defined with the pragma. The existing behavior matches the supplied argument to the --dynlibOverride flag to the full library name, such that the two strings don't have to be identical. This is demonstrated in the current documentation, being able to supply --dynlibOverride:lua to match the pragma definition of {. dynlib: liblua.so .}. However this can become more complex when the library name is variable; e.g.: {. ... dynlib: "(libmysqlclient|libmariadbclient).so(|.20|.19|.18|.17|.16|.15)" ... .}
The implementation details of this example resolve as two separate run-time errors:
inability to load "libmysqlclient.so/.dylib/.dll"
inability to load "libmariadbclient.so/.dylib/.dll"
So, to the developer it appears to be necessary to declare two additional --dylibOverride flags, when in-fact this will not resolve the problem.
The necessary fix would be a single --dynlibOverride flag passed with the argument "(libmysqlclient|libmariadbclient)". This would correctly handle the given case of loading a library of the variant name due to the way the dynlib requirement is defined in the code.
Alternatives
Add a new Hint to the compiler that would echo (to stdout) a string that can be used with the --dynlibOverride flag for matching that particular library, plus additional information as to what library that string would be tied to (where the use of the dynlib pragma is in the code). This hint should default to off state.
Additional documentation surrounding how the argument to the --dynlibOverride flag gets interpreted into the library identifier defined in the pragma. The current documentation is sufficient for most cases but uses vague wording with how it actually works, could be more clear/explicit.
Add functionality to existing --dynlibOverrideAll flag to echo information suggested in method 1. (implement method 1, but without use of a new compiler hint)
Summary
Requesting that a new hint, or comparable functionality be added to the compiler to display the strings that get used by the
dynlib
pragma, to be used in conjunction with the--dynlibOverride
flag.Description
Currently, whenever the
dynlib
pragma is used in code, that gets compiled into a forced load of a library matching the pattern defined with the pragma. The existing behavior matches the supplied argument to the--dynlibOverride
flag to the full library name, such that the two strings don't have to be identical. This is demonstrated in the current documentation, being able to supply--dynlibOverride:lua
to match the pragma definition of{. dynlib: liblua.so .}
. However this can become more complex when the library name is variable; e.g.:{. ... dynlib: "(libmysqlclient|libmariadbclient).so(|.20|.19|.18|.17|.16|.15)" ... .}
The implementation details of this example resolve as two separate run-time errors:
libmysqlclient.so
/.dylib
/.dll
"libmariadbclient.so
/.dylib
/.dll
"So, to the developer it appears to be necessary to declare two additional
--dylibOverride
flags, when in-fact this will not resolve the problem.The necessary fix would be a single
--dynlibOverride
flag passed with the argument"(libmysqlclient|libmariadbclient)"
. This would correctly handle the given case of loading a library of the variant name due to the way the dynlib requirement is defined in the code.Alternatives
--dynlibOverride
flag for matching that particular library, plus additional information as to what library that string would be tied to (where the use of thedynlib
pragma is in the code). This hint should default tooff
state.--dynlibOverride
flag gets interpreted into the library identifier defined in the pragma. The current documentation is sufficient for most cases but uses vague wording with how it actually works, could be more clear/explicit.--dynlibOverrideAll
flag to echo information suggested in method 1. (implement method 1, but without use of a new compiler hint)Additional Information
The text was updated successfully, but these errors were encountered: