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

Rebuild for libtiff45 #40

Merged

Conversation

regro-cf-autotick-bot
Copy link
Contributor

This PR has been triggered in an effort to update libtiff45.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/4371839096, please use this URL for debugging.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@izahn
Copy link
Contributor

izahn commented Apr 5, 2023

@conda-forge-admin please rerender

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/leptonica-feedstock/actions/runs/4620653519.

@izahn
Copy link
Contributor

izahn commented Apr 5, 2023

@conda-forge-admin please restart ci

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jul 2, 2023

@conda-forge-admin please restart cis
@conda-forge-admin please rerender

@pkgw
Copy link
Contributor

pkgw commented Jul 10, 2023

Windows failure not obviously related to the libtiff update, but who knows?

[27/150] [org.sw.demo.boost.atomic-1.82.0]/src/lock_pool.cpp
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:840, function execute1: When executing: [pub.egorpugin.primitives.command-0.3.1]/src/command.cpp
C:/Users/VssAdministrator/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(142): error C2039: 'contains': is not a member of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\xstring(4871): note: see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'

@pkgw
Copy link
Contributor

pkgw commented Jul 10, 2023

Aha, appears to be related to sw tool: tesseract-ocr/tesseract#4050

@pkgw
Copy link
Contributor

pkgw commented Jul 10, 2023

OK, the latest version of sw requires VS2022 on Windows. That's only supposed to be when building sw itself but the way that the build seems to work here, the requirement propagates into the main build, and as far as I can tell there's no straightforward way to dial back that version requirement. We currently hardcode VS2019, so let's try updating that to 2022 ...

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

@pkgw
Copy link
Contributor

pkgw commented Jul 10, 2023

I've gotten this farther, but now we're failing on (linewrapping added):

[150/150] C:/Users/VssAdministrator/.sw/storage/tmp/cfg/793929/loc.sw.self.e8bae5-0.0.31.dll
Exception in file D:/dev/cppan2/client2/src/sw/driver/module.cpp:120, function operator ():
  error in module (C:/Users/VssAdministrator/.sw/storage/tmp/cfg/793929/loc.sw.self.4a156b-0.0.31.dll):
    Exception in file D:/dev/cppan2/client2/src/sw/driver/target/native.cpp:799, function findCompiler:
      Cannot find compiler com.Microsoft.VisualStudio.VC.cl->=19.35.0 <19.36.0 for settings: {
        "native": {
          "configuration": "debug", 
          "library": "shared", 
          "mt": "false",
          "program": {
            "asm":" com.Microsoft.VisualStudio.VC.ml->=19.35.0 <19.36.0",
            "c":"com.Microsoft.VisualStudio.VC.cl->=19.35.0 <19.36.0",
            "cpp":"com.Microsoft.VisualStudio.VC.cl->=19.35.0 <19.36.0",
            "lib":"com.Microsoft.VisualStudio.VC.lib->=19.35.0 <19.36.0",
            "link":"com.Microsoft.VisualStudio.VC.link->=19.35.0 <19.36.0"},
          "stdlib": { 
             "c":"com.Microsoft.Windows.SDK.ucrt-10.0.22621.0",
             "cpp":"com.Microsoft.VisualStudio.VC.libcpp->=19.35.0 <19.36.0",
             "kernel":"com.Microsoft.Windows.SDK.um-10.0.22621.0"
           }
        },
       "os": {"arch": "x86_64", "kernel": "com.Microsoft.Windows.NT"}
     }
sw command:
  D:/bld/leptonica_1689029912039/work/build/sw.exe
    -shared
    -platform x64
    -compiler msvc-19.35
    -d D:/bld/leptonica_1689029912039/work/build/.sw/cmake
    -config d,msr,rwdi,r
    integrate
    -cmake-deps D:/bld/leptonica_1689029912039/work/build/.sw/cmake/sw.txt
    -cmake-file-version 7

@hmaarrfk
Copy link
Contributor

It seems to be trying to download and rebuild all the dependencies on windows.

@pkgw
Copy link
Contributor

pkgw commented Jul 10, 2023

@hmaarrfk Oh, is that not the intention? I'm not familiar with this build ...

@hmaarrfk
Copy link
Contributor

It just seems very anti conda forge.

Maybe it would be better to tackle each library independently.

That said, this is something that the original maintainers may have to do.

@pkgw
Copy link
Contributor

pkgw commented Jul 27, 2023

Revisiting this. I've tried merging in the update to 1.83.1, in case it happens to help with the most recent issue.

edit: also, FWIW, it looks like previous successful builds of this package are downloading and building all of the dependencies, so that's not new. I don't love it either, but with these complex Windows packages, I'd rather not open that can of worms ...

@hmaarrfk
Copy link
Contributor

Maybe using jpeg turbo will help...

@pkgw
Copy link
Contributor

pkgw commented Jul 29, 2023

So, the problem here seems to be that we have ended up with multiple versions of the command-line compilers installed on the machine:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64\cl.exe
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\cl.exe

The one that shows up in %PATH% from the standard Conda initialization is the 14.36 version (corresponding to cl version 19.36.x, because ???), but the one preferred by the system's installation of MSBuild is the 14.35 version (corresponding to cl version 19.35.x). Something about the build process tries to lock in to the specific version of the compiler (note msvc-19.35 in the sw command arguments) but then apparently it invokes just cl, raising an error.

I think it will help to get everyone on the same page about which compiler we're using, but apparently you can't just tell CMake which compiler to use on Windows without jumping through some hoops, and it's not clear to me to tell sw what compiler to use either.

As logged in `bld.bat`: as of July 2023, the build system for this
package can run into issues if the version of `cl` found via %PATH% is
not exactly the same as the version used by MSBuild. The only way I can
figure out to avoid the problem is to avoid MSBuild altogether, which
can be done by using the NMake Makefiles generator, as well as
explicitly specifying the full path to the desired compilers.

The error messages were:

```
Exception in file D:/dev/cppan2/client2/src/sw/driver/module.cpp:120, function operator ():
  error in module (C:/Users/VssAdministrator/.sw/storage/tmp/cfg/793929/loc.sw.self.4a156b-0.0.31.dll):
    Exception in file D:/dev/cppan2/client2/src/sw/driver/target/native.cpp:799, function findCompiler:
      Cannot find compiler com.Microsoft.VisualStudio.VC.cl->=19.35.0 <19.36.0 for settings: {...}
```
@pkgw pkgw force-pushed the rebuild-libtiff45-0-1_hd4fdd8 branch from fe03b36 to 6a751b5 Compare July 29, 2023 23:51
@pkgw
Copy link
Contributor

pkgw commented Jul 29, 2023

Woohoo, I think I figured out how to get this working.

My solution does change the CMake build system from MSBuild to NMake, but I don't believe that should affect the resulting artifacts in any significant way.

@hmaarrfk
Copy link
Contributor

amazing!

@pkgw pkgw merged commit a825c53 into conda-forge:main Jul 30, 2023
This was referenced Jul 30, 2023
@regro-cf-autotick-bot regro-cf-autotick-bot deleted the rebuild-libtiff45-0-1_hd4fdd8 branch July 30, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants