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
{{ message }}
Repository navigation
Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler #78756
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-09-21.22:13:34.033>created_at=<Date2018-09-04.09:31:27.274>labels= ['build', 'OS-windows']
title='Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler'updated_at=<Date2018-09-21.22:13:34.032>user='https://github.com/vstinner'
LINK : fatal error C1047: The object or library file 'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older compiler than other objects; rebuild old objects and libraries [C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error LNK1257: code generation failed [C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error C1047: The object or library file 'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older compiler than other objects; rebuild old objects and libraries [C:\projects\cpython\PCbuild\_ssl.vcxproj]
LINK : fatal error LNK1257: code generation failed [C:\projects\cpython\PCbuild\_ssl.vcxproj]
Command exited with code 1
If it's due to cache then there is a REST API to clear the cache manually and someone with access to Appveyor credentials can give it a try to clear the cache and see if it's fixed.
{"message":"You do not have required permissions to perform this action."}
Oh. I'm not allowed to clear the build cache :-(
I'm logged as "python" and my role is "Super User". If a Super User is not allowed to clear the cache, who is allowed to do that? Maybe my URL is wrong? The documentation says:
I don't see an appveyor.yml file in the CPython repository. How are
the appveyor builds configured? I was going to take a look, but need
to see the config :-(
On Wed, 5 Sep 2018 at 10:32, STINNER Victor <report@bugs.python.org> wrote:
{"message":"You do not have required permissions to perform this action."}
Oh. I'm not allowed to clear the build cache :-(
I'm logged as "python" and my role is "Super User". If a Super User is not allowed to clear the cache, who is allowed to do that? Maybe my URL is wrong? The documentation says:
Another way will be to invalidate the cache by manually updating cleanup-cache.txt in the end. But this requires a commit that has to be reverted later to enable caching and I don't think it's worthy to pollute git history for this.
You can have any file as dependency that will be triggering cache invalidation, even "cleanup-cache.txt" say in the root of your repo:
cache:
- my_cached_folder -> cleanup-cache.txt
Whenever CRC32 of cleanup-cache.txt is changed the cache is invalidated, i.e. not restored in the beginning of the build.
One another way will be to set environment variable to skip the cache restore and trigger a build to see if cache is the actual problem. I don't know how configurable environment variables are from the UI to trigger a specific build with the set of environment variable values.
APPVEYOR_CACHE_SKIP_RESTORE - set to true to disable cache restore
APPVEYOR_CACHE_SKIP_SAVE - set to true to disable cache update
I see these as well, but it would only be a temporary solution and may make build much slower, whereas AppVeyor is already a bottleneck in our workflow. AppVeyor only give us two jobs in parallel which take 10-30 min, whereas it's common that we have much more new pull requests per hour.
Ah ok, I thought disabling the cache with APPVEYOR_CACHE_SKIP_RESTORE as true will trigger a successful build and in the end it will store the new set of artifacts from the recent compiler to the cache and then we can toggle the environment variable (APPVEYOR_CACHE_SKIP_RESTORE) so that for the next build artifacts built from old compiler are replaced with the newer ones resembling a cache clear. Sorry I might be wrong here and it's a workaround that I thought will work as in the other CI systems. I will be happy if it's solved through API then with the right credentials.
One thought - appveyor.yml says that the cache of externals depends on PCBuild. Could it be that appveyor is caching PCBuild to verify whether it's changed (and hence whether to use the cached externals)? I know that sounds bizarre, but I'm not entirely sure why externals should be dependent on the *whole* of PCBuild anyway - maybe we should change it to depend only on PCBuild/get_externals.bat?
Clutching at straws here, there's definitely nothing obvious I can see though.
Activity
vstinner commentedon Sep 4, 2018
Example on my PR:
#9057
https://ci.appveyor.com/project/python/cpython/build/3.6build21480/job/lge7r4qknx0t0tlv
LINK : fatal error C1047: The object or library file 'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older compiler than other objects; rebuild old objects and libraries [C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error LNK1257: code generation failed [C:\projects\cpython\PCbuild\_hashlib.vcxproj]
LINK : fatal error C1047: The object or library file 'C:\projects\cpython\PCBuild\win32\libeay.lib' was created with an older compiler than other objects; rebuild old objects and libraries [C:\projects\cpython\PCbuild\_ssl.vcxproj]
LINK : fatal error LNK1257: code generation failed [C:\projects\cpython\PCbuild\_ssl.vcxproj]
Command exited with code 1
zooba commentedon Sep 4, 2018
Works on VSTS build. I suspect AppVeyor is caching files between builds, but I'm not familiar enough with the configuration to fix that.
tirkarthi commentedon Sep 5, 2018
If it's due to cache then there is a REST API to clear the cache manually and someone with access to Appveyor credentials can give it a try to clear the cache and see if it's fixed.
Ref : appveyor/ci#985
Log in and execute the below from the console as per appveyor/ci#985 (comment)
$.ajax({
url: 'https://ci.appveyor.com/api/projects/\<username>/<project>/buildcache',
type: 'DELETE'})
A workaround : https://help.appveyor.com/discussions/questions/1310-delete-cache
Thanks
vstinner commentedon Sep 5, 2018
REST API for the AppVeyor build cache:
https://www.appveyor.com/docs/build-cache/#rest-api
Authentication of the REST API:
https://www.appveyor.com/docs/api/#authentication
I tried:
{"message":"You do not have required permissions to perform this action."}
Oh. I'm not allowed to clear the build cache :-(
I'm logged as "python" and my role is "Super User". If a Super User is not allowed to clear the cache, who is allowed to do that? Maybe my URL is wrong? The documentation says:
DELETE https://ci.appveyor.com/api/projects/{accountName}/{projectSlug}/buildcache
pfmoore commentedon Sep 5, 2018
I don't see an appveyor.yml file in the CPython repository. How are
the appveyor builds configured? I was going to take a look, but need
to see the config :-(
On Wed, 5 Sep 2018 at 10:32, STINNER Victor <report@bugs.python.org> wrote:
vstinner commentedon Sep 5, 2018
Ah! If I user my personal account which has a different token, I'm able to list my roles using the REST API.
So it seems that I lack some permissions on the "python" account of AppVeyor. Who owns this account?
tirkarthi commentedon Sep 5, 2018
Another way will be to invalidate the cache by manually updating cleanup-cache.txt in the end. But this requires a commit that has to be reverted later to enable caching and I don't think it's worthy to pollute git history for this.
https://help.appveyor.com/discussions/questions/1310-delete-cache#comment_36916917
@paul.moore It's here : https://github.com/python/cpython/blob/master/.github/appveyor.yml
Thanks
tirkarthi commentedon Sep 5, 2018
One another way will be to set environment variable to skip the cache restore and trigger a build to see if cache is the actual problem. I don't know how configurable environment variables are from the UI to trigger a specific build with the set of environment variable values.
https://www.appveyor.com/docs/build-cache/#skipping-cache-operations-for-specific-build
Thanks
vstinner commentedon Sep 5, 2018
I see these as well, but it would only be a temporary solution and may make build much slower, whereas AppVeyor is already a bottleneck in our workflow. AppVeyor only give us two jobs in parallel which take 10-30 min, whereas it's common that we have much more new pull requests per hour.
tirkarthi commentedon Sep 5, 2018
Ah ok, I thought disabling the cache with APPVEYOR_CACHE_SKIP_RESTORE as true will trigger a successful build and in the end it will store the new set of artifacts from the recent compiler to the cache and then we can toggle the environment variable (APPVEYOR_CACHE_SKIP_RESTORE) so that for the next build artifacts built from old compiler are replaced with the newer ones resembling a cache clear. Sorry I might be wrong here and it's a workaround that I thought will work as in the other CI systems. I will be happy if it's solved through API then with the right credentials.
Thanks
pfmoore commentedon Sep 5, 2018
One thought - appveyor.yml says that the cache of externals depends on PCBuild. Could it be that appveyor is caching PCBuild to verify whether it's changed (and hence whether to use the cached externals)? I know that sounds bizarre, but I'm not entirely sure why externals should be dependent on the *whole* of PCBuild anyway - maybe we should change it to depend only on PCBuild/get_externals.bat?
Clutching at straws here, there's definitely nothing obvious I can see though.
vstinner commentedon Sep 5, 2018
Discussion on python-dev:
https://mail.python.org/pipermail/python-dev/2018-September/155075.html
zware commentedon Sep 5, 2018
New changeset 635461f by Zachary Ware in branch '3.6':
[3.6] bpo-34575: Build with only VS2015 on AppVeyor (GH-9066)
635461f
vstinner commentedon Sep 21, 2018
It seems like the bug has been fixed. Thanks Zachary Ware for the fix, and thanks everybody for helping to fix this cache issue ;-)