diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index ee993cd72..9f4592a16 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -488,11 +488,6 @@ jobs: ${{ matrix.python-version }} --use-mamba ' - - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method - == 'mamba') - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda - llvm (7) - run: ./utils/setup_old_mac_sdk.sh - if: runner.os == 'Linux' && matrix.install-sbml == true name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev @@ -895,11 +890,6 @@ jobs: ${{ matrix.python-version }} --use-mamba ' - - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method - == 'mamba') - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda - llvm (7) - run: ./utils/setup_old_mac_sdk.sh - if: runner.os == 'Linux' && matrix.install-sbml == true name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev @@ -1278,11 +1268,6 @@ jobs: ${{ matrix.python-version }} --use-mamba ' - - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method - == 'mamba') - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda - llvm (7) - run: ./utils/setup_old_mac_sdk.sh - if: runner.os == 'Linux' && matrix.install-sbml == true name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev @@ -1642,11 +1627,6 @@ jobs: ${{ matrix.python-version }} --use-mamba ' - - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method - == 'mamba') - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda - llvm (7) - run: ./utils/setup_old_mac_sdk.sh - if: runner.os == 'Linux' && matrix.install-sbml == true name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev @@ -2005,11 +1985,6 @@ jobs: ${{ matrix.python-version }} --use-mamba ' - - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method - == 'mamba') - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda - llvm (7) - run: ./utils/setup_old_mac_sdk.sh - if: runner.os == 'Linux' && matrix.install-sbml == true name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev diff --git a/utils/test-install-base.yml b/utils/test-install-base.yml index 0ebd6f8df..9fb229fd9 100644 --- a/utils/test-install-base.yml +++ b/utils/test-install-base.yml @@ -275,9 +275,9 @@ jobs: conda deactivate conda activate base python utils/setup_test_env.py build ${{ matrix.install-method }} --python ${{ matrix.python-version }} --use-mamba - - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda llvm (7) - if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method == 'mamba') - run: ./utils/setup_old_mac_sdk.sh + # - name: (MACOS,CONDA) Install old MacOSX SDK for compatibility with the conda llvm (7) + # if: runner.os == 'macOS' && (matrix.install-method == 'conda' || matrix.install-method == 'mamba') + # run: ./utils/setup_old_mac_sdk.sh - name: (LINUX) Install ncurses 5 for SBML runs with libroadrunner if: runner.os == 'Linux' && matrix.install-sbml == true run: sudo apt-get install libncurses5 libncurses5-dev libncursesw5-dev diff --git a/yggdrasil/drivers/CPPModelDriver.py b/yggdrasil/drivers/CPPModelDriver.py index 89c627c3d..65ffbf406 100644 --- a/yggdrasil/drivers/CPPModelDriver.py +++ b/yggdrasil/drivers/CPPModelDriver.py @@ -167,6 +167,8 @@ class GPPLinker(GCCLinker): languages = GPPCompiler.languages default_executable = GPPCompiler.default_executable toolset = GPPCompiler.toolset + standard_library = GPPCompiler.standard_library + libraries = {} class ClangPPLinker(ClangLinker): diff --git a/yggdrasil/drivers/CompiledModelDriver.py b/yggdrasil/drivers/CompiledModelDriver.py index 8db6e816f..f2d5e1982 100644 --- a/yggdrasil/drivers/CompiledModelDriver.py +++ b/yggdrasil/drivers/CompiledModelDriver.py @@ -29,7 +29,7 @@ _all_toolsets = [ 'gnu', 'msvc', 'llvm', ] -_default_libtype = 'shared' # TODO: retry static' +_default_libtype = 'static' # TODO: retry static' _conda_prefix = tools.get_conda_prefix() _venv_prefix = tools.get_venv_prefix() _system_suffix = "" @@ -924,7 +924,11 @@ def splitext(cls, fname): if fname.endswith('.dll.a'): ext = '.dll.a' return fname.rsplit(ext, 1)[0], ext - return os.path.splitext(fname) + base, ext = os.path.splitext(fname) + while ext and ext.startswith('.') and ext[1:].isnumeric(): + base, ext2 = os.path.splitext(base) + ext = ext2 + ext + return (base, ext) @property def internal(self): @@ -3021,6 +3025,15 @@ def _dependency_order(self, **kwargs): self.driver.libraries.add_compiler_libraries(self.basetool) alldeps.append((self.basetool.languages[0], self.basetool.standard_library)) + if ((self['libtype'] in self.linked_files + and self.tool('linker').standard_library + and self.is_rebuildable + and self.name != self.tool('linker').standard_library + and self.mixed_toolset)): + linker = self.tool('linker') + drv = import_component('model', linker.languages[0]) + drv.libraries.add_compiler_libraries(linker) + alldeps.append((linker.languages[0], linker.standard_library)) spec_libs = self.parent_driver.libraries.specialized(**spec_kws) for d in alldeps: dep = spec_libs.get(d) @@ -3637,6 +3650,8 @@ def _search_linked(self, filetype, **kwargs): for lib in self.basetool.find_component( self.name, cfg=self.cfg, flags=flags, component_types='shared_libraries', **kwargs): + # TODO: temp + print(f"FIND_COMPONENT {self.name}: {lib}") out = self._search_brute(lib, libtype='shared', **kwargs) if out: break @@ -3683,7 +3698,8 @@ def _search_brute(self, fname, libtype=None, verbose=False, fname = fname_base + fname_ext else: expected_ext = self.extension(libtype, return_all=True) - if fname_ext not in expected_ext: + if (((fname_ext not in expected_ext) + and not fname_ext.startswith(tuple(expected_ext)))): fname = fname_base + expected_ext[0] fname_ext = expected_ext[0] if os.path.isfile(fname):