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

Additional patch for CPython/3.8.12, duplicate libffi symbols #13279

Closed
wants to merge 0 commits into from

Conversation

cubanpit
Copy link

@cubanpit cubanpit commented Oct 3, 2022

I had issues compiling cpython/3.8.12 on Windows with shared libffi, the linker complained about duplicated symbols.
This patch solved the problem and I later found this recent commit in the CPython repo that seems to apply the same change.

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2022

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Oct 3, 2022

@uilianries
Copy link
Member

@cubanpit Thank you for your contribution, do you have a log or associated issue reporting your error with more details?

@cubanpit
Copy link
Author

cubanpit commented Oct 4, 2022

This is the message that pops up if I try to compile cpython/3.8.12 and shared libffi/3.4.2 without my patch:

malloc_closure.obj : error LNK2005: ffi_closure_alloc already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbui
ld\_ctypes.vcxproj]
malloc_closure.obj : error LNK2005: ffi_closure_free already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbuil
d\_ctypes.vcxproj]
C:\Users\anonapath\source_subfolder\PCbuild\amd64\_ctypes.pyd : fatal error LNK1169: one or more multiply defined symbols found [C:\Users\
anonpath\source_subfolder\PCbuild\_ctypes.vcxproj]

There is not issue about this opened on other projects, as far as I know.

@uilianries
Copy link
Member

@cubanpit Could you please share your entire log, with the executed command? Also your used profile. As there is no issue opened describing your problem, it's hard to track your scenario, in case someone need to reproduce it.

@conan-center-bot

This comment has been minimized.

@cubanpit
Copy link
Author

cubanpit commented Oct 5, 2022

Here I attach the entire log from building the package with my conanfile (sorry, not very minimal, I can produce a more minimal example if needed), and then the settings and the profile files.

settings.yml.txt
stdout.txt
PROFILE_Windows_VS19md_if21_cygwin.txt

EDIT: The log contains the "attempted build" without the patch, to show the issue. It does not fail with the patch applied.

EDIT2: I also append the conaninfo of the package successfully built using the patch above.
conaninfo.txt

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uilianries
Copy link
Member

@cubanpit Thank you for providing those logs.

@prince-chrismc
Copy link
Contributor

Please open a PR upstream 🙏

@ericLemanissier
Copy link
Contributor

@cubanpit please close the PR for 10 second then reopen it so that it retriggers a build and finally merge this change

@uilianries
Copy link
Member

uilianries commented Oct 14, 2022

@ericLemanissier still needs to be added to access request list 😉

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Failure in build 4 (e06d6e2a85ccfec5466fe41cfed35651f08ae739):

  • cpython/3.9.7@:
    Didn't run or was cancelled before finishing

  • cpython/2.7.18@:
    CI failed to create some packages (All logs)

    Logs for packageID 113c66262a1ab7a6d1cd09852dc058871832fcea:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=11.0
    os=Macos
    [options]
    cpython:shared=False
    
    [...]
    checking for %zd printf() format support... no
    checking for socklen_t... no
    checking for build directories... checking for --with-computed-gotos... no value specified
    checking whether cc supports computed gotos... no
    done
    checking for ensurepip... no
    configure: creating ./config.status
    config.status: creating Makefile.pre
    config.status: creating Modules/Setup.config
    config.status: creating Misc/python.pc
    config.status: creating Modules/ld_so_aix
    config.status: creating pyconfig.h
    creating Modules/Setup
    creating Modules/Setup.local
    creating Makefile
    
    
    If you want a release build with all optimizations active (LTO, PGO, etc),
    please run ./configure --enable-optimizations
    
    
    
    ----Running------
    > make -j4
    -----------------
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Modules/python.o source_subfolder/Modules/python.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/acceler.o source_subfolder/Parser/acceler.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/grammar1.o source_subfolder/Parser/grammar1.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/listnode.o source_subfolder/Parser/listnode.c
    cpython/2.7.18: 
    configure: WARNING:
    
      By default, distutils will build C++ extension modules with "c++".
      If this is not intended, then set CXX on the configure command line.
      
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/acceler.o] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [Modules/python.o] Error 1
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/grammar1.o] Error 1
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/listnode.o] Error 1
    WARN: tcl/8.6.10: requirement zlib/1.2.12 overridden by tk/8.6.10 to zlib/1.2.11 
    cpython/2.7.18: ERROR: Package '113c66262a1ab7a6d1cd09852dc058871832fcea' build failed
    cpython/2.7.18: WARN: Build folder /Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/cpython/2.7.18/_/_/build/113c66262a1ab7a6d1cd09852dc058871832fcea
    ERROR: cpython/2.7.18: Error in build() method, line 428
    	autotools.make()
    	ConanException: Error 2 while executing make -j4
    
  • cpython/3.10.0@:
    Didn't run or was cancelled before finishing

  • cpython/3.7.12@:
    Didn't run or was cancelled before finishing

  • cpython/3.8.12@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@cubanpit
Copy link
Author

It seems that there is a build failure unrelated to my changes, any way to only build the specific Python version I am patching?

@uilianries
Copy link
Member

@cubanpit I don't think is related to your PR, as your patch is only changing another version. It will need some investigation.

@prince-chrismc
Copy link
Contributor

@uilianries
Copy link
Member

@prince-chrismc I don't think so. Pinging @danimtb and @davidsanfal Just in case.

@danimtb
Copy link
Member

danimtb commented Oct 19, 2022

@prince-chrismc I don't think so. Pinging @danimtb and @davidsanfal Just in case.

not really...

@prince-chrismc
Copy link
Contributor

as a workaround id block that apple-clang 11 for that one version and see if that's enough

add a message pointing to the comment that highlighted the failure

@stale
Copy link

stale bot commented Nov 19, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants