Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to conda build --source with patches when pointing at the rendered recipe directory of a multi-output produced package #5446

Open
2 tasks done
Callek opened this issue Aug 6, 2024 · 0 comments
Labels
source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type

Comments

@Callek
Copy link
Contributor

Callek commented Aug 6, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

After running conda build to build a package in a multi-output feedstock which included source patches, we were unable to properly apply the patches to the source extraction.

Taking, for example sentencepiece 0.2.0 (https://anaconda.org/anaconda/sentencepiece)

I extract it (cph extract or tar -xvf ..)

conda build --cache-dir "<dir>" --croot "<extracted-source-dir>" --build-id-pat="" --source "<extracted-source-dir>\info\recipe" --debug
...
DEBUG conda.gateways.logging:set_log_level(235): log_level set to 10                                                                                          
WARNING: Multiple meta files found. The meta.yaml file in the base directory (C:\b\abs_6dr31fo189\tmp-pkg-extracted_ac16zwcq\info\recipe) will be used.       
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.22                                                  
Adding in variants from internal_defaults                                                                                                                     
Adding in variants from C:\b\abs_6dr31fo189\tmp-pkg-extracted_ac16zwcq\info\recipe\conda_build_config.yaml                                                    
Source cache directory is: C:\b\abs_6dr31fo189\src_cache\src_cache                                                                                            
Found source in cache: v0.2.0_9970f0a0af.tar.gz                                                                                                               
DEBUG conda.gateways.logging:set_log_level(235): log_level set to 10                                                                                          
                                                                                                                                                              
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<                                                                                                  
                                                                                                                                                              
    Traceback (most recent call last):                                                                                                                        
      File "C:\miniconda3\lib\site-packages\conda\exception_handler.py", line 18, in __call__                                                                 
        return func(*args, **kwargs)                                                                                                                          
      File "C:\miniconda3\lib\site-packages\conda\cli\main.py", line 84, in main_subshell                                                                     
        exit_code = do_call(args, parser)                                                                                                                     
      File "C:\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 176, in do_call                                                                
        result = plugin_subcommand.action(getattr(args, "_args", args))                                                                                       
      File "C:\miniconda3\lib\site-packages\conda_build\plugin.py", line 17, in build                                                                         
        return execute(args)                                                                                                                                  
      File "C:\miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 584, in execute                                                              
        source_action(recipe, config)                                                                                                                         
      File "C:\miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 521, in source_action                                                        
        source.provide(metadata)                                                                                                                              
      File "C:\miniconda3\lib\site-packages\conda_build\source.py", line 1114, in provide                                                                     
        apply_one_patch(src_dir, metadata.path, patch, metadata.config, git)                                                                                  
      File "C:\miniconda3\lib\site-packages\conda_build\source.py", line 956, in apply_one_patch                                                              
        raise RuntimeError(f"Error: no such patch: {path}")                                                                                                   
     RuntimeError: Error: no such patch: C:\b\abs_6dr31fo189\tmp-pkg-extracted_ac16zwcq\info\recipe\patches/0001-do-not-mix-static-shared-builds.patch                      
                                                                                                                                                                            
 `$ C:\miniconda3\Scripts\conda-script.py build --cache-dir C:\b\abs_6dr31fo189\src_cache --croot C:\b\abs_6dr31fo189\tmp-pkg-extracted_jskdtr85 --build-id-pat= --source   
 C:\b\abs_6dr31fo189\tmp-pkg-extracted_ac16zwcq\info\recipe --debug`                                                                                                        
                                                                                                                                                                            
   environment variables:                                                                                                                                                   
                  CIO_TEST=<not set>                                                                                                                                        
     CONDA_ALLOW_SOFTLINKS=false                                                                                                                                            
         CONDA_DEFAULT_ENV=base                                                                                                                                             
                 CONDA_EXE=C:\miniconda3\Scripts\conda.exe                                                                                                                  
              CONDA_PREFIX=C:\miniconda3                                                                                                                                    
     CONDA_PROMPT_MODIFIER=(base)                                                                                                                                           
          CONDA_PYTHON_EXE=C:\miniconda3\python.exe                                                                                                                         
                CONDA_ROOT=C:\miniconda3                                                                                                                                    
               CONDA_SHLVL=1                                                                                                                                                
            CURL_CA_BUNDLE=<not set>                                                                                                                                        
                  INFOPATH=/usr/local/info:/usr/share/info:/usr/info                                                                                                        
...
      active environment : base                                                                 
     active env location : C:\miniconda3                                                        
             shell level : 1                                                                    
        user config file : C:\Users\builder-admin\.condarc                                      
  populated config files : C:\miniconda3\.condarc                                               
                           C:\Users\builder-admin\.condarc                                      
           conda version : 24.7.1                                                               
     conda-build version : 24.7.1                                                               
          python version : 3.9.18.final.0                                                       
                  solver : libmamba (default)                                                   
        virtual packages : __archspec=1=skylake_avx512                                          
                           __conda=24.7.1=0                                                     
                           __win=0=0                                                            
        base environment : C:\miniconda3  (writable)                                            
       conda av data dir : C:\miniconda3\etc\conda                                              
   conda av metadata url : None                                                                 
            channel URLs : https://repo.anaconda.com/pkgs/main/win-64                           
                           https://repo.anaconda.com/pkgs/main/noarch                           
                           https://repo.anaconda.com/pkgs/r/win-64                              
                           https://repo.anaconda.com/pkgs/r/noarch                              
                           https://repo.anaconda.com/pkgs/msys2/win-64                          
                           https://repo.anaconda.com/pkgs/msys2/noarch                                                                                                
           package cache : C:\miniconda3\pkgs                                                                                                                         
                           C:\Users\builder-admin\.conda\pkgs                                                                                                         
                           C:\Users\builder-admin\AppData\Local\conda\conda\pkgs                                                                                      
        envs directories : C:\miniconda3\envs                                                                                                                         
                           C:\Users\builder-admin\.conda\envs                                                                                                         
                           C:\Users\builder-admin\AppData\Local\conda\conda\envs                                                                                      
                platform : win-64                                                                                                                                     
              user-agent : conda/24.7.1 requests/2.32.3 CPython/3.9.18 Windows/10 Windows/10.0.17763 solver/libmamba conda-libmamba-solver/24.7.0 libmambapy/1.5.8    
           administrator : True                                                                                                                                       
              netrc file : None                                                                                                                                       
            offline mode : False                                                                                                                                      

The referenced patch file does existing in the info/recipe/parent/ dir.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

@Callek Callek added the type::bug describes erroneous operation, use severity::* to classify the type label Aug 6, 2024
@jezdez jezdez added the source::anaconda created by members of Anaconda, Inc. label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants