oracle/graal · error · ValueError
the relative extracted lib path of {name} is already set to
Error message
the relative extracted lib path of {name} is already set to {self.relative_extracted_lib_paths[name]} and cannot also be set to {path} for {self.destination} What it means
Same uniqueness rule as error 813 but for extracted native libraries: add_relative_extracted_lib_path() maps a library name to its extraction path per destination, and a second registration with a different path raises ValueError, indicating two components disagree about where an extracted lib is placed.
Source
Thrown at sdk/mx.sdk/mx_sdk_vm.py:145
return sorted(add_exports)
def get_add_exports(self, missing_jars):
if self.use_modules is None:
return ''
distributions = self.jar_distributions
distributions_transitive = mx.classpath_entries(distributions)
distributions_transitive_clean = [entry for entry in distributions_transitive if str(entry) not in missing_jars]
required_exports = mx_javamodules.requiredExports(distributions_transitive_clean, base_jdk())
return AbstractNativeImageConfig.get_add_exports_list(required_exports)
def add_relative_home_path(self, language, path):
if language in self.relative_home_paths and self.relative_home_paths[language] != path:
raise ValueError(f'the relative home path of {language} is already set to {self.relative_home_paths[language]} and cannot also be set to {path} for {self.destination}')
self.relative_home_paths[language] = path
def add_relative_extracted_lib_path(self, name, path):
if name in self.relative_extracted_lib_paths and self.relative_extracted_lib_paths[name] != path:
raise ValueError(f'the relative extracted lib path of {name} is already set to {self.relative_extracted_lib_paths[name]} and cannot also be set to {path} for {self.destination}')
self.relative_extracted_lib_paths[name] = path
class LauncherConfig(AbstractNativeImageConfig):
def __init__(self, destination, jar_distributions, main_class, build_args, is_main_launcher=True,
default_symlinks=True, is_sdk_launcher=False, custom_launcher_script=None, extra_jvm_args=None,
use_modules=None, main_module=None, link_at_build_time=True, option_vars=None, home_finder=True, **kwargs):
"""
:param str main_class
:param bool is_main_launcher
:param bool default_symlinks
:param bool is_sdk_launcher: Whether it uses org.graalvm.launcher.Launcher
:param str custom_launcher_script: Custom launcher script, to be used when not compiled as a native image
:param list[str] | None extra_jvm_args
:param str main_module: Specifies the main module. Mandatory if use_modules is not None
:param bool link_at_build_time
:param list[str] | None option_vars
"""
super().__init__(destination, jar_distributions, build_args, use_modules=use_modules, home_finder=home_finder, **kwargs)View on GitHub (pinned to a66e9ccd1d)
Solutions
- Use the two paths in the message to locate the conflicting registrations in suite.py and unify them to one path.
- If the libraries are actually different artifacts, rename one so the keys differ.
- Verify with a grep for add_relative_extracted_lib_path('<name>' across suites.
Example fix
# before (suite.py)
component A: add_relative_extracted_lib_path('libffi', 'lib/ffi')
component B: add_relative_extracted_lib_path('libffi', 'lib/libffi') # conflict
# after
component B: add_relative_extracted_lib_path('libffi', 'lib/ffi') Defensive patterns
Strategy: validation
Validate before calling
def add_extracted_lib_checked(cfg, name, path):
existing = cfg.relative_extracted_lib_paths.get(name)
if existing is not None and existing != path:
raise ValueError(f"lib {name} already at {existing}; refusing {path}")
cfg.relative_extracted_lib_paths[name] = path Prevention
- One owner per extracted library name per destination.
- Rename directories everywhere at once; grep add_relative_extracted_lib_path before renames.
- Validate path-map consistency in a lint pass over suite.py components.
When it happens
Trigger: Two suite.py components registering the same extracted library name with different relative paths for the same image destination.
Common situations: Renaming a lib directory in one component but not the other; merging components that both bundle a library with the same name.
Related errors
- the relative home path of {language} is already set to {self
- {e} (required by {self.name})
- Unknown component: {name}
- LogFile substitution %s cannot be combined with any other ch
- Profile file for path %s exists already
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/2a3cb900ecd78334.
Report an issue: GitHub.